Pointer Fighter (C based)
- 17 Devlogs
- 30 Total hours
Roguelike dungeon crawler (i guess room crawler) with an RPG like battle system completely built in C !!!
Roguelike dungeon crawler (i guess room crawler) with an RPG like battle system completely built in C !!!
#LOG 17: DEBUG MODE FOR FASTER TESTING
I added a debug mode because i found that most of my testing time was wasted finding items or players in rooms (which was very annoying most of the time), so i added a debug room so that goes way faster. Though it is very useful it was somewhat hard to implement but it made the code modular the same way the enemy logic is modular now which is an improvement in two ways
New “Modulo” / % enemy (based on the modulo operator in c)! It has weaker stats but is way stronger in terms of attack power
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).
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)
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)
A feature that was originally used for debugging has turned out as a good feature for the game overall. It always displays your and the enemies HP, and attack power (even though the attack damage is partly random which i have to note somewhere so there will be no confusion)
There is only one item to be used in the inventory right now so you can only see what the heal item does but more will be added in the future.
There was an issue with unsafe memory access if the items in the inventory where bigger than 10. My fix is that if you have more than 10 items and you pick up a new one, the new item will replace the first item, the next one the second one etc. It also resolved a smaller issue with blank inventory space that ate up inventory space even though it was empty.
The functions responsible for changing your hp, healing you or making you stronger hat an issue with their pointer assignment (they were pointing to the wrong variable) which i fixed for all function which work great now.
Because of something what seemed to be a typo (a function returned 1 instead of 0), if you tried to go through a door and you haven’t beaten every enemy, instead of nothing happening you got a free item (which turned out to be a great testing feature for items, because i can get many items fast and easily). The fix was really easy (just swap the 1 for a 0)
Because of a badly implemented function i added in the past which turned out to be completely redundant (got cut out) the current hp weren’t imported properly to the function that handles printing out the health bar which i fixed by using another variable responsible for storing the current hp of the player
After having to audit most of the code again i noticed that there were some issues with the code (partly because it was fine as it was when it was written, part was just sloppy implementation) which i also fixed even though most of it was minor.
Im planning to add more and stronger enemies in the future even though that will probably will be one of the biggest newfeatures as it requires rewriting most of the battle and map logic
LOG 14: Made the items more interactive and functional (items can now be picked up or ignored and will vanish if either is done) and i built a somewhat functional inventory accessible only in battle as of right now. I also had to clean up a bunch of code and had to re-implement some stuff as i implemented some things rather poorly before. There are still some things to be made a bit cleaner which will come in the next few devlogs but i felt like posting one for the current state of the game.
LOG 13: Added items that are supposed to give you power-ups in the future. currently they dont really do anything except open a screen with a sprite for the corresponding item (SPRITES ARE AI GENERATED). The plan for the future is to deicde between regular and activatable items (the first give permanent buffs, the second can be activated) and to be able to choose the items while in battle. For now they can spawn on the map (anywhere except 1|1 and spots where enemies are) and open a random sprite of the 3 that are available right now!
LOG 12: This came quicker than i thought it would lol. I implemented the two things i spoke about in the last log. I added a highscore system so you can always see how far you came with beating the evil pointers and i also “locked” the rooms until youve beaten every enemy in the room. I plan on adding power ups and some other features (read the README in the repo). STAY UPDATED!!!
LOG 11: Im Back. After a short break i started to implement that enemies really “die” if you beat them! Now there is some kind of progress added into the game as you can actually beat the enemies!!! The next features will probably be a real highscore and restricitions in leaving the room until youve beaten every enemy. Till then stay updated!!!!
LOG 10: Added multiple enemies (dynamic based on room size) and stats get reset after battle. Battle still issnt finished yet as i think of two more things to add for every one thing i implement. Stay updated !!!
LOG 9: Battle now works better and you can see enemy h now. Code is way less tangled (though some stuff still needs to be improved and the battle still isnt fully polished). There are some bugs regarding memory right now (will be fixed ASAP). But as of now you can finally really battle the evil evil evil pointer!
added the first implementation of working battle (taking and dealing damage, working health bar)! The main issues right now are that the code is a bit tangled and that the logic isnt polished at all. But after 2 hours of work i felt like i had to post a log so this is the current state (you can attack or try to run) (winning and running have the same effect as of now)
Kinda added a battle screen (not reactive yet but will happen soon) and made the ASCII designs for my characters with AI (i cannot make any good ASCII art sadly :( … yet). In the top left is what is supposed to resemble a health bar which also still needs to be implemented. Also made the code a bit cleaner added a few header guards and most importantly i added structs for the entities so their stats could be recorded. Thats it :)
Added a (somewhat) functional menu screen to view highscore and start the game (highscore function will be implemented soon!!!!. Also built the first prototype of the battle screen though it is no where near finished. I will probably make the menu screen a bit prettier in the future but the current design has to suffice for now. :)
Added “Npcs” (evil pointers/ampersands). Collision yet have to do something relevant (right now they only trigger a new room). Also fixed a few memory unsafeties.
Implemented doors (currently a minus sign probably going to change that). If you collide with said door/minus sign you will enter a new, different sized room. I did that by choosing a random wall, a random spot on that wall which is the spot where the door will be and if you make contact with the door a new room will be initialized.
Added collision checks for walls so you cant escape the rooms
Implemented functional Walking (even though there is no real border yet). I also fragmented the code a bit so its more readable!
“Roguelike” “Game” in C (neither of them has begun to be implemented. But i guess i have set up the very basics as of now