GAMES 6320 · Final Project · Proposal

Rooftop Run: a short parkour game built on a state machine library and a collision system

A side-view parkour course with wall jumps, crumbling platforms, a moving platform and a timed gate. My state machine library drives the player and the course, and Benjamin Yang's collision system handles floors, walls, ground checks and triggers.

7 min readC++ · Direct3D · OpenGL

Course: GAMES 6320-001 Game Engineering II (Fall 2026)

Author: Feiyang Yang

1. What the game will be

Rooftop Run is a short parkour game. You run along one course of rooftops seen from the side, jump over gaps, wall-jump up a narrow shaft, and try to reach the goal as fast as you can. The 3D world is drawn with the camera to the side and a little above the player, and the player only moves left, right, up and down (no movement in depth), so it plays like a 2D platformer. It will be a new game project in my solution, RooftopRun, next to ExampleGame and MyGame.

Side view of the planned course

What it will do

  • One player, one course. Left and right arrows (or A and D) run, and Space jumps. The camera follows the player.
  • Jumping that feels fair. You can only jump while standing on something. A short grace period after running off an edge still allows a jump, and letting go of Space early makes a lower jump.
  • Wall jumps. If you are in the air and pressing toward a wall, you slide down it slowly. Pressing Space then jumps up and away from the wall. This is how you climb the chimney in section 6.
  • The course (the numbers match the picture):
    1. Start.
    2. A plain gap.
    3. Crumbling platforms: they shake for a moment after you land on them, then fall, and come back a few seconds later.
    4. A moving platform that carries you across a long gap.
    5. A timed gate that opens and closes on its own. You have to wait for it or time your run.
    6. A wall-jump chimney between two tall walls.
    7. The goal.
  • Checkpoints and falling. Checkpoints sit along the course. Falling into the kill zone below the course puts you back at the last checkpoint you touched.
  • Time. The game measures the time from the start to the goal. When you reach the goal, the time and the best time of this session are written to the log, and the game resets so you can try again.
  • Meshes that are more fun than boxes. The player will be a small character mesh (a free model such as a robot or a fox, exported with my Maya exporter), and the rooftops get chimneys, vents and water tanks as decoration. The colliders behind them stay simple spheres and boxes, which is all the collision system needs.
  • Showing state without text. The player’s color changes with its movement state (running, in the air, sliding on a wall, falling back to a checkpoint), the same way my Engine System demo colors the guard. Platforms and the gate also change color with their state.
  • Direct3D x64 and OpenGL x86 builds, like every assignment.

What it won’t do

  • No enemies, combat, health or lives. Falling only costs time.
  • No text on screen: no HUD, menu, timer display or high score table. The time goes to the log.
  • No sound and no character animation. The player mesh tilts and changes color, but it has no skeleton.
  • Only one course, built in code and data files. No level editor and no level loading from a file.
  • No rotating colliders and no real physics (no mass, friction or bounce). Gravity and movement are done by the game.
  • Single player only. No controller support unless there is time left at the end.

2. How I will use my Engine System

My Engine System is a data-driven state machine library (write-up). States, transitions and conditions live in .fsm files, StateMachineBuilder turns them into binary files during the asset build, and the game sets parameters and reacts in enter, update and exit callbacks.

In Rooftop Run every moving part of the course and the player’s movement is a state machine:

.fsm file States Parameters set by the game What the callbacks do
player.fsm Grounded, Airborne, WallSlide, Respawning isOnGround (bool), isAgainstWall (bool), verticalSpeed (float), jumpPressed (trigger), fellOut (trigger) Enter Airborne from a jump sets the upward speed. Enter WallSlide limits the falling speed. Leaving WallSlide with a jump pushes the player away from the wall. Enter Respawning moves the player to the last checkpoint.
crumble.fsm Solid, Shaking, Fallen, Returning playerLanded (trigger) Shaking wobbles the platform. Fallen disables its collider and drops it out of view. Returning puts it back. The timed steps use minimumTimeInState with no conditions, like the door in my demo.
mover.fsm MovingRight, WaitRight, MovingLeft, WaitLeft progress (float, 0 to 1 along the path) The update callback moves the platform. The waits use minimumTimeInState.
gate.fsm Closed, Opening, Open, Closing none Opening and closing move the gate. All four transitions are timed, so the gate runs by itself.

The crumbling platforms and the gate show what the library is for: three platforms share one definition, each gets its own cStateMachine, and tuning how long a platform shakes or how long the gate stays open is a change to a number in a data file. The player’s state machine is the most interesting one, because conditions like “on the ground and Space was pressed” or “in the air, against a wall and falling” are exactly what I don’t want spread across if statements in cMyGame.cpp.

I expect to add small things to my library while doing this, for example a way for a callback to read how long the machine has been in its current state. Anything I add will go back into the library and its README so classmates get it too.

3. Which other Engine System I will use

I will use Benjamin Yang’s Collision System (his Engine System write-up). It gives objects sphere and axis-aligned box colliders described in Lua files, has layers that say which kinds of objects touch, pushes moving colliders out of static ones (walls stop things and floors hold them up), sends OnEnter, OnStay and OnExit events with the contact normal, and supports raycasts. Benjamin and I also presented our two systems together, including a sketch of how they could work in one game (presentation video).

What it will do in Rooftop Run:

  • Floors and walls. Every rooftop, wall and the chimney is a static box collider in a world layer. The player is a dynamic sphere in a player layer. The collision system keeps the player on top of floors and out of walls, so I don’t write any of that myself.
  • Ground check. A short raycast straight down from the player against the world layer sets isOnGround for my state machine. This is the same check Benjamin’s demo uses for jumping.
  • Wall check. While the player touches a wall, OnStay gives a contact normal that points mostly sideways. That sets isAgainstWall, and the normal also says which way the wall jump should push.
  • Triggers. Checkpoints, the goal and the kill zone are trigger colliders in their own layers. OnEnter on a checkpoint stores the respawn point, the goal stops the timer, and the kill zone sets the fellOut trigger in the player’s state machine.
  • Crumbling platforms. The player landing on one is an OnEnter with a normal pointing up, which sets playerLanded. When the platform falls, its collider is switched off with SetEnabled( false ) and switched on again when it returns.
  • Moving platform and gate. Benjamin’s guide says to use a static collider and move its rigid body yourself for moving platforms and doors, so that is what my state machine callbacks will do.

The order in every simulation update will be: read input and set velocities, update the rigid bodies, call Collision::Update(), set the state machine parameters from what the collision system reported, then update all state machines. That way every state machine sees this update’s contacts.

Benjamin’s guide also warns about fast objects passing through thin colliders. I will follow his advice: thick floors and walls, a limit on falling speed, and a simulation rate of 60 updates per second.

4. Plan

When What
Week of Nov 23 Create the RooftopRun game project. Add the Collision library and ColliderBuilder to my solution next to my state machine library. Player sphere on a floor with running, jumping and the ground raycast. First version of player.fsm.
Week of Nov 30 Wall slide and wall jump. The course: crumbling platforms, moving platform, timed gate, checkpoints, kill zone and goal. Camera follow and the timer in the log.
Dec 3 to Dec 6 Tuning, Direct3D and OpenGL builds with no warnings, the one-click ZIP and the final write-up.

If time runs short, the parts I would cut first are the moving platform and the shorter jump when Space is released early. The wall jump, crumbling platforms and timed gate stay, because they are where the two engine systems work together.

5. Credits