
Innovate / Suits Tower Defence / Log #6
Tower Selection
Unfortunately this entry was a little delayed as I only got a little done on my dev night for each week, and it didn't feel right to write individual articles on something so short. So this log contains the results of both weeks.
I started by removing our placeholder towers while we are now navigating past a prototype into a a proof of concept. I updated our grid tracker to hold a state of each grid so we can tell if it is occupied, vacant, or if we are just visiting. This helped us a great deal with handling how we move off of hover and how we manage the over all system.
I then made it so when you click while on the grid, it will permanently place the tower on the grid tile and enable its functionality. I also gave a little life to the hover and made it so that when we hovered over a tile, it would automatically look towards the entry portal.

Today I created some sketchy UI. I set one of the boxes as a button with some crappy art of our tower. With this 'middleman', I re-engineered the tower placement mode. Enabling tower placement now brings the grid tiles to life with their hover effect that we are now used to, however no hovering will take place if you glide the cursor over the tiles. Instead, it will render our new menu and wait for you to click on the tower you want to place. Once you select it, the placement functionality will resume the same way it was originally.

So yeah, nice, one step in the right direction! We have now fabricated the idea of a "tower placement mode", which gives us the functionality of selecting a tower and placing it on the map. There are some refinements that could be added to make it more dynamic and some nice little polishes that I could add, but they are lower on the priority list.
The code is merged into source control. God natt mine venner!
