Randy The Racoon

steam game programming

A Simpsons Hit & Run-inspired open-world sandbox, built solo. Missions, NPCs, dialogue, a minimap and a physics-based car all had to work together, so I built them to be modular.

Role Solo developer
Scope Open-world sandbox
Patterns Polymorphism, dependency injection, strategy
Status Released on Steam

The short versionSystems that talk to each other

problem

An open world is one big web

NPCs start missions, change state during them, and everything must be cancellable, restartable and saveable.

approach

Modular by design

Polymorphism, dependency injection and the strategy pattern kept every system as modular as possible.

result

Still reused today

The systems ended up modular enough that I still use them in new projects.

Deep diveHow it fits together

The connected systems

NPC system states, dialogue triggers, save
→
Mission system start, cancel, progress, restart, save
→
Dialogue system NPCs explain the world
→
Minimap shows NPCs & missions

A save system sits underneath all of them, and the physics-based car controller plugs into the same world.

Randy jumping onto a pig with a broom

Building scalable systems

Everything has to cooperate. NPCs start missions and change states during them.

Cancellable and restartable. Any mission can be stopped or reset cleanly, and still work with the save system.

Modular parts. Polymorphism, dependency injection and the strategy pattern let each system be swapped or extended.

Mission system

Mission.cs programming
// Placeholder example: replace with your real snippet (10-20 lines max)
public interface IMission : ISaveable
{
    void Begin();
    void Cancel();
    void Restart();
}

public class Mission : IMission
{
    readonly IObjective objective;   // strategy: swap the goal
    public Mission(IObjective objective) => this.objective = objective;
}

Why it matters: a mission is built from injected parts, so new mission types don't require changing the ones that already work.

Randy's island

One world, many systems

NPC system. NPCs start missions and change state as they progress.

Minimap. One minimap shows both NPCs and missions.

Car controller. A physics-based controller for the stunt car, built to fit the same world.

My partWhat I did

01
systems

Mission System

Missions that NPCs start and change state during, and that can be cancelled and restarted

02
systems

NPC System

NPCs with states that interact with missions and dialogue

03
systems

Minimap

One minimap showing both NPCs and missions

04
systems

Dialogue System

NPCs explain the world through dialogue

05
gameplay

Car Controller

Physics-based car controller for stunts across the island

06
systems

Save System

Saving works with every other system, including restartable missions

Looking for the design side? See the technical design breakdown →

Looking backTakeaways

Plan for saving

When building a game, it's important to plan for saving functionality from the start. A good way of doing that I found is by having clear states in each system.

Modularity pays off later

By making systems independent & reusable I'm now able to carry them over into new projects.

Write debugs & unit tests

With dozens of systems working together having a good debugging system & unit testing saved me a lot of time.

GalleryScreenshots

Library capsule Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4 Screenshot 5 Screenshot 6 Screenshot 7 Screenshot 8 Screenshot 9