🚙 RaceTrack
3 min read

🚙 RaceTrack

🚙 RaceTrack

My classmates and me have developed a game called RaceTrack!

The underlying idea of RaceTrack is a round-based racing game where players have to strategically choose their next move out of multiple reachable positions. These positions are calculated based on their previous turns and the position of other players. As the game calculates the selectable moves for each player based on their previous choices, the game gets more interesting and challenging with each passing turn.

Track Day
Photo by Sari Fayomie / Unsplash

The players will be needed to demonstrate all their strategical and thoughtful decision-making skills to be able to beat their opponents. As the game is based on the original pencil and paper game Vector Race (also known as Vector Formula, Vector Rally, Vector Race, Graph Racers, PolyRace, Paper and pencil racing, or the Graph paper race game), the game can also help to improve the foresight thinking and basic understanding of vector mathematics of each player.

Our Game

RaceTrack has many fetures which make it more fun than the traditional pen and paper game. With the option to save running game sessions or diffrent game modes RaceTrack will sure be a hit among friends or families.

Excited for our Game? Get an early preview on MacOS or Windows!


Code Implementation

RaceTrack implements a custom alteration of the MVC Pattern, which can also be taken from the package structure in the source code itself.

Package com.pathfinder.racetrack.controller

A GameEngine represents the brain of a game session, each game mode (currently three in total) extends the abstract class GameEngine with its own extensions. There are currently three game modes available.

Player input through the GUI is handled by the controllers. Each controller is responsible for a different section of the GUI (e.g. StartMenuController for input in the main menu), except for the SceneController, which manages what menu is currently viewed by the player.

Implementation_Code_Controllers

Package com.pathfinder.racetrack.model

As per layered architecture, the models are being updated through the controller, a GameEngine in RaceTrack to be exact. But there are still some connections and dependencies between the models themselves: e.g. Velocity and Coordinate both extend the abstract class Vector, which are used by Car, which is also owned by a Player.

Implementation_Code_Game-Modes

Package com.pathfinder.racetrack.view

The View package currently only holds the classes Jukebox and MapPainter, which are both only supporting classes for the actual user interfaces (Jukebox for adding sounds effects and MapPainter for drawing the playing field).

Implementation_Code_View

The actual interfaces are being builded by JavaFX through .fxml files, which are located in the resources directory in the source code.

Source Code

The complete source code (including Unit Tests) can be found attached to this documentation Solution-Architecture_PSIT3-FS20-IT18ta_WIN_Team5.zip or on GitHub (https://github.zhaw.ch/PathFinder/PSIT3-FS20-IT18ta_WIN-Team5).

Project Documentation

A detailed documentation about the project as part of the PSIT3 module can be found below.