🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

The development side

posted in CosmicConveyor
Published November 28, 2021
Advertisement

Now lets actually make the damn thing.(this is the hardest part)(This is made in unity btw)

First is the grid itself. A hexagonal grid. I will follow this tutorial: https://catlikecoding.com/unity/tutorials/hex-map/part-1/

Note that since the game is pixelated and pixels can't acurately do Sqrt(3), I will use this as a base.

base tile
Base tile

It is roughly a hexagon. And every sprite will be based on these tiles.

The grid will be based on a skewed cordinate system. Where 1 x unit means 1 hexagon up and 1 y unit means 1 hexagon up right (60 degrees).

Then I create a helper script that helps convert between world codinate and grid cordinate. With this, I can use a 2D array to store every tile in the map.

You can see how this plays out in the demo here: https://fetss.itch.io/cosmicconveyor

Previous Entry Plot
Next Entry The Conveyor System
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement