LOG 16: NEW NPC, BETTER CODE MODULARITY, FIXED SOME BUGS
NEW FEATURES
New “Modulo” / % enemy (based on the modulo operator in c)! It has weaker stats but is way stronger in terms of attack power
BETTER CODE MODULARITY
Because at the start of the game my main idea was to only implement one enemy type (which was pretty dumb tbh), i had to rework most of the map and battle logic so it was more generic and welcoming to multiple entities (and will help me add more enemies in the future).
BUG FIXES
VISUAL GLITCH
There was a bug for the most of the time in the game (an issue with unititialized variables being printed, which resulted in a visual glitch), which was actually a pretty easy fix (i had to change the switch statements that handle state input and drawing output a bit so that changing the gamestate doesn’t skip to drawing instantly)
MEMORY LEAK
Because of a dumb implementation of a function that was supposed to carry over the value of a variable in file A to file B which used pointers allocated with malloc i had a memory issue because in a common case i forgot to implement free which resulted in lost memory (the fix was actually just switching over to passing by value because it was just a single char being transported from file A to file B and passing by reference wasn’t necessary)
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.