- Citadel: A TI-84+CE Roguelike [C]
- 03 Nov 2021 10:39:05 pm
- Last edited by kilo on 22 Jul 2024 06:12:46 pm; edited 3 times in total
Hey all, a few months ago I started on an Axe project that was inspired the Mystery Dungeon series as well as by this tutorial series:
The goal was to make a relatively simple graphical roguelike for the TI-83+/84+ calculators as well create general engine with code that can be reused for similar projects in the future. I have been working on it on and off, but this month I plan to get some real progress done. I'm hoping this thread will serve a few purposes:
First, keep me motivated/focused. I'm not sure if I'll complete this by the end of the month, but I would like to make a fair bit of progress and hopefully get it in a playable state.
Second, get some feedback. I posted a few screenshots in the Discord here and there but not everyone on the forums uses Discord. I'm hoping to have a bit more visibility and interest here.
Lastly, I'm hoping that I can use this thread like a sort of dev blog, detailing my progress and my thought process throughout. I also plan to make it completely open source once it is complete. If I somehow lose all motivation I plan on sharing the source regardless of the game's state.
So with that being said, let's start with what's been done so far (with complementary eye candy, every screenshot is in 6MHz mode):
This is the very first iteration of the tilemapper, complete with tile collisions. The code came from yunhua's tilemapper tutorial over on Omnimaga. It was pretty simple afterwards to make the game constantly loop over the player sprite animations Mystery Dungeon style. Once that was complete I went to work trying to implement a very rudimentary mob system. First step was to simply display a mob to the screen... which kinda worked.
I fixed the jittery-ness of the scrolling but I would learn later that I did not completely remove all of the bugs with displaying mobs. Next up was mob collision, which was basically making it so you can't just walk right through mobs on the map.
Initially this was pretty difficult for me to implement, but thanks to E37 over on Omnimaga I got it working. However, there was a problem that I knew I was going to have to deal with: speed. In this iteration, the tilemap was redrawn every frame. Which also meant that the more mobs I added, the slower the game would get simply by drawing them. This was without factoring in any other possible systems like AI. So my next thought was "how can I make this faster?" So I looked high and low through the forums, both Omnimaga and Cemetech to see if I could make the tilemapper faster. I found the answer in Runer112's YAAM and GRAYLIB programs. I spent the better part of a week reading through and trying to understand the YAAM source and the GRAYPKMN source to see how he was getting the speed he was. Eventually I was able to put together a nice and fast unaligned tilemapper that was not redrawn every frame. The code is pretty much entirely his, I just made a few adjustments/adaptations. The result?
With the new tilemapper up and running, adding mobs would no longer be as detrimental to the performance, so mission accomplished there.
I then spent about 2 days trying to fix the aforementioned issue with displaying mobs, which looked something like this:
There was supposed to be one mob added to the map in this screenshot, but it was displaying at least three times over. The fix was a pretty simple line of code that performed double duty: it prevented the mobs from repeating out of bounds, and it also made it so that mobs are no longer drawn if they are a certain range away from the player. This is pretty important for performance as well, as it meant that the game was no longer drawing mobs off-screen. From there it was simple to re-implement mob collision.
Thanks to Hayleia over on the Codewalrus server, I was also able to write a custom 4x4 font routine:
So what's next? Right now, I am designing the general gameplay. Currently my idea is to make the game around 20 or so procedurally generated floors with various slime types, each with their own unique behavior. Each floor will be 48x48 tiles in size. In terms of player progress, since the scope of the game is relatively small, I plan to have the player earn gold every time they kill a slime, and for there to be a shop (think Kecleon shop in Mystery Dungeon) for the player to buy items and weapons on every floor. This is still very much subject to change, and I have a few other ideas floating around in my head. Since the game won't have an XP or level up system, I plan to have the player increase their max health through purchasing an item from the dungeon shops. I am also unsure if I am going to include a hunger mechanic but I'm currently leaning towards yes at the moment. There will be an item throwing mechanic and I'm also thinking of adding a simple charge-based magic system. If you're familiar with Shiren the Wanderer, think staves. I think the combination of these mechanics will make for a simple yet interesting rougelike experience.
There's a lot of work to be done but the next thing I'm thinking of working on is either floor generation or making it so you can attack mobs. Floor generation sounds a little more fun so I might go with that.
What do you guys think so far? Any questions, feedback or suggestions? Thanks for reading!
The goal was to make a relatively simple graphical roguelike for the TI-83+/84+ calculators as well create general engine with code that can be reused for similar projects in the future. I have been working on it on and off, but this month I plan to get some real progress done. I'm hoping this thread will serve a few purposes:
First, keep me motivated/focused. I'm not sure if I'll complete this by the end of the month, but I would like to make a fair bit of progress and hopefully get it in a playable state.
Second, get some feedback. I posted a few screenshots in the Discord here and there but not everyone on the forums uses Discord. I'm hoping to have a bit more visibility and interest here.
Lastly, I'm hoping that I can use this thread like a sort of dev blog, detailing my progress and my thought process throughout. I also plan to make it completely open source once it is complete. If I somehow lose all motivation I plan on sharing the source regardless of the game's state.
So with that being said, let's start with what's been done so far (with complementary eye candy, every screenshot is in 6MHz mode):
This is the very first iteration of the tilemapper, complete with tile collisions. The code came from yunhua's tilemapper tutorial over on Omnimaga. It was pretty simple afterwards to make the game constantly loop over the player sprite animations Mystery Dungeon style. Once that was complete I went to work trying to implement a very rudimentary mob system. First step was to simply display a mob to the screen... which kinda worked.
I fixed the jittery-ness of the scrolling but I would learn later that I did not completely remove all of the bugs with displaying mobs. Next up was mob collision, which was basically making it so you can't just walk right through mobs on the map.
Initially this was pretty difficult for me to implement, but thanks to E37 over on Omnimaga I got it working. However, there was a problem that I knew I was going to have to deal with: speed. In this iteration, the tilemap was redrawn every frame. Which also meant that the more mobs I added, the slower the game would get simply by drawing them. This was without factoring in any other possible systems like AI. So my next thought was "how can I make this faster?" So I looked high and low through the forums, both Omnimaga and Cemetech to see if I could make the tilemapper faster. I found the answer in Runer112's YAAM and GRAYLIB programs. I spent the better part of a week reading through and trying to understand the YAAM source and the GRAYPKMN source to see how he was getting the speed he was. Eventually I was able to put together a nice and fast unaligned tilemapper that was not redrawn every frame. The code is pretty much entirely his, I just made a few adjustments/adaptations. The result?
With the new tilemapper up and running, adding mobs would no longer be as detrimental to the performance, so mission accomplished there.
I then spent about 2 days trying to fix the aforementioned issue with displaying mobs, which looked something like this:
There was supposed to be one mob added to the map in this screenshot, but it was displaying at least three times over. The fix was a pretty simple line of code that performed double duty: it prevented the mobs from repeating out of bounds, and it also made it so that mobs are no longer drawn if they are a certain range away from the player. This is pretty important for performance as well, as it meant that the game was no longer drawing mobs off-screen. From there it was simple to re-implement mob collision.
Thanks to Hayleia over on the Codewalrus server, I was also able to write a custom 4x4 font routine:
So what's next? Right now, I am designing the general gameplay. Currently my idea is to make the game around 20 or so procedurally generated floors with various slime types, each with their own unique behavior. Each floor will be 48x48 tiles in size. In terms of player progress, since the scope of the game is relatively small, I plan to have the player earn gold every time they kill a slime, and for there to be a shop (think Kecleon shop in Mystery Dungeon) for the player to buy items and weapons on every floor. This is still very much subject to change, and I have a few other ideas floating around in my head. Since the game won't have an XP or level up system, I plan to have the player increase their max health through purchasing an item from the dungeon shops. I am also unsure if I am going to include a hunger mechanic but I'm currently leaning towards yes at the moment. There will be an item throwing mechanic and I'm also thinking of adding a simple charge-based magic system. If you're familiar with Shiren the Wanderer, think staves. I think the combination of these mechanics will make for a simple yet interesting rougelike experience.
There's a lot of work to be done but the next thing I'm thinking of working on is either floor generation or making it so you can attack mobs. Floor generation sounds a little more fun so I might go with that.
What do you guys think so far? Any questions, feedback or suggestions? Thanks for reading!