Pitfall 3D - Year 1 - Block B

Sven van Huessen | Jan 26, 2024

Pitfall 3D - Year 1 - Block B

Challenge: Transform a 2D platformer into a fully 3D game running efficiently on Raspberry Pi hardware, building the entire game from scratch without templates.

Result: Delivered a complete 3D game with smart rendering features and cross-platform support, earning a perfect 10.0 grade.

Technical Architecture

Built entirely from scratch with cross-platform compatibility (Windows/Linux):

  • OpenGLES Rendering - Custom 3D graphics
  • Bullet Physics Integration - 3D collision and physics simulation
  • Shader Programming - Custom GLSL shaders for visual effects
  • ImGui Integration - Debug interface and development tools

Advanced Rendering Features

Skeletal Animation System

Implemented a bone animation system using Mixamo assets and Blender processing. The system supports multiple animation states including running, jumping, sliding, and falling with smooth transitions.

Pitfall3D_Animations.gif

Unity-Based Level Editor Pipeline

Problem: Writing 3D levels manually in code is time-consuming and error-prone.

Solution: Created a custom Unity-to-game pipeline using a JavaScript conversion script that transform Unity prefabs into JSON format compatible with my game.

Prefabs in Unity

In-Game Result

Unity Level Design
In-Engine Result

Custom Shader Development

Wrote a couple of shaders to make the game look better.

Curve Shader: Creates the illusion of a world curving away from the player, giving a 3D depth perception.

Distance Fog Shader: Hides objects popping-in/out.

CurveShader.gif

Visual Comparison: Before and After Shaders

Performance Optimization

GPU Instancing Implementation

Challenge: Rendering hundreds of objects (trees, rocks, objects) caused performance bottlenecks on both the Raspberry Pi and Windows.

Solution: Implemented GPU instancing to batch identical objects into single draw calls.

Performance Results:

Platform Before Instancing After Instancing Improvement
Windows ~28 fps (~37 ms/frame) ~300 fps (~3.5 ms/frame) 971%
Raspberry Pi ~10 fps (~105 ms/frame) ~40 fps (~25 ms/frame) 300%

Project Outcome

Grade: 10.0/10.0

Teacher Feedback: “Superb work. The game is looking professional and very attractive. The evidencing is of superb quality as well, with detailed statements and clear visual evidence on all ILO slides. The 10/10 is well-deserved.”

Technologies Used

  • C++
  • OpenGL
  • GLSL
  • Bullet Physics Engine
  • ImGui (Development interface)
  • Unity (Level design pipeline)
  • Node.js / JavaScript (Asset conversion)
  • Mixamo & Blender (Animation pipeline)

Download