Mini Car Racing

Programmer, Developer | Core / Systems
(Android , Made with Unity3D )

Play Video
  • Store Page: Google Play
  • Platforms: Android
  • Studio: Terafort
  • Role: Game Developer
  • Tools: Unity, C#
  • Release Date: June 2018

Technical Overview

The Mini Car Racing game offers two different game modes: The Endless Runner and The Arcade Racing Mode. Initially, I worked in a team of two developers to create the necessary systems for the endless mode. In this mode, traffic and obstacles are generated dynamically across five lanes, ensuring that no dead ends are created and there is always enough space for the player to navigate through the traffic. To handle the behavior of the traffic, we implemented a Finite State Machine, which reduced the chances of bugs related to the states and also made the code more modular and readable.

The Finite State Machine utilized a state pattern, as there were a limited number of states that were not overly complex, making it a suitable choice. We applied a similar approach to the player controls, although we designed the states in a way that they didn’t complicate the Finite State Machine. For example, power-ups like boost, magnet, and turning left/right didn’t have their own separate states.

To ensure smooth gameplay in the endless mode, we minimized the use of physics and avoided dynamic rigid bodies. We believed that even the slightest stutter could negatively impact the player’s experience and potentially end their game abruptly. To achieve this, we employed techniques such as pooling, caching, and carefully optimizing lighting.

On the other hand, the arcade mode focused on racing and required completing laps in various environments. To implement this mode, we first developed the lap system. We utilized waypoints to track the current position of the cars, including reverse detection. By using vector projection along with the waypoints, we were able to determine the cars’ positioning accurately.

In the arcade mode of the game, a key feature was the power-up system, which enabled players to collect various power-ups while racing, much like the power-ups in Mario Kart. However, we encountered a challenge when it came to managing the stacking of power-ups, as there were numerous possible combinations.

To overcome this challenge, we implemented a solution by categorizing the power-ups. This approach not only resolved the issue of managing the different combinations but also accelerated the process of adding new power-ups to the game. By categorizing the power-ups, we were able to effectively handle their interactions and ensure a smooth and balanced gameplay experience for the players.

Core Game Developer

Game Systems Developer:

• Collaborated with a team of developers to create the necessary systems.
• Designed and implemented the dynamic traffic and obstacle generation system across five lanes, ensuring a continuous gameplay experience without dead ends.
• Utilized a Finite State Machine to handle traffic behavior and player states, improving code modularity, reducing bugs, and enhancing code readability.
• Developed a power-up system for the Arcade Racing mode, categorizing power-ups to effectively manage stacking and interactions.
• Developed the lap and positioning system for the arcade mode.

Gameplay Programmer:

• Developed various power-ups, including bombs, thunder, ghosts, rockets, and NOS, among others.
• Developed different mechanics for the endless mode, including police chase, unstable barrel trucks, and power-ups such as UFOs, tanks, boosts, truck rides, trains, and flying, among others.
• Handled the spawning of special encounters (tanks, barrel trucks, etc.) in the endless mode.

Gameplay Optimizer:

• Responsible for improving game performance, including reducing ANR (Application Not Responding) occurrences and crash rates, through various methods such as app startup optimization, async programming, and creating a daisy chain for startup plugin initialization.
• Profiled and analyzed the Mini Car Racing game to identify performance bottlenecks and areas for optimization in both the Endless Runner mode and Arcade Racing mode.
• Implemented optimization techniques such as pooling, caching, and resource management to minimize stutters and frame rate drops, ensuring a smooth gameplay experience.
• Collaborated with the team to ensure the game runs at a minimum of 30 fps on supported hardware, with higher-end devices capable of achieving higher frame rates for improved fluidity.

Infrastructure Developer:

• Built basic features such as the save system, in-app system, and analytics system.
• Handled other miscellaneous functionalities like plugin initialization, play games, and leaderboard integration.
• Implemented car and player selection functionality.