Thursday, April 4, 2013

Pollinator, Flower Defense - Hex Grid and Pollen Generation


I haven't posted anything here since my last update on my Pollinator project, and it's already that time again! I guess things have been pretty crazy around here, what with interviews, university group project work, and the beginnings of coursework. But I at least managed some time to work on our GDS game, and I'm pleased to report on the results.


Hex Grid Generation

Until now, we've been using a drawn on hex grid. That was fine, to an extent, but it meant we had no way to know if an object was on a hex and to snap it to the center of that hex. That clearly had to change, so I went about coding a hex grid generation algorithm. That in itself wasn't so bad - the more interesting issue was getting these hexes to generate in the editor rather than at run time, so that our designer could edit the level layout.

Luckily for me, Unity makes this really easy. I simply added a button to the editor menu to generate the hex grid.

In the future, I need to add a function that will drop any flowers placed on to the hex they are on, and the same for dropping bees onto flowers.

Pollen Generation

Last week I started the Pollen system by adding a UI display, but didn't get farther than that. This week, I added bee generation of pollen, which is displayed in said UI. Bees also stop producing pollen while being dragged, as intended.

Level Design

This week, our designer began work in earnest on our level layouts and spawn orders. Here's a look at one of the layouts:


No comments:

Post a Comment