- CSE Roguelike
- 11 Mar 2015 11:04:19 pm
- Last edited by Unknownloner on 11 Mar 2015 11:07:54 pm; edited 1 time in total
I finally got SDCC (a C compiler) up and working for me with the CSE, and wanted to try and make something with it. I got some characters displaying on screen, and figured why not try to make a roguelike.
Here's a screenshot of the current program. Don't mind the character flickering, that's just jsTIfied's screenshotter being weird.
My plan is for the level generation to generate a room by picking a template from a set of pre-created templates, and then fill that with various objects, dig out doorways, etc. One could explore a floor until they take the stairs down to the next floor. The stairs would have a percent chance to appear in each room (increasing over time) if they had not appeared yet on that floor, or else they would be forced to generate if the player explores enough of the floor that the calc doesn't have enough memory for more rooms.
Room templates are stored 2 bits per tile, and RLE compressed (the RLE compression doesnt save that much space though so I'm considering removing it since it probably adds more space in code than it saves.)
Rooms store a pointer to a room template and the 4 rooms surrounding it (if they exist). Right now doorways are pre-set in the templates but later they should be dynamic.
I haven't thought about what sort of stats / items / creatures should be in the game yet. Going to be your stereotypical medieval fantasy world though.
Each floor will probably have different FG/BG colors for the world, and different wall types.
I want to have objects in the world you can interact with, like fountains that restore your stats, teleporter pads (maybe), that sort of thing.
I'm planning on sticking with the text graphics for as long as I can (maybe forever?) but I might switch to a custom font routine later if I'm really in need of speed, or create a custom font hook if I just want to add some specific characters in.
A few random technical details:
► It's a DCSE program right now
► It uses the OS text routines. (writing to textShadow / pixShadow is turned off though)
► The current room is stored decompressed, switching room requires re-decompressing the data. It's considerably faster than actually displaying it though usually.
► I wasn't entirely truthful about using the OS text routines. It has a custom routine for the space character that calls DCSE'S ColorRectangle with the background color to speed things up.
► The 4 types of tiles are ' ', '-', '|', and '+'. the '=' is generated dynamically based on if a tile is completely surrounded with filled tiles or not.
► It's called CHESS.8xp, because I was originally going to make Chess, but realized that I don't feel like learning how to make a Chess AI, and Chess has a ton of rules anyway that would be annoying to program in. I should probably rename it at some point.
Here's a screenshot of the current program. Don't mind the character flickering, that's just jsTIfied's screenshotter being weird.
My plan is for the level generation to generate a room by picking a template from a set of pre-created templates, and then fill that with various objects, dig out doorways, etc. One could explore a floor until they take the stairs down to the next floor. The stairs would have a percent chance to appear in each room (increasing over time) if they had not appeared yet on that floor, or else they would be forced to generate if the player explores enough of the floor that the calc doesn't have enough memory for more rooms.
Room templates are stored 2 bits per tile, and RLE compressed (the RLE compression doesnt save that much space though so I'm considering removing it since it probably adds more space in code than it saves.)
Rooms store a pointer to a room template and the 4 rooms surrounding it (if they exist). Right now doorways are pre-set in the templates but later they should be dynamic.
I haven't thought about what sort of stats / items / creatures should be in the game yet. Going to be your stereotypical medieval fantasy world though.
Each floor will probably have different FG/BG colors for the world, and different wall types.
I want to have objects in the world you can interact with, like fountains that restore your stats, teleporter pads (maybe), that sort of thing.
I'm planning on sticking with the text graphics for as long as I can (maybe forever?) but I might switch to a custom font routine later if I'm really in need of speed, or create a custom font hook if I just want to add some specific characters in.
A few random technical details:
► It's a DCSE program right now
► It uses the OS text routines. (writing to textShadow / pixShadow is turned off though)
► The current room is stored decompressed, switching room requires re-decompressing the data. It's considerably faster than actually displaying it though usually.
► I wasn't entirely truthful about using the OS text routines. It has a custom routine for the space character that calls DCSE'S ColorRectangle with the background color to speed things up.
► The 4 types of tiles are ' ', '-', '|', and '+'. the '=' is generated dynamically based on if a tile is completely surrounded with filled tiles or not.
► It's called CHESS.8xp, because I was originally going to make Chess, but realized that I don't feel like learning how to make a Chess AI, and Chess has a ton of rules anyway that would be annoying to program in. I should probably rename it at some point.