Posted on

Game Progress

I made a hexagonal grid, I did!

That is a screenshot of a 100×100 grid of hexagons.

The hex system is handled as a 2D vector of Hexagon objects in a Board class that keeps track of them all. Each hexagon has its own location that gets calculated based on its index in the 2D vector (thanks to some math from this smart dude). Each hexagon also has an array of 6 pointers that point to whichever hexagon is adjacent to each of its 6 edges. Border edges are represented by NULL, and more code will be needed to keep our (eventual) characters from falling off the edges of the world. The framework is there though!

The Board has a node in the scene graph and each hexagon has a node that is a child of the Board node.

Here is screenshot of my beautiful hexagon placeholder.

Hexagon Pun


About David Grenzowski

i play videogames and then i write about videogames i am mad videogames

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s