Skip to content

aloyak/origin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

125 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Origin Logo

Origin Engine

General Information

Origin is a true 3D pixel-art game engine written from scratch in modern C++. It uses OpenGL for rendering and is designed to be cross-platform, supporting Windows, MacOS, Linux, and Web Builds. Web builds are enabled through WebAssembly using Emscripten.

The engine features a custom-built editor called the Sandbox, which allows for scene editing, entity management, and component manipulation. Moreover, it uses ImGui for the editor's user interface.

Physics is handled by the Bullet3 Physics library, and the engine supports various effects and features such as dynamic lighting, and post-processing effects.

Showcase

Screenshot

Origin Engine 0.12.0 running on Linux. You can see a simple scene with the sponza model, a player with a camera component, and a dynamic point light.

Sandbox Screenshot

Sandbox Editor running on Linux. Featuring the physics playground scene.

Building

The project uses CMake to generate and build the engine. The repository is organized into three main modules:

  • engine — the core engine code
  • game — the game project that uses the engine
  • sandbox — map editor with extra features

You may want to change your game's name in game/CMakeLists.txt.

  • Requirement: CMake 3.23 or newer. Cmake 4.0+ is not completely supported.

  • Note that the sponza model is not included. You can download it with assets/models/download-sponza.sh or clone it yourself from https://github.com/jimmiebergmann/Sponza

Linux

To build the project on Linux:

chmod +x ./build.sh
./build.sh

# If you don't want to build the sandbox:
./build.sh --no-sandbox

This script will generate a build directory and compile the project. The final executable can be found in build/game/

Windows

To build the project on Windows, you can use the same build.sh script if you have a compatible environment (like Git Bash or WSL). Alternatively, you can use CMake directly:

  • Tested using ninja but Visual Studio should work as well (recommended even!)
mkdir build
cd build
cmake -G "Ninja" .. # or -G "Visual Studio 17 2021" 
ninja

Web

  • Requirement: Emscripten sdk must be installed!

  • Note that the web build is based on a minimal template static page at game/web/shell.html that you can modify as you like

chmod +x ./build.sh 
./build.sh --web # Sandbox isn't built for web
python3 -m http.server 8080 --directory build-web/game/ # suggestion!

This script will generate a build directory specific for web and compile the project. Your build can be found at build-web/game/game.html, it should be opened with a server in order to work!

MacOS

  • Not yet tested! (origin uses OpenGL 4.1 as it is the last supported openGL version for MacOS, but it is officially deprecated!)

License

This project is under the MIT License. Please see LICENSE.md for more information!

Thanks and Inspirations

HackClub

Hack Club

Proud member of Hack Club!

This project was made as part of HackClub's Flavortown Event (2026): https://flavortown.hackclub.com/projects/14868

About

Origin is a cross-platform true-3D-pixelart Game Engine written from scratch wtih C++

Topics

Resources

License

Stars

Watchers

Forks

Contributors