
The game Scenes and their details.
The Game includes 3 main scenes.
-
The main menu
-
Play​
-
Options
-
Quit
-
-
Player world​
-
Player​
-
Player camera
-
Mass(health)
-
Weapons(projectiles)
-
Food
-
Enemy
-
Score
-
-
Game over menu​
-
Restart​
-
Quit
-
-
Miscellaneous​
-
Pause menu
-
Food and enemy destruction "animation"
-
​Different skins for food and player
-
Background music and SFX sounds.
-
The main menu is implemented using the UI tools in unity. A transparent canvas was created and the camera was linked to canvas. The 3 buttons were then inserted as children of the canvas and using a script the onclick action was assigned to each button. On play, the script loads the next scene (player world). On options the main 3 buttons are disabled and the options menu is loaded which contains SFX and music volume bars hooked to a script via which the user-selected volume level from 0 to 1 is constantly updated in the static class named background storing global variables. Furthermore, the player model is loaded and constantly rotated along Y-axis and 5 buttons with images of the skins are used to update the background data class for the user's skin material choice.
​
The Player world has two cameras one for the main player and the other for the minimap. Some UI elements are also used here, same options screen from the main menu scene and some text indicating player's health, score and high score. The main world itself exists on an invisible plane of 1000x1x1000 size. The objects are spawned between a range of 300 to 100 units away from the player. The world contains two main objects both have a spherical shape, the enemy and food. Both can be of different sizes, Food can range from half the player's current size to its full size and enemy can range from half player's size to double its size. The main objective of the game is to survive as long as possible. When a player collides with a food object its scale increases i.e its health increases. Over time the player's size decomposes back to the scale of 1. Furthermore, firing a projectile would also remove 1% of the player's current mass. Upon collision with the enemy, the player's mass is reduced and when the player's scale goes under 1 the game is over. On the collision of a food or enemy object, it is replaced by a "cracked" version of the sphere which is a bunch of meshes generated from the original mesh to produce the broken version of the object. Upon spawning the cracked object applies collision force from the center and with gravity disabled this creates a space effect of objects flying in every direction. If these pieces collide with the food they can make the food explode. If the Enemy touches food its size also increases but it does not have any decomposition over time. All the enemies move toward's the player at a random speed. The player's speed is determined by its mass, the higher the mass lower the speed.
​
Game over menu has only two options restart which take the player back to the main screen and quit which stops the application.