Description

You have to sort as many multicolored cubes as possible before time runs out.

Lecture Content

  • Random Function
    • The game needed a timer to insure the game doesn't go on for infinity otherwise the win and lose conditions would be useless. So I used the DisplayTime function which uses a float parameter in order to know how much time is remaining. This allows it to count down until it hits zero thus ending the game.
  • Function With Parameters
    • Knowing the menu and gameplay would need to be two separate scenes, the LoadScene function which uses a int parameter was added in in order to know which scene needs to be loaded. This was used so that when hitting the start or back button, the game would switch between either the menu or gameplay scene using their numbers from the build settings.
  • Function With Return
    • Once the mechanics were complete, I needed a system that allowed more cubes / toys to be spawned infinity at a certain number which is where the SpawnToys function comes in. It uses a return parameter in order to insure that the cube / toy spawner stays in a loop and doesn't stop when activated.

Creative Requirements

During development of the game, I was originally thinking of there being only two sections that the player would have to sort the cubes by. However after reworking the mechanics of the game, I decided to add an extra section making it three in total. I did this in order to spice things up and make it a bit more interesting. While the textures were not done by me, the factory model was made from the ground up in blender. After receiving feedback from my family about the game, I added in a trigger for when the cube / toy misses all three sections you get a wrong point.

This project was created for a college assignment.

Leave a comment

Log in with itch.io to leave a comment.