February Progress

I derived a new method of determining wall placement that will be easier to manage and apply to a variety of features. I first created macros that define each type of exit direction.

#macro up_exit 1
#macro right_exit 10
#macro down_exit 100
#macro left_exit 1000

Combining these macros results in four digit integers that can easily help define the type of room that has been created. For example, a room with a value of 101 would have an up and a down exit. A room with a value of 1010 would have a left and right exits. With the Hamilton generator, only two of these values would ever be combined, but the option is there for future expansion should the need arise.

One helpful aspect about these macro values is that they can be used for pulling template data from JSON files. There could be several templates for rooms with down and left exits, and the 1100 value will be useful shorthand for describing them.

Another helpful use for these macros will be generating the minimap, which is currently accessed by pressing the select button. Each section of the map can be quickly created and drawn to the GUI layer when the minimap is accessed. The current method involves finding all o_solid objects from the room and effectively redrawing the room with draw_rectangle() at a smaller scale. It does work but could be more efficient.

Leave a Reply

Your email address will not be published. Required fields are marked *