#100DaysOfGameDev Day 20. I'm much happier with this takeoff and landing movement. I still have some refining to do though. Sometimes when it "decides" to land, if it's too close to the original position, it circles several times because it can't turn fast enough to face the origin. Eventually the random stops will get it there but it looks odd.
I recently started to participate in a gamedev challenge (#100daysofgamedev) to try to keep me motivated and forcing me to post updates somewhat regularly.
Until now, i posted only on discord, but i think it might be better to do it in here instead. I don't really like that stuff like that gets lost on hard to search, not indexable discord servers...
So i'll try to duplicate the first days here in a thread (maybe?) and keep adding new ones as i go :)
Day 004: Didn't get much time to work this week but i'm still working on the battle systems.
Today was move/cast range and some code underneath to search/filter tiles with some conditions.
Also added more dev tools and in game cheats so i can test this stuff quickly while still implementing real constraints (like valid targets for abilities, range, etc).
Also updated my editor theme and fixed some memory leaks in it. Color scheme "totally not stolen" from Isa's IMGUI config in https://github.com/isadorasophia/murder
Day 009: I now have working animation for sprites and colors and with different easing methods.
Next i want to animate transforms (position, scale & rotate) but i'll probably want to change how my entities are stored if i want the parent transforms to affect their children 🤔 But that's a problem for future me!
Day 010-011: Plug the animation system with my entity system so i can animate units. Animation works for color, scale, position and sprite/texture, still haven't done rotation because i'm not sure i actually need that.
Still chipping at the project 1 hour at the time, I can't wait to be able to spend more time on this haha.
Day 012-013: Making the animation system work on units and plug that into the battle system to have some (very) crude unit movement. The pathfinding isn't plugged in and the animations are obviously placeholders, but hey, it's progress 😉
Day 014-015: Fixed some rendering issues, memory leaks, and upgraded DearImGUI to the "docked" branch.
Day 016: Updated the engine to allow nesting transforms components into their parents so i can scale/move only the parent (unit) and have the children (hands) scale and move accordingly.
Also got back to unit walk animation which i'll be able to showcase here soon.
Day 017: Lost half the day trying to open a 2 years old Unity project because everything that could go wrong, did just that (multiple crashes, asset references lost, bugs, missing packages, etc). Finally got it running after 3 hours of madness.. I do not miss working with Unity haha.
Rest of the day i spent working on my server, slowly starting to move my git projects to it because i don't want to depend on Microsoft for that anymore...
Day 018 (1/2): Investigated a memory leak in one of the libraries i am using, i think it's probably me doing something really dumb in my DearIMGUI or Tracy calls haha.
So i'm putting tools in place to track allocations that are done in C/C++ libs (everything is already tracked and budgeted in my Odin code) and hopefully i'll report back on this tomorrow 🙂
Day 018 (2/2): I wanted to spend more time on the actual game and less on the tools but i'm thinking long term so i have to resist and make sure i make the tools i need along the way. I'll get there ^^
Day 019-022 (2/2): While doing that i found some issues on my architecture and managed to fix a lot of them, but at that point i have to resist very hard not to spend too much time rewriting it again.
Should be back on game systems tomorrow if i'm well enough to work, i have more work to do for the units movement animations 🙂
Day 023: Spent some time moving the animation system to the engine code and make a simpler API.
It's not much but that allowed me to prepare some stuff for the next step which is: to chain unit animations (walk, climb, jump, change direction, etc) and loop/repeat them when needed.
Day 024: More animation work. I updated the system to be able to easily queue animations and wait for them to complete (ie: during battles and cutscenes).
It's not looking great because the path finding isn't plugged in yet and i'm still using placeholder animations, but the code is there at least.
Also, I had to spent half the day fixing my work environment (OS and editor :/) because it's one of those days where everything decided to fail... sigh
Day 025: I've been experimenting a little with DearImGUI docking branch and having the game run inside a window, so i can move, resize and dock it like any other.
Not sure i'm gonna keep it like that, but it was interesting to investivate and see how that would work.
Day 029: Started implementing audio playback in the engine today.
I wanted to try out both sokol_audio and sdl/sdl_mixer so i coded a small prototype in both and i think i'm gonna stick with SDL2 for now. The SDL3 branch also looks super interesting with that new audio system 👀 (but not diving into that now haha). So far i got a simple wav file loading and playing with some basic mixing, next i'll integrate that into my existing asset pipeline and see how this goes.
DAY 030: Updated my build script to handle audio files and plugged the audio system into the asset pipeline. So now i can load/unload sounds like all my other assets, hot reload too (though i haven't used this in a while tbf). I need to work on having different load options for audio files next, since i'll probably need to handle small sound clips differently than big music files.
Here is a short clip of how it works right now in my ugly assets UI 🔊:
Day 031: More audio work, i think it's good enough for now. I've added battle music and the first sound effects into the game (and engine). Everything is now handled like other assets by the engine and can be called from game code easily when i need to.
Day 032: Still under the weather today but managed to work a couple of hours, so i added events into the animation system so i can play sounds at any point during an animation.
Day 033: Added CPU controlled entities and time_scale so they can battle without me \o/
This is just a first pass, so the CPU is just choosing random targets at the moment and not really planning its turn. And now i can increase the time_scale and the battle goes brrrr!
Also, did some clean up of the animation system and queues, and fixed an audio issue on Windows.
Day 034: Migrated more code from the game to the engine and rework the entity/component code to make it easier to use in game code.
I don't need a full blown ECS, just components and entities, so i'm going for something simple (inspired by https://github.com/NoahR02/odin-ecs)
Day 035-036: Had to rework a some code after the entity/component changes because i didn't want to lose quality of life features like code hot reloading just for this system.
Day 037: Back to game code so i added ability damage, death animation, win/lose condition detection and color palette swap to differentiate teams during battle.