Jetpack Dinoride
This game was the subject of the final annual project for my Computer Science Bachelor's Degree, which I worked on with two teammates.
Time constraints prevented us from completing the game as we would have liked, so please forgive the unfinished aspect of the game.
The Computer Science program is not a video game development course. Therefore, this project was a challenge and our first concrete experience in developing a complete video game.
Our goal was to recreate the game Jetpack Joyride in Unity and implement bots, as well as a system for collecting and analyzing gameplay data to compare the performance of different bots.
The game assets were created by us. Dino, the mascot plushie of our class, represents the game’s avatar.
To make our game moddable and easily customizable, we opted for the most modular architecture possible, heavily relying on the Observer Pattern and Singleton Pattern. This allows users to easily inject new bots into the game.
Game Concept
The player, whether human or bot, controls their avatar with a single command: ascend. The player can activate the jetpack to gain altitude or deactivate it to descend.
The level scrolls automatically, and the player must avoid obstacles using the jetpack.
Obstacles include patterns of yellow lasers, missiles, and penalty coins, which decrease the player's score on contact.
The player's score increases over time and by collecting bonuses.
The player is eliminated if their score drops to 0.
Before each game session, users can access a configuration screen to set the following parameters:
- Which players are enabled (bots, human player)
- Number of rounds, session duration, maximum distance per round
- Which elements are included or excluded from the level
- Generation seed parameters
A dialog box provides explanations for each parameter when hovered over.
Throughout each round, gameplay data is collected: player scores, generated obstacles, obstacles hit, time spent in the air, etc. This data is stored in JSON format.
A statistics interface is dedicated to analyzing the collected gameplay data.
The data is grouped by session. The graph can display up to 4 rounds from the same session simultaneously, showing the score evolution of each player over time.
More analytical graphs were planned but could not be completed due to time constraints.
The Bots
During game configuration, one or more players can be selected to play simultaneously. The options include the human player controlled by the user and three bots with different concepts:
Three bots were implemented in the game:
- The Observer: This bot relies on raycast analysis to simulate a field of vision. Its functionality is based on a neural network implemented using the ML-Agents library. The bot underwent a training phase to achieve its current performance.
- The Iterator: This bot uses algorithmic reasoning instead of a neural network. Initially, the goal was for it to perform multiple calculation iterations to determine an optimal path using the min-max algorithm. Due to time constraints, we revised the concept to create an algorithmic version of the Observer bot. The Iterator uses multiple raycasts, and predetermined weights for each ray allow the algorithm to choose the safest trajectory. This bot is the most efficient of the three.
- The Omniscient: Initially, the plan for this bot was to create a neural network fed with extensive raw data about obstacle positions, player location, relative speeds, etc., in hopes of generating effective survival behavior. Due to time constraints, we only managed to implement a completely random trajectory, making this bot the least efficient and most disappointing.
Leave a comment
Log in with itch.io to leave a comment.