|
ToyMaker Game Engine 0.0.2
ToyMaker is a game engine developed and maintained by Zoheb Shujauddin.
|
ToyMaker is an open source, extensible, single-threaded 3D game engine written in C++ on top of SDL3 and OpenGL. Scene data is described in JSON and managed through a combination of ECS and scene tree APIs. Demo projects using ToyMaker have been compiled successfully for Windows and Linux.
ToyMaker is currently in very early alpha; all APIs seen here today are subject to change until an eventual 1.0 release. It also doesn't yet feature a level editor.



Examples/FillContainer – shows spheres spawning at a steady rate filling an invisible container, with several collision checks and corrections taking place every frame.

Examples/TriplePendulum – shows set of granular single degree of freedom position constraints being used to model the behaviour of a hinge joint in a triple pendulum.

Examples/SlopeFriction – demos friction forces causing a moving block to slow and come to a stop sliding down a gentle incline.

Examples/ManyLights – scene containing 441 point lights and 441 models (2 meshes each) rendered with instancing for both.

Examples/LeftRightCollision – shows single one-to-one collision between two spheres.

Examples/CenterText – demo featuring clickable text that spins on interaction.
I spent 2023-2024 studying C++, OpenGL, SDL, and 3D graphics by following the tutorials on learncpp, Lazy Foo, and Learn OpenGL among others. I used my learnings to write Game of Ur, then split this engine out from it. The goal now is to take this as far as I can while learning as much as I can along the way.
See raynmetal/game-of-ur's toymaker-fork tag which holds the commit history leading up to the splitting of the engine project from the game project.
Documentation for the engine is available on this project's github pages.
Open, ongoing, and completed tasks and issues are tracked on this project's Trello board.
This project uses CMake for its build system, so make sure to have that installed.
On your platform, download the following packages and place them somewhere discoverable by your compiler toolchain. This project has been successfully compiled with MinGW-w64 on Windows, and clang on Linux.
If you'd like to generate and tinker with the documentation generated for the project, also install Doxygen.
The project is bundled with a few CMake presets used with cmake --preset ${PRESET}
Replacing Release with Debug in any of the above enables the generation of debug symbols and suppresses many compiler optimizations.
First, clone this repository.
Create a directory for storing files generated during the build process. The instructions here assume that the build directory is ../toymaker_build/ relative to the project root.
Enter the project directory and generate the build configuration using CMake. The instructions here use the FullBuild_Examples preset (see the Presets section), that generates binaries both for the ToyMaker library as well as the example projects under Examples/.
Finally head over to the project directory and actually build the project.
Starting in the build directory root, navigate to the directory containing the demo you would like to run (say, FillContainer).
Then simply run the generated executable (likely prefixed with Example_).
Tests are compiled along with the rest of the library when ToyMaker is itself the project being built (as opposed to when it is a vendored library in another project). The test sources are found under tests/ under the project root.
To run them, go to the root of the build directory, then invoke:
ToyMaker uses Doctest for testing. See instructions there to learn how to run tests selectively, or with options besides the default.
I'm not planning to accept contributions to this project any time soon. Feel free to fork it and make it your own, though!
raynmetal/toymaker is distributed under the terms of the MIT License.
This program makes extensive use of the following libraries: