top of page

Week 10 - Major developments in preparation for playtesting - 2

Preparation week 2

Once I had designed the map, I created the controls which would be used for mobile devices. Using the previously created player UI canvas, I added an image to be used as a joystick for the enemy movement. I then imported the CrossPlatform input tool script and attached this to my joystick, inheriting features from which into my Player Controller script. By adding my own adaptations around the inherited features, I could control the player’s character using the joystick. I added code to rotate the player’s character in the direction of movement. I additionally implemented acceleration and limited rotation speed to provide the player with a more realistic feel when interacting with their character.

As the CrossPlatforn input tools enabled me to implement multi-touch, I added a boost button which would be used to make the players character sprint. I coded the functionality of this in the Player Controller script.

In order to get an accurate visualisation for the behaviour from the player’s character, I implemented the previously created Lion character model along with its animations. I then set up a state machine within the Player Controller class and defined a state to be selected depending on the speed of the player. I then assigned a movement animation to each state which would play when certain state parameters were met.

I was previously using the base class to control the behaviour of each boid using a nested for loop. This however only allowed me to store global variables and control animals using parameters unspecific to the unique game object itself. To control the unique values of a boid I attached a script to the enemy prefab which held a unique instance of variables for the specific boid.

I created a reference to this script in the base class and was then able to manipulate the variable values of each boid independently. I was therefore able to further improve the enemy behavioural states by manipulating the behaviour of each boid independently.

Using the unique variable instances assigned to each boid:

I added various UI elements and created the functionality of each within the boid base class and Player controller class. These UI elements were as follows:

I created a scoring UI which would add the value displayed on each enemy hit to the score variable. This was created in the base class.

I created a player Energy UI and stored the related variables within the player controller script. This energy UI depleted steadily over time. Using a reference to this variable in the base class I set the energy variable to increase when the player attacked an enemy.

Finally, I created a new animal enemy with its own wander waypoints on the map. I adapted the variables such as speed, fear level and stamina to it.

In the next week, I will be focusing on developing the game based on the feedback received from those testing it. I plan to further implement a humanoid which will attack the lion in order to provide the player with increased excitement.


Recent Posts
bottom of page