Chasing Elysium - Devlog #004
I made more progress than expected this week, despite recovering from my bike crash! Unfortunately none of it is in a state where it can be tested yet.
Combat - Movement
I implemented the movement code for the player while they're in combat! The player has three movement speeds while in combat. They move fastest when moving towards the targeted enemy, slower when strafing the enemy, and slowest when moving away from the enemy.
To implement, I took the player's standard movement input and split it into two components: radial and angular. Radial is their movement towards/away from the enemy (calculated via dot product between player velocity and the direction towards the enemy). Angular is the rest of the movement. Once it's split, I check the radial speed and apply one of two modifiers depending on whether it's towards or away from the enemy. The angular movement gets its own modifier. Then both velocities are added back together to get the player's final velocity.
Combat - Targeting
Next I implemented the controls to target enemies. You tap one of two buttons and it will select the next enemy either clockwise or counterclockwise from either the player's facing direction (if no current target) or the current target.
Ended up just collecting all of the nearby enemies with a sensor area, then iterating through them to "score" them based on the angle between them and the current target direction. The candidate with the lowest score that isn't the current target is chosen.
Development Environment - Laptop
I've been splitting work on the game between home and my lunch breaks at my day job. At my day job, naturally I use my laptop, which, until yesterday, tragically ran Windows. The horrendous power management and forcing of awful LLM-based psuedo-AI like copilot into the OS got me exhausted, so I spent yesterday nuking Windows and installing Arch. Then realizing I screwed up and made the boot partition too small and redoing it all. But now I am running Arch and power consumption is so much better! Doubled battery life + it doesn't chew through power even while suspended anymore!
Development Environment - Code Hosting
The other change I've made to my work flow is I changed how I host my code. I used to use GitHub. GitHub is now an LLM platform. I switched to GitLab. GitLab is now an LLM platform. Screw it. Screw these tech companies and their plagiarism-powered environment-destroying lying machines. I now have a self hosted git server.
Next Tasks
I intend to implement a test scenario for the combat code I've written so far so I can debug it if needed. After that, there's a few UI tasks to work on. One is improving the dialogue boxes, one is the basic combat UI for the player. Once the latter is done, I can implement actual combat mechanics and begin working on proper gameplay! No timeline for all of this, but these are the things I intend to work on in the near future.