This week there were a number of concepts covered in the lecture some of which would be useful to the assignment. The first concept covered was game states, these are different states that the game can be in when it is running and can be useful for game development. Game States could be used to indicate whether the game is idle or running, or it could be used to indicate to the player what type of running state the game is in. For the future I would like to attempt to run a game through multiple run states, for a turn based game, game states are highly applicable, they can be a different state could be used for each section of the game. (i.e. choose characters, player turn, actions resolved, player turn etc.) Using game states the allows us to create a base for the game allows us to distinguish between each game state and allow to set up/change the state of the game between each one (i.e. UI, character states, actions). Finite State machines are not an inbuilt function of unity and therefore we would need to create one ourselves or import from a third party resource, an example of a third party resource for finite state machines can be found here. Example code:

The second concept that was covered are simple global events, there are events which when triggered tell all of the listeners to run their functions. Unity has their own inbuilt event system that can be easily utilised and applied to a game project. This is especially useful for games in general, however as I am currently working on a turn based game lets have a look at examples for turn based games. Hearthstone is a card game where players take turns to play minions or spells in order to kill the other player. Hearthstone being made in Unity, you can possibly assume uses some of the event management systems, and some possible events that happen in the game are:
- Start of a player’s turn
- End of a player’s turn
- When a minion dies
- When a card is played
- When a minion is summoned
- When a minion attacks
This event system could be used in my future projects for turn based systems or other games. There are many possibilities for using events in my game and I will most likely have to use them in the future and therefore it would be a good idea to learn how to use it now.
In addition, to study from class I continued to work on the documentation for the assignment and initialise the repository. I managed to work out what type of units I would want to have in the project. I thought about the units having different types and attacks having types as well, and some types would be more effective against other types and less effective against other types. This system is similar to Pokemon having multiple different types of Pokemon, however due to the scope of the project I decided to have only three types, rock, paper and scissors, these types are part of everyone’s general knowledge and therefore if they play the game they would know what types would be effective against which types.

Leave a comment