Tower Placement and Card Mechanics


This week I worked on creating a card system that allows the player to place towers. In doing this I created 3 basic tower designs and 3 basic enemy designs. The progress this week completes the main mechanics for players and towers.


Cards are draw from a deck of cards into a three sized hand. When cards are used they are placed into a discard pile which shuffle back into the deck when the deck becomes empty.

Each tower and enemy are made up of a core series of stats like health and damage which is modified for each type of tower or enemy.

The game keeps track of if a card or tower is selected. If a tower is selected or hovered it will show a outline of the towers attack range. If a card is selected or hovered it will move slightly upwards. To place a tower the game check if a card is selected and then it check if the players click is targeting any tower bases and then places a tower. A demonstration of selection is in the gif above.

The main problem I faced this week was learning about the different types of arrays unity offers in order to create a card system. This was difficult because I have only used basic arrays before and not C#'s in built List<T> Class. The selection and tower placement code went smoothly and without hassle.

Some feedback I received this week was to place marker which identify the direction enemies are coming and the point to defend. I believe this should be easy to accomplish with a two marking sprites I can place on track start and end. Another piece of feedback I received was about the tower bullets and that they are currently relatively inaccurate. I plan to fix this with a higher bullet speed or maybe a predictive shot.

Files

BaseMechanics.zip Play in browser
Apr 27, 2023

Leave a comment

Log in with itch.io to leave a comment.