Hex Grid Worlds
Repurposing hexagon grid board core logic from Hextopia with an aim to building the foundations of a new game.
With vague ideas about a game with stages based on procedurally generated platforms bouncing around in my head, and with an off-the-shelf voxel engine not looking like quite the right sort of thing for what I had in mind, I set out to see if I could build deformable hexagon-tile based platforms instead. I succeeded at this, but in the process realised that for gameplay purposes I was actually more interested in building a solid data structure underlying the terrain to power systems and to help shape worlds that were interesting to play as much as they were to look at.
Confession: I may be addicted to starting projects.
— Jez 🌻 (@NinjaJez) February 5, 2020
Also hexagons.
I just finished up re-purposing hex grid code from a previous frozen project to form the basis for a re-vitalisation of my languishing turret project.
This is to procrastinate from my spaceship project.
Sigh. pic.twitter.com/x6Kgkv3sCJ
Might not look like much, but I've managed to learn how to combine meshes in #unity3d, making this vastly more efficient to render than when each tile was its own mesh!
— Jez 🌻 (@NinjaJez) February 13, 2020
Going to be a challenge to allow this to be modified at runtime, but so far so good... pic.twitter.com/4SnRKT3PGY
Today in #SideProjectMonday: not only managed to work out how to modify combined meshes at runtime to adjust a specific tile, but also how to address a tile given a click at a location! :D pic.twitter.com/R1mBFGKow1
— Jez 🌻 (@NinjaJez) February 17, 2020
Doubling the radius of the board made the runtime collision mesh generation brutally slow - until I adjusted the cooking options! Looks like I can now modify the collision mesh in real-time ^_^ pic.twitter.com/6HE2UfPQS9
— Jez 🌻 (@NinjaJez) February 22, 2020
Added a simple little tile selection indicator, and fixed the issue where selecting the edges of a tile could round to the wrong tile position :D (see the first video in the thread where the wrong tile changes height when interacting on the wall!) pic.twitter.com/Z3Pg7jqkdr
— Jez 🌻 (@NinjaJez) February 22, 2020
Final update for the day: NOW WITH ADDITIONAL TURRETS!
— Jez 🌻 (@NinjaJez) February 22, 2020
Yes, this was secretly Turret Project 2 all along!
Added a little preview ghost, with rotation. Surprisingly involved to create the preview mesh, as the turret is split into multiple gameobjects! pic.twitter.com/cqknRJ8ZL8
Today in #SideProjectMonday: RADIAL SYMMETRY!
— Jez 🌻 (@NinjaJez) February 24, 2020
Took me a little while to come up with a mass and height algo that did what I wanted, but this is a good starting place from which to start developing my ideas ^_^
I also really need to find a better texture...#MadeWithUnity pic.twitter.com/eU4GHfDizp
Weirdly, I've just spent the evening turning my world generator from the first output to the second...
— Jez 🌻 (@NinjaJez) June 11, 2020
It's a lot less dramatic atm, but now the data is more structured, conceptually separated into platforms (grey) and boundaries (black). pic.twitter.com/VfKPCDjgqS