🚙 RaceTrack
3 min read

🚙 RaceTrack

🚙 RaceTrack

My classmates and I 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.

Features

  • Smart detection: Load any image as a race track! Game objects like finish line or roads will be detected automatically.
  • Multiplayer
  • Save and Load Game States
  • Any many more

Our Game

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

Excited about 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.