mirror of
https://github.com/Ed94/HandmadeHero.git
synced 2024-12-22 14:24:43 -08:00
11 lines
1.1 KiB
Markdown
11 lines
1.1 KiB
Markdown
|
# Day 45
|
||
|
|
||
|
I had a long hiatus since the last time I updated this project: November 5th to December 29th!
|
||
|
Coming back and making some headway again gave me some vitality.
|
||
|
|
||
|
# Day 46
|
||
|
|
||
|
Took me quite a bit of time to get through this one. I wasn't a fan of the side-track at first to fix a bug by just straight up adding a feature, but it at least as completed in one session. I first implemented the input changes myself for the most part doing the minimal required to support 2 players. This route made more sense as the input setup used for this project has deviated a decent degree what Casey's implementation. I then got caught up and did the changes for entities and camera following.
|
||
|
|
||
|
Player's `ControllerState` is now a sort of assigned input tracker and the inputs are updated every frame to the latest polling. I keep track controller id for an xinput or dualsense pad and use that to determine assignment. What controllers are assigned depends on if a player has been assigned a controller yet. So its in order of first player 1 gets it when start is pressed then player 2. Keyboard & mouse is auto-assigned to player 1 (could change easily in the future).
|