Hi. I’m Mirzero, and I’m a new-project-aholic. It’s been 3 days since I started a new project. I’m bad at finishing projects. A newer, shinier idea always comes up right when I’m struggling with an exceptionally uninteresting part of a previous project. I don’t think this is an uncommon situation in any kind of creative work, but it has gotten the best of me again. For example, now I’m writing a blog post about my new project, instead of actually working on my new project! Some part of me wants to show off what I do have, so far, though… perhaps it’ll help me stay motivated. Perhaps.
Anyway, the New Shiny this time around is hex-based maps. It’s an idea that’s been rolling around the back of my mind for a long time, but recently a few things have conspired to motivate me to do something about it. I’ve been inspired by several games; Civilization 6 and Hoplite are superb examples of the humble hex in action. I’ve also been inspired by other developers directly. Red Blob Games has a thoroughly exceptional article about all things hex that, though published in 2013, I only stumbled upon somewhat recently. Catlike Coding also has a more concrete exploration of hexes with a tutorial series around generating hex terrain similar to that used in Civilization. I’m not sure when this series started, but it’s still in progress.
All of these factors have come to a head recently, and I’ve decided that I want to work with hexes. Instead of building civilization managers, or tactical fleece recovery simulators, though; I’m aiming to build something closer to a dungeon crawler. A roguelike, though I’ve come to loathe the term roguelike these days. I’m saving some other, more complex ideas for the future.
In an effort to try and make this a project that I will actually finish, I’ve decided to try and start simple and more or less clone an existing game: Castle of the Winds. Aside from moving to a hex-based map, I’m trying to strongly limit the changes I make from the original. I’ve promised myself that once it’s complete I’ll go back and add all sorts of insane ideas I come up with along the way, but for now, simple is key. The UI will also probably change significantly, but only because it would be more work to emulate the Win 3.1 insanity than to build something simple with the Unity basics.
Borrowing heavily from the Catlike Coding tutorials, I’ve started to build out the procedurally generated maps. It’s extremely early days, but I can generate a map and throw a bunch of rooms on it:
So far, all it does is generate a bunch of rooms of somewhat random size and position, while ensuring that no rooms overlap, including borders. Grey hexes are walls, white hexes are floors of rooms, and blue hexes are the borders of rooms. The large blocks of blue that appear without a room in the middle of them are where the generator started to place a room but detected a collision and so abandoned it. The process is intentionally slowed down so you can kind of watch it happen… there is a 0.2 second delay between each room generation.
I also ‘wasted’ some time trying to figure out how to get a video of the generation that I could embed in the blog. Ultimately I used OBS (which I’ve used before) to capture the screen during generation. From there I used VSDC to edit the video; cropping it down so you only see the game window, and trimming the timeline to only show the generation process. I tried exporting to an animated .gif first, but no matter what I did (and I tried multiple tools) the quality was just garbage. Eventually I used the .webm exporter inside VSDC, and that has given me acceptable results.
Enough procrastinating; I need to go update the generator to put hallways between rooms. Perhaps I’ll actually write a post about that if I don’t get distracted by something else in the meantime. I wouldn’t hold my breath…