Indie Game Dev Log: 19/12/2020 (Procedural Hexagon Grid Game Board Creation III)-Thumbnail

Indie Game Dev Log: 19/12/2020 (Procedural Hexagon Grid Game Board Creation III)

By Timanious | Coster Graphics | 19 Dec 2020


It has been about 7 months since the last time I've posted an update here about the procedural hexagon grid based map generator that I'm (still) developing and today I can finally say that I have implemented all of the functionality that I wanted to add, so now I can finally start with implementing it back into the game that I've created it for in the first place, which is a BattleZone inspired top-down arcade tank shooter.
I've worked on the procedural system for about a year, which for me is a long time to be focussing only on hexagons, nested loops and pathfinding algorithms.
To further develop my own turn-based game rules creation skills (because I can now finally start worrying about the actual rules for the game and not for the game-board) and also to give my eye-strained eyes some rest in the evening and to keep my sanity in check during another damn lockdown, I've also started playing a real physical board game called Terra Mystica, which is, you guessed it, also an hexagonal grid based game 😁
(I can totally recommend Terra Mystica by the way.)

Terra Mystica

Because some of the pathfinding stuff I had to program for the hexagonal grid 'BattleMapGenerator' script required me to come up with an algorithm for creating double and triple wide paths to the players i've also cut hexagonal shapes out of cardboard to play with on my desk and to stick to the wall, just so i could get my head around the logic for the programming loops etcetera. It really helps to have some physical cardboard cards or something when writing pathfinding algorithms!  
So I can say that I've fully immersed myself with hexagons this year.

What I've implemented since the last time i wrote about the procedural map generator is the simultaneous generation of paths from the center of the board to the player pieces on the board and also the generation of connection paths between visible and invisible 'empty' players.
I wanted to implement this system because I wanted to create alternative routes the player can take towards the enemy AI across the board and to create routes to different other enemy towers spread around the middle of the board.
I also wanted to create optional double and triple hex cell wide paths so the player can always 'dodge' the enemy AI when it comes close to the players position.
By creating the paths to the player and to the enemies I've also made sure that the random map generator doesn't generate cells too much just to one side of the grid, because I want every seed number to be playable:



I always try to create scripts with reusability in mind so I've also spend a lot of time making the system as generic as possible because who knows, maybe I can use it for more than just one game. I quickly tested the generator with different prefabs just to see what it would look like if the paths were rivers and if the cells got their height based on the steps away from the center creating a mountain shape. It kinda gave me a vague idea for a turn based Terra Mystica inspired mountain conquering game or something, so I guess that is something I can work on after the tank shooter game is finished😃:

Procedurally generated hexagonal grid based mountain with rivers.

That is it for now, hopefully next time I can show a bit of how the BattleMapGenerator is implemented in the tank game.

✌️

My Other Posts - https://www.publish0x.com/coster-graphics
Blog - https://timcoster.com
Twit- https://twitter.com/timcoster
T-Shirts- https://www.teepublic.com/user/timcoster



  

How do you rate this article?

2


Timanious
Timanious

I'm an independent artist, teacher and game developer from the Netherlands. I love learning and writing tutorials about game design with Unity3D, programming and shaders. Feel free to visit my graphics blog at: timcoster.com


Coster Graphics
Coster Graphics

Coster-Graphics Game development and design tutorials and graphics

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.