Skip to content

ctrlshift-hash/cpp-game-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++ Game Engine

A high-performance 2D/3D game engine written in modern C++ with OpenGL rendering, physics simulation, and entity-component-system architecture. Built from scratch with focus on performance, modularity, and developer experience.

Features

  • OpenGL Rendering - Modern OpenGL 3.3+ renderer with shader support
  • Entity Component System - Flexible ECS architecture for game objects
  • Physics Engine - 2D/3D physics simulation with collision detection
  • Asset Management - Texture, model, and shader resource loading
  • Input System - Keyboard, mouse, and gamepad input handling
  • Audio System - Sound and music playback using OpenAL
  • Scene Management - Scene graph and object hierarchy
  • Shader Pipeline - GLSL shader compilation and management
  • Cross-Platform - Windows, Linux, and macOS support

Building

Prerequisites

  • C++17 compiler (GCC 7+, Clang 5+, MSVC 2017+)
  • CMake 3.12+
  • OpenGL 3.3+ compatible graphics card
  • GLFW, GLAD, GLM (included via CMake)

Build Instructions

mkdir build && cd build
cmake ..
make  # or `cmake --build .` on Windows
./game-engine  # or `game-engine.exe` on Windows

Project Structure

cpp-game-engine/
├── src/
│   ├── core/           # Core engine systems
│   │   ├── engine.cpp
│   │   ├── window.cpp
│   │   └── application.cpp
│   ├── rendering/      # Rendering system
│   │   ├── renderer.cpp
│   │   ├── shader.cpp
│   │   ├── texture.cpp
│   │   └── mesh.cpp
│   ├── physics/        # Physics engine
│   │   ├── physics_world.cpp
│   │   ├── collision.cpp
│   │   └── rigidbody.cpp
│   ├── ecs/            # Entity Component System
│   │   ├── entity.cpp
│   │   ├── component.cpp
│   │   └── system.cpp
│   ├── audio/          # Audio system
│   │   ├── audio_manager.cpp
│   │   └── sound_source.cpp
│   ├── input/          # Input handling
│   │   ├── input_manager.cpp
│   │   └── keyboard.cpp
│   └── utils/          # Utilities
│       ├── logger.cpp
│       └── math_utils.cpp
├── include/            # Header files
├── resources/          # Game assets
│   ├── shaders/
│   ├── textures/
│   └── models/
├── examples/          # Example games/demos
└── tests/            # Unit tests

Tech Stack

  • C++17 - Modern C++ features
  • OpenGL 3.3+ - Graphics rendering
  • GLFW - Window and input management
  • GLM - Mathematics library
  • GLAD - OpenGL loader
  • OpenAL - Audio playback
  • CMake - Build system
  • Google Test - Unit testing

Performance

  • 60+ FPS rendering with thousands of objects
  • Efficient memory management
  • Multithreaded asset loading
  • Optimized collision detection

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published