Skip to content

A modern, multi-platform game engine with support for multiple graphics APIs. Currently focusing on OpenGL with planned support for DirectX 9/10/11/12.

License

Notifications You must be signed in to change notification settings

Pyramid-Systems-Inc/Pyramid-Engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Pyramid Game Engine

A modern, high-performance game engine designed for flexibility and performance. Built with C++17 and featuring SIMD-optimized math, advanced rendering, and comprehensive development tools.

License: MIT C++17 Platform OpenGL Build Status

โœจ Key Features

๐Ÿš€ High-Performance Math Library

  • SIMD-Accelerated: SSE/AVX optimized vector and matrix operations with runtime CPU detection
  • Complete 3D Math: Vec2, Vec3, Vec4, Mat3, Mat4, Quaternion with full operator support
  • Cache-Friendly: 16-byte aligned structures optimized for modern CPUs
  • Batch Processing: Efficient processing of arrays for optimal SIMD utilization

๐ŸŽจ Advanced Graphics System

  • Modern OpenGL: 3.3-4.6 support with clean abstraction layer
    • Command Buffer System: Efficient GPU command submission and batching
  • Render Passes: Organized rendering stages (forward, deferred, post-processing)
  • PBR Materials: Physically-based rendering with metallic-roughness workflow
  • Advanced Camera: Perspective/orthographic projections with frustum culling

๐ŸŒ Intelligent Scene Management

  • Octree Spatial Partitioning: O(log n) object queries with configurable depth
  • Multiple Query Types: Point, sphere, box, ray, and frustum-based object lookup
  • Performance Monitoring: Real-time statistics and optimization feedback
  • Memory Efficient: Smart pointer-based RAII resource management

๐Ÿ–ผ๏ธ Zero-Dependency Image Loading

  • Complete Format Support: TGA, BMP, PNG (custom DEFLATE), JPEG (baseline DCT)
  • Self-Contained: No external dependencies, production-ready implementations
  • Optimized Loading: Direct GPU texture creation with efficient memory usage

๐Ÿ“ Production Logging System

  • Thread-Safe: Mutex-protected concurrent logging operations
  • Multiple Outputs: Console and file logging with independent level control
  • File Rotation: Automatic log rotation with size limits and file count management
  • Structured Data: Key-value pair logging for analytics and debugging

๐Ÿ—๏ธ Modern C++ Architecture

  • C++17 Standard: Modern language features with RAII principles
  • Cross-Platform Ready: Clean platform abstraction layer
  • Extensible Design: Plugin-ready architecture for future expansion

๐Ÿ“‹ Requirements

System Requirements

  • OS: Windows 10/11 (64-bit)
  • CPU: x64 with SSE2 support (AVX recommended for optimal SIMD performance)
  • GPU: OpenGL 3.3+ compatible graphics card
  • RAM: 8GB minimum, 16GB recommended

Development Tools

  • Visual Studio 2022 (Community/Professional/Enterprise)
  • CMake 3.16+ (3.20+ recommended)
  • Git for version control

๐Ÿš€ Quick Start

1๏ธโƒฃ Clone and Setup

git clone https://github.com/yourusername/Pyramid-Engine.git
cd Pyramid-Engine

2๏ธโƒฃ Build (Command Line)

# Generate build files
cmake -B build -S . -DPYRAMID_BUILD_EXAMPLES=ON

# Build the engine
cmake --build build --config Debug

3๏ธโƒฃ Build (Visual Studio)

  1. Open Visual Studio 2022
  2. Select "Open a local folder"
  3. Choose the Pyramid-Engine directory
  4. Wait for CMake configuration
  5. Build โ†’ Build All (Ctrl+Shift+B)

4๏ธโƒฃ Run Examples

cd build\bin\Debug
BasicGame.exe          # Basic game with 3D scene
BasicRendering.exe     # Advanced rendering showcase

๐Ÿ’ก Need help? See our Build Guide for detailed setup instructions.

๐Ÿ’ป Your First Game

Create a simple game in just a few lines:

#include <Pyramid/Core/Game.hpp>

class MyGame : public Pyramid::Game {
public:
    void onCreate() override {
        // Initialize your game
        PYRAMID_LOG_INFO("Game starting up!");
    }
    
    void onUpdate(float deltaTime) override {
        // Update game logic
    }
    
    void onRender() override {
        // Render your scene
        auto* device = GetGraphicsDevice();
        device->Clear(Pyramid::Color(0.2f, 0.3f, 0.4f, 1.0f));
    }
};

int main() {
    MyGame game;
    game.run();
    return 0;
}

๐Ÿ”ง Advanced Features

SIMD-Optimized Math

#include <Pyramid/Math/Math.hpp>

using namespace Pyramid::Math;

// Automatic SIMD acceleration
Vec3 position(1.0f, 2.0f, 3.0f);
Vec3 velocity = Vec3::Forward * speed;
Vec3 newPosition = position + velocity * deltaTime;

// 3x faster than standard math libraries
Mat4 mvp = projection * view * model;

Intelligent Scene Management

#include <Pyramid/Graphics/Scene/SceneManager.hpp>

// Octree spatial partitioning for massive worlds
auto sceneManager = SceneUtils::CreateSceneManager();
sceneManager->EnableSpatialPartitioning(true);

// Lightning-fast spatial queries
auto nearbyEnemies = sceneManager->GetObjectsInRadius(playerPos, 10.0f);
auto visibleObjects = sceneManager->GetVisibleObjects(camera);

Production-Ready Logging

#include <Pyramid/Util/Log.hpp>

// Thread-safe, high-performance logging
PYRAMID_LOG_INFO("Player scored: ", score, " points!");
PYRAMID_LOG_ERROR("Failed to load texture: ", filename);

// Structured logging for analytics
PYRAMID_LOG_STRUCTURED(LogLevel::Info, "Level completed", {
    {"level", "forest_1"}, {"time", "120.5"}, {"score", "1500"}
});

๐Ÿ“š Documentation

Getting Started API Reference Advanced
๐Ÿš€ Getting Started ๐Ÿ“– Complete API Reference ๐Ÿ—๏ธ Architecture Guide
๐Ÿ”จ Build Guide ๐ŸŽฎ Core Game Engine ๐Ÿค Contributing Guide
๐ŸŽฏ Examples & Tutorials ๐ŸŽจ Graphics System ๐Ÿ“‹ Project Roadmap
๐Ÿงฎ Math Library ๐Ÿ“ Changelog
๐Ÿ”ง Utilities

Quick Navigation

๐Ÿ—๏ธ Project Structure

Pyramid-Engine/
โ”œโ”€โ”€ ๐ŸŽฎ Engine/                    # Core engine library
โ”‚   โ”œโ”€โ”€ Core/                    # Game loop and foundation
โ”‚   โ”œโ”€โ”€ Graphics/                # Rendering and visual systems
โ”‚   โ”‚   โ”œโ”€โ”€ Scene/              # Scene management with octrees
โ”‚   โ”‚   โ”œโ”€โ”€ Renderer/           # Command buffers and render passes
โ”‚   โ”‚   โ””โ”€โ”€ OpenGL/             # OpenGL 3.3-4.6 implementation
โ”‚   โ”œโ”€โ”€ Math/                   # SIMD-optimized mathematics
โ”‚   โ”œโ”€โ”€ Platform/               # Cross-platform abstractions
โ”‚   โ”œโ”€โ”€ Utils/                  # Logging and image loading
โ”‚   โ”œโ”€โ”€ Audio/                  # 3D spatial audio (planned)
โ”‚   โ”œโ”€โ”€ Physics/                # Rigid body dynamics (planned)
โ”‚   โ””โ”€โ”€ Input/                  # Multi-device input (planned)
โ”œโ”€โ”€ ๐ŸŽฏ Examples/                  # Learning examples
โ”‚   โ”œโ”€โ”€ BasicGame/              # Your first game
โ”‚   โ””โ”€โ”€ BasicRendering/         # Advanced graphics showcase
โ”œโ”€โ”€ ๐Ÿ“š docs/                      # Comprehensive documentation
โ”œโ”€โ”€ ๐Ÿ› ๏ธ vendor/                    # Third-party dependencies
โ””โ”€โ”€ ๐Ÿ”ง CMake build system         # Multi-platform builds

๐Ÿšฆ Development Status

Module Status Documentation Examples
๐ŸŽฎ Core Engine โœ… Complete โœ… โœ…
๐ŸŽจ Graphics System โœ… Complete โœ… โœ…
๐Ÿงฎ Math Library โœ… Complete โœ… โœ…
๐Ÿ–ผ๏ธ Image Loading โœ… Complete โœ… โœ…
๐Ÿ“ Logging System โœ… Complete โœ… โœ…
๐Ÿ”ง Platform Layer โœ… Complete โœ… โœ…
๐ŸŽต Audio System ๐Ÿ”„ In Progress โœ… โณ
โšก Physics Engine ๐Ÿ”„ In Progress โœ… โณ
๐ŸŽฎ Input System ๐Ÿ”„ In Progress โœ… โณ

๐Ÿค Contributing

We welcome contributions! Whether you're fixing bugs, adding features, or improving documentation, your help makes Pyramid Engine better for everyone.

Ways to Contribute

  • ๐Ÿ› Report bugs and suggest features via GitHub Issues
  • ๐Ÿ’ป Submit code improvements and new features
  • ๐Ÿ“š Improve documentation and write tutorials
  • ๐ŸŽฎ Create examples to help other developers learn

Ready to contribute? Read our Contributing Guide for detailed instructions.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License - Free for commercial and non-commercial use
โœ… Use in commercial projects    โœ… Modify and redistribute
โœ… Private use                   โœ… Include copyright notice

๐Ÿ™ Acknowledgments

  • GLAD - OpenGL function loading
  • Microsoft - Visual Studio and Windows API
  • CMake - Cross-platform build system
  • Community contributors - Bug reports, features, and feedback

โญ Star this repo if you find it useful! โญ

Report Bug ยท Request Feature ยท Documentation ยท Examples

Built with โค๏ธ for the game development community

About

A modern, multi-platform game engine with support for multiple graphics APIs. Currently focusing on OpenGL with planned support for DirectX 9/10/11/12.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published