A high-performance, modern 2D game engine template built with C++20, targeting Windows and HTML5 (via Emscripten). This project is designed for portability and ease of use, utilizing vcpkg for dependency management and CMake as the build system.
- Graphics Backend: Vulkan (High-performance rendering)
- Multimedia Layer: SDL3 (Windowing, input, audio)
- UI System: ImGui (Docking branch with SDL3/Vulkan backends)
- Math Library: GLM (OpenGL Mathematics)
- Data Serialization: nlohmann-json
- Dependency Management: vcpkg (Manifest Mode)
- Build System: CMake (version 3.21+)
- Compiler: A C++20 compatible compiler (MSVC 2022, Clang 16+, or GCC 13+)
- vcpkg: Should be installed and the
VCPKG_ROOTenvironment variable set. - CMake: Version 3.21 or higher.
git clone https://github.com/attome-ai/Attome-Engine.git
cd Attome-EngineSimply open the project folder in Visual Studio 2022. It will automatically detect the vcpkg.json manifest and CMakeSettings.json, then download and build all dependencies.
# Create build directory
mkdir build
cd build
# Configure with vcpkg toolchain
cmake .. -DCMAKE_TOOLCHAIN_FILE=[PATH_TO_VCPKG]/scripts/buildsystems/vcpkg.cmake
# Build the project
cmake --build . --config ReleasegameSrc/: Core engine and game logic implementation (.cppfiles).game/: Header files and engine interfaces (.hfiles).windows/: Windows-specific CMake configuration and entry points.html/: Emscripten/Web-specific configuration.shaders/: Vulkan GLSL shaders.textures/: Asset directory for textures and images.vcpkg.json: Project dependency manifest.
This repository contains two complete versions of the game engine to demonstrate the power of Data-Oriented Design (DOD):
Located in gameBasic/
- Architecture: Classic OOP with Array of Structures (AOS).
- Collision: Naive O(N^2) checks.
- Rendering: Individual draw calls per entity.
- Performance: Caps at ~10,000 entities @ 15 FPS.
- Purpose: Represents "clean" but slow textbook code.
Located in gameSrc/
- Architecture: Data-Oriented with Structure of Arrays (SOA).
- Optimization Features:
- Spatial Partitioning: O(1) grid-based collision.
- Multithreading: Parallel entity updates using
std::execution. - Batch Rendering: 1 draw call per texture/layer via Texture Atlas.
- Zero-Allocation: No dynamic memory during gameplay.
- Performance: Handles 1,000,000+ entities @ 30-60 FPS.
This project uses vcpkg Manifest Mode. All libraries listed in vcpkg.json are automatically fetched and built during the CMake configuration step. This ensures that every developer uses the exact same versions of the libraries without manual installation.
Created with ❤️ by the Attome AI team.