Space Game

y1BCW8

I created a 3D adventure game where the biggest challenge was running it on a Raspberry Pi3. The game runs in 60fps on the Raspberry Pi 3, the game is fully build from scratch using C++ for additional libraries see down bellow.

My Responsibilities

  • Graphics
    • Setting up OpenGl es 2.0 for the Pi and OpenGL for Windows
    • Writing shaders:
      • Bling Phong shader
      • Sky Cube shader
  • Gameplay
    • Creating the Solar system
    • Using the physics system to move around the world
    • Creating the spaceship and physics player
    • Creating different levels
  • Engine
    • Making it run on Windows and on the Raspberry Pi 3
    • Implementing Bullet 3D physics
    • Creating a world manager
    • Using Tiny obj to load in the models
    • Created procedural astroid generation
      • Using noise textures

Libraries used:

  • OpenGL es 2.0 Pi
  • OpenGL
  • Bullet 3D
  • Tiny obj loader

More detail

Procedural Generation

In this project I added astroids to create more immersive gameplay. I was running the game on a Raspberry Pi 3 meaning I didn’t have the storage capacity to save multiple astroid meshes on the drive. That is why I decided to implement the procedural generation to create all different looking astroids based on one sphere mesh.

Here is an example of how one of the astroids looks while running it on a Raspberry Pi 3.

Procedural generation
Scenes

This game features different scenes where the player can travel in a Space Station and space. To be exact, the game has the Solar System that includes the Space Station the player can go through.

Both have their own unique challenges:

  • Space station
    • 3D physics and collisions
    • Switching shaders in run time
    • Optimizing collision meshes and collision checks
  • Solar system
    • Far rendering distance
    • Physics simulated planets
    • Loading and saving to positions to a file(first time working with save files)

The biggest challenge for me was getting 60fps on the Raspberry Pi 3.

Here is a gif of a player flying through space.

Here you can see the planets spinning. I programmed these planets to move based on real world values.

y1BCW8
Flying through space
Space Station

Walking around in the Space Station.

Here you can see the changing of shaders and walking around using 3D physics.