← All projects Apps and web

Roller Ball

Desktop game, Unity

Control a ball, stay on the platform, collect the coins. Simple to play, and a clean exercise in game state.

Unity3DC#

Roll around a platform, pick up coins, and do not fall off the edge. Clear the coins and the next level loads.

Game state

Everything runs through a game manager built on four states: playing, death, level complete, and game over. The update loop switches on the current state, which keeps every transition in one readable place instead of scattered across the objects.

The update function and its state switch.

The project in the Unity editor: scene and game views on the left, hierarchy, project, and inspector stacked on the right.
The project in the Unity editor: scene and game views on the left, hierarchy, project, and inspector stacked on the right.

Gameplay

← Snake