Preview

This Rocket Thruster game prototype is a physics-based 3D rocket navigation game built in Unity. The core gameplay revolves around piloting a rocket through levels filled with obstacles, using thrust and rotation controls to reach a designated finish area. The player must carefully manage thrust to lift off and maneuver, while using rotation to avoid collisions with the environment. The game features responsive audio and particle effects for thrusting, crashing, and successful landings, enhancing player feedback and immersion.

From a technical perspective, the project demonstrates several foundational game development concepts: Unity’s Input System for flexible control mapping, Rigidbody-based physics for realistic movement, and scene management for level progression. The codebase includes modular scripts for movement, collision handling, oscillating obstacles, and application control, each following best practices for clarity and maintainability. Debug features such as instant level skipping and collision toggling are included to streamline testing.

This project is an excellent learning resource for understanding how to structure a Unity game, implement player controls, handle collisions and feedback, and manage game flow. It also introduces the use of Unity’s component system, serialization for inspector tweaking, and the integration of audio/visual effects to create a polished gameplay experience.

[https://drive.google.com/file/d/1ebCA1QSl_Lyt_-gXHHaQvFhWz8ocC4Tt/view?usp=drive_link](https://drive.google.com/file/d/1ebCA1QSl_Lyt_-gXHHaQvFhWz8ocC4Tt/view?usp=drive_link)

Codebase

flowchart TD
    Start[Game Start] --> QuitApp[QuitApplication.cs]
    Start --> Movement[Movement.cs]
    Start --> Oscillator[Oscillator.cs]
    Start --> CollisionHandler[CollisionHandler.cs]

    %% QuitApplication
    QuitApp -- "Escape Key" --> Quit[Quit Game]

    %% Oscillator
    Oscillator -- "Update Loop" --> Oscillate[Move Object Back & Forth]

    %% Movement
    Movement -- "FixedUpdate" --> Thrust[ProcessThrust]
    Movement -- "FixedUpdate" --> Rotate[ProcessRotation]
    Thrust -- "Thrust Input" --> Thrusting[Add Force, Play SFX/Particles]
    Thrust -- "No Input" --> StopThrust[Stop SFX/Particles]
    Rotate -- "Left/Right Input" --> Rotating[Rotate, Play Side Particles]
    Rotate -- "No Input" --> StopRotate[Stop Side Particles]

    %% CollisionHandler
    CollisionHandler -- "OnCollisionEnter" --> TagCheck{Tag?}
    TagCheck -- "Friendly" --> Friendly[Log Message]
    TagCheck -- "Finish" --> Success[Success Sequence]
    TagCheck -- "Other" --> Crash[Crash Sequence]
    Success --> SuccessSFX[Play Success SFX/Particles]
    Success --> DisableMove[Disable Movement]
    Success --> NextLevel[Load Next Level]
    Crash --> CrashSFX[Play Crash SFX/Particles]
    Crash --> DisableMove2[Disable Movement]
    Crash --> Reload[Reload Level]

    %% Debug Controls
    CollisionHandler -- "Update Loop" --> DebugKeys[RespondToDebugKeys]
    DebugKeys -- "L Key" --> NextLevel
    DebugKeys -- "C Key" --> ToggleCollide[Toggle Collision]

1. Oscillator

Description:

Moves the GameObject back and forth between two points using a sine-like oscillation.

Useful for moving platforms or obstacles.

void Update()
{
    movementFactor = Mathf.PingPong(Time.time * speed, 1f);
    transform.position = Vector3.Lerp(startPosition, endPosition, movementFactor);
}
flowchart TD
    A[Update Loop] --> B[Calculate movementFactor]
    B --> C[Interpolate Position]
    C --> D[Move Object]

2. Movement

Description:

Handles rocket movement and rotation using Unity's Input System.

Applies thrust, rotates the rocket, and manages audio/particle effects.

private void FixedUpdate()
{
    ProcessThrust();
    ProcessRotation();
}