Gamedev Blog

Table of Contents





Fixed a function call in main.c.



After losing like 7 matches in-a-row on hearthstone, I’m gonna take a break and do some gamedev.

Attempting to compile yielded errors I failed to take care of last time.
I haven’t properly tested the is_dungeon_floor_empty() function that I added last time, heh. Go figure.
Realistically, the function name doesn’t properly describe what it does.
We should rename it to something more appropriate…
is_dungeon_floor_all_void_tiles(d) sounds like a hot ticket.
All fixed.

As the process is a natural advancement of existing primitives, we must have a primitive function that helps us build our dungeon in some way.
Such a function might be called create_room_in_dungeon(y,x,h,w,d).
As this is a primitive function, it will need to have a lot of checks in place.
However, to start with, we can do something stupid/simple.
Lets just lay the defined region (y,x,h,w) with tiles.

Our function is created and the simplest implementation tested.
Now, lets break stuff!

Sweet…I’ve updated the function to include a simple boundary check.
If I attempt to create a room outside that boundary, an assertion will fail.
This is a good stopping point for now.

Realized that I named that function poorly as well!.
Renamed it to create_room_in_dungeon_floor.
Taking another break now at 2:22am.



I’ve began working on the game again. Today, I’ve moved the dungeon object code out of the main repo folder and into its own folder for rapidfire “proper” development.
Determining dungeon-generation algorithms and actively experimenting with creating them as well as evaluating each generated dungeon’s viability will be next steps.
We will want to generate a dungeon_floor that has an upstairs and downstairs tile, at minimum, such that we can consider these tiles “entrance” and “exit” tiles.
The reason for this is so that we can run simulations on these floors so that we can actively “score” or evaluate a particular dungeon generation.
The reason for ALL of this is that we are building the groundwork for an advanced dungeon-generation procedure, but in order to do that, we must have a concrete model.


I’ve started the github repository for my dungeon tools.

After glancing over this link: Procedural Dungeon Generation Algorithm (gamasutra.com),
I feel like I need a function to verify if a given dungeon is filled with empty (void) data or not.

So, I am going to add a function to my source that does this.