LOG 21: FOG OF WAR, HOMING ENEMIES, BATTLE LOGIC OVERALL AND BUG FIXES
FEATURES
HOMING ENEMIES
The enemies now home on you with every step you take, meaning you actually have to think about where you will go or the enemies will catch up to you. This was implemented by adding a sign function that decide whether the enemy should move +1 or -1 and then moving the enemy by that value. There were some bugs regarding enemies in previous rooms which got fixed by resetting the whole array during map init
FOG OF WAR
I added a fog of war feature that obstructs everything in the map you
haven’t explored yet. This also pairs very well with the homing enemies
feature. You have to go around the map to look out for items and enemies
which now also walk towards you, so every step matters now
BATTLE LOGIC OVERHAUL
After revisiting most of my code for commenting i realized how terrible most of my battle logic was so i made it a bit more efficient and most importantly more readable. Overall i realized how great switch statements are in the last few logs
BUG FIXES
DOOR BUG
There was a bug with the map that was somewhat useful when testing but still was a bug. The issue was that if you tried to step into the door the game let you step onto that char. The issue was that i forgot to make the game think that the door (when closed) should behave exactly like a wall. So the fix was just to add the door char to the wall collision check function
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.