Devlog: 1st year final notes
Added 2024-09-29 08:24:36 +0000 UTCI have spent (the little free time I got during) the last 3 weeks refactoring and cleaning up the whole CowHammer project, as well as fixing a few bugs in the first level. While there's still a lot to do there, I think it'd be best to start working on level 2 at the same time, since there are a lot of mechanics that have yet to be fully optimized and they don't happen during level 1.
I intend to post weekly-ish devlogs every Sunday, provided that I manage to get enough progress done during the week. It is only fair to you lovely investors that I keep you updated about my progress, since the development process itself can also be fun. So here are some highlights for September:
At some point I added a visual pointer to mark whichever enemy the player locks onto, but I forgot to write about it in the Discord server, so I don't remember when I did it. I also updated the icons of the Murani informers, but those still need some more work.
I also improved the speech speed and audio, so voices sound better and for a longer time. I also included the option to safely skip dialogues. It's a bit messy because there are special characters that must be handled separately, but that only means skipping text might need a few frames.
Sept 14
Fixed minor visual bug when going back to the player's base state from any other state. The animation state machine tried to find the shortest navigable path towards the right animation clip, when most of the time it's best to just jump straight there.
Fixed ugly visual bug when turning around without walking. For some reason I made player rotation affect the animation 10 times harder than it should, so rotating caused the model to spaz out.
Improved the camera in combat mode, now it adjusts softly to the player's movement instead of shifting abruptly from one shoulder to the other. If the camera is detected to be between the two shoulder positions, it just leaves it there until the player walks out of range, only then it follows.
Fixed the camera so it can follow the player when they teleport between doors or gates. It was as simple as signaling the camera to reset its position, but for some reason I had never programmed that.
Improved the patrol routes of the city wall guards so they look nicer. Now there are a lot more of the little guys up there, making sure the city stays safe.
Added a fading effect when teleporting between gates so it's more pleasant on the eyes. I might tweak the effect further later on, but right now it's pretty nice.
Added the option to safely skip cutscenes. Cutscenes are built by creating a queue that triggers timed event sequences, so I added a flag that marks event groups that can be ignored. If the player asks to skip ahead, the event queue just has to look for the next safe checkpoint and take over from there.
Finished documenting and optimizing about one third of the code files.
Sept 22
After doing some arcane geometry, I managed to make the targeting system cycle through all visible enemies, so the player can easily pick which one to lock onto using the shoulder triggers.
p = player position
a = current target position
b = candidate target position
y = vertical component of vector product (a-p)^(b-p)
if y > 0, then the candidate is LEFT of the current target
Works like a charm. I also optimized the vector product calculation:
y = (a.z - p.z) · (b.x - p.x) - (a.x - p.x) · (b.z - p.z) =
= b.x · (a.z - p.z) + b.z · (p.x - a.x) + (a.x · p.z - a.z · p.x)
Notice that (a.z - p.z), (p.x - a.x) and (a.x · p.z - a.z · p.x) are the same for all candidates, so they only have to be computed once when the player presses a shoulder trigger.
Sept 25
I just managed to finish documenting every last code file of the project. The next step is a scary one: deleting obsolete files. Godot does not like it when I do that. So I have to be very careful.
Sept 27
All unnecessary files (other than the stupidly bloated .godot directory, which may or may not be safe to delete depending on which forum you read) have been deleted and everything is running nicely. I saved... 4Mb. Out of 18Mb. Turns out my game is tiny, it's the goddamn .godot folder that takes 200Mb.
I have also optimized the "trail" and "shockwave" visual effects with more lightweight meshes and shaders. I also added joypad vibration, but that seems somewhat unnecessary and the way to detect if the player is using the keyboard or the joypad is a mess. I'll see if I can improve that later on.