With the new map systems designed, I started doodling sketches of possible maps to decide how to generate maps with the new style. Since everything is node based I could have mapped out the sketches to allow for 5+ node connections something like this:
Roads represent node connections. (does not actually contain 5+ node connections)
But pretty quickly settled on 4 node connections max for the sake of clarity in-game. I was actually heavily considering a tile-based representation of the nodes like this to be used internally:
Not represented in these doodles is that not every node need be connected.
With a system like this the number of nodes a node is connected to can be discerned at a glance just by how many roads are coming out of it in each of the 4 directions. It wasn’t until later that I decided to just use the existing zone generator, simply because the tile-based style would take more time.
Under the tile based system I basically decided upon 3 common map patterns that seemed most useful to generate off of:
Linear Branches
A very simple system. Primary, long paths are generated. Off of them smaller, also linear branches are generated. Creates a sense of peck and hunt. Most player traffic gets focused on the long path, while going down the shorter paths creates a sense of searching.
Planes
A whole bunch of 4-way connection nodes clustered into one area. Players end up relatively close together most of the time, and it’s a bit of a slog to get to the extremities.
Loops
A classic board game layout. You’re either going one way or the other most of the time.
There’s not a whole lot of deliberate map design with just these 3 patterns. When’s the right time to use a loop? a plane? I don’t know yet. Just slap ’em down randomly and make sure there aren’t too many node jumps from the town. The placement of specific nodes has a little bit of thought in it: dungeons should block out further areas, healing fountains shouldn’t be too close to town, etc. For the time being this will have to be sufficient. My main goal is to get a basic generator up and going in order to have sample data for the rest of the new systems to work with. Maybe it’ll be good enough, maybe it won’t. I can build upon it later.
So I moved on to adding these patterns to the existing zone generator. And immediately ran into a terrible wall: the zone generator was never really meant for patterns as exacting as the loop, which requires zones to placed in a very exact way such that the final zone in the chain will connect with the origin zone. All the zone generator every really cared about was creating a zone off of the side of another zone, and allowed for a tremendous amount of random drifting. For the time being the fix is to place down guiding zone lines for each zone in the chain and disallow the random portion of the zone from spreading beyond the line:
This makes for way stiffer zones. There are various ways to diminish the effect- make it so the line lengths are distributed differently between lines (ie, for a total line of 6, the individual zones lengths could be 1,3,2). But right now I don’t really care, it makes it more readable anyway. The other problem is that it only really supports loops that start and end on the same node. Creating a double loop isn’t really available yet in this system. The short comings of the zone generator have come home to roost. The code changes required to make this work were incredibly nasty as well, and I am at a loss for a better way to do them.
Next week I will probably deliberately ignore the shortcomings of loops and implement the other two (much simpler) patterns and start generating the actual nodes and their paths and maybe rebuild the movement system for node movement I don’t know we’ll see.