Skip to content

2D spaceshooter game written in C++ with OpenGL from scratch

Notifications You must be signed in to change notification settings

natanaeljr/spaceship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spaceship

Simple 2d spaceshooter game, built from the ground up with only C++, modern OpenGL and a few libs.

This is a build setup for linux.

Intended to be written as a single source file (main.cpp), with the most simple yet readable code that's needed to make a cool game.

Feel free to learn with the code, I am learning coding it too ;)

Status:

Build

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
cmake --build . --parallel $(nproc)

Running

./build/spaceship/bin/spaceship

Roadmap

  • Initial project structure & build system
  • Setup logging library and parse --log argument.
  • Create a Window with GLFW and Load OpenGL with glbinding
  • First colored Quad.
    • Color Shader
    • VBO, EBO, VAO, geometry,
    • Render procedure
  • Floating animation on the Quad
  • Load Texture into Quad
    • Texture Shader
    • Load texture with stb image
    • Render procedure
  • Sprite Animation
  • Handle Keyboard input
  • Render Text
    • Load TTF font
    • Generate Text Quads
    • Render procedure
    • FPS Counter
    • Generic Shader (color-texture-font)
  • Window Resizing & Camera
  • GameObject, Render Order & Layers
    • Scene GameObject Container
    • Texture Manager
    • Projectiles
  • Bounding Box & Collision Detection
    • AABB
    • Projectile Hits & Explosions
    • Bind player to Screen bounds
  • Audio with OpenAL
    • Load WAV audio
    • Associate with entities
  • Update Loop Improvements
    • Fixed Time Step
      • Fixed update loop
      • Fixed render loop
      • Controlled vsync
    • Linear Interpolation
    • Handle Key Events at fixed rate
  • Game FSM & Scenes
    • Enemy Logic
      • Spaceships collision
      • Health Bar
      • Enemy AI
    • Handle Mouse Input
    • Game State FSM
    • Game Start screen
    • Game Over screen
  • Serialization
    • Components
    • Scene
    • Game state
  • Optimization
    • Instanced Rendering
    • OpenGL 4.5 DSA
    • Array Textures
    • Custom Allocators
    • Double Buffer
    • Multithreading
  • Windows Platform
  • Android Platform

About

2D spaceshooter game written in C++ with OpenGL from scratch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published