My immediate first reaction to selecting nodes for points of interest was just to randomly select distribution (maybe try to make it more uniform) across all of the voronoi polygons.
However, the random numbers look clumpy. Humans prefer random to be far more uniform than it actually typically is. This was 50 out of 500 random spots (excluding the ocean).
Also, those are pretty tiny spots. I suspect I’m going to want to have visual voronoi be slightly different than my actual nodes.
So I had an idea. Why not have two voronoi networks — one for map nodes, and one for terrain? (Ignore the dots)
The overlay voronoi ensures I have evenly distributed nodes at a high level, but my terrain can be detailed.
I went ahead and implemented this voronoi system and even added a terrain ownership link, so a node knows which parts of the other network it represents. Now I have a uniform set of nodes, but my terrain can be varied. I can even write little scripts to create coastal cities if I wanted.
This approach even works pretty well for a cluster of beaches/islands:
Traversing between nodes
All right, now it’s time to use this higher level voronoi’s delauney’s triangulation to create my paths.
I started with all of the paths. Obviously, this would make navigation a bit too trivial. There wouldn’t be branching paths or edge branches. I should cut some paths intentionally.
I also decided to add a “type” and give random placeholder icons (emphasis on placeholder):
However, it’s also important to add mechanics for mass teleport! I added a placeholder castle icon to show it hovering over the current location.
If we decided to do multiplayer, I love the idea of a whole swath of players all with individual castles flying around a map with little markers like this. If you run into another player, you battle it out.
You can see the castle hop around between levels, revealing the node pathways. I think this works well enough for a prototype, though visually leaves much to be desired.
Changing maps
All right, now for the hard part.
Up until now, the current map couldn’t actually change (though I had test maps). Now I need to be able to unload a map, move the player’s castle, and reload the next map.
I just built out a quick map with the editor and associated it with a particular node. No teleportation animations and the castle doesn’t come with, but I have the framework to swap map state.
Part of the reason castle moving became difficult was that I haven’t actually defined what a castle is. It doesn’t even have health yet.
So, I think this gives me enough of a map system that now I need to improve core combat more.