11 July, 2022

LOX week 2

Continuing the r/rougelikedev 2022 code-along into parts two and three of the tutorial I start to diverge in a couple of ways.

In part two, I've been building up a lot of technical debt.  And in part three, I decide to compound the problem by turning the map generation system inside-out.

The technical debt is worrying me, and I explain it in detail in my notes for part-2 as well as in the rambling comments in my code.

In short, I still don't understand how to namespace my code, properly scope and export variables, or how to use classes for event handling.

I'm not overly worried about this, because I'm fairly certain that I can continue to get away with the same sort of kludges that I've been relying on for a tutorial project of this size  though I would like to get as much knowledge from this tutorial as possible so I am still looking for ways to refactor my work and get it back on track.

In part-3 I have decided to abandon the traditional fantasy dungeon map generation with a meandering collection of rooms.  I instead turned the entire thing inside out.  Rather than carving out rooms from a grid of solid walls, I decide to assemble some solid structures in an otherwise empty play space.

In short, we are going to make a space station here, out of a collection of modules of various sizes.  The modules will need to connect to each other at their end points, and maintain some sort of graph data-structure to know what is connected to what.  My current implementation is about half-done and a total mess, but I think enough of it is in place to move on with the rest of the tutorial and improve this as I have time.

Fingers crossed.

No comments:

Post a Comment