Spartan Engine is one of the most advanced one-man game engines out there, pushing the limits of real-time approaches. What started as a portfolio project has evolved into a cutting-edge project for developers to explore, learn, and contribute. This isn't an engine for the average user, it's designed for advanced research and experimentation, ideal for industry veterans, not for individuals to build a game. With a thriving Discord community of over 500 members, including industry veterans, and contribution perks that you won't believe when you see, it's one of the most unique projects you'll come across.
-
For occasional updates regarding the project's development, you can follow me on X.
-
For a community like no other, join our group of 500+ members on discord.
-
For issues and anything directly related to the project, feel free to open an issue.
-
Please adhere to the MIT license. You're free to copy the code, provided you include the original license.
Upon launching the engine, you'll be greeted with a selection of default worlds to load. Each world is physics-enabled, allowing you to walk around, pick objects using your mouse, and even drive a car. These worlds are designed to offer a diverse and enjoyable experience
Forest
The Forest world is one of the most advanced open-source game engine worlds available. It features millions of procedurally generated grass blades, fully simulated and inspired by Ghost of Tsushima. The world spans multiple square kilometers, covered in thousands of trees, and includes a fully drivable, physics-based car with realistic tire friction, gearbox simulation, and an anti-roll bar system.
Some of the other worlds
- Cutting edge Vulkan renderer.
- 128-byte push constant buffer for lightning fast CPU to GPU data transfer.
- On the fly single dispatch GPU-based mip generation for render targets (FidelityFX SPD).
- On the fly compression and mip generation for material textures (FidelityFX Compressonator).
- Fully bindless design (materials, lights, even the samplers).
- Fast dual paraboloid point lights.
- Vulkan (main) and DirectX 12 (wip) backends with universal HLSL shaders.
- Unified deferred rendering with transparency (BSDF with same render path).
- Atmospheric scattering, real-time filtering and image-based lighting.
- Real-time global illumination (FidelityFX Brixelizer GI).
- Screen space shadows (Bend Studio's Days Gone).
- Screen space ambient occlusion.
- Screen space reflections (FidelityFX SSSR).
- Variable rate shading.
- Dynamic resolution scaling.
- Upscaling (FidelityFX FSR 3.1).
- Temporal anti-aliasing.
- Breadcrumbs for tracing GPU crashes on AMD (FidelityFX Breadcrumbs).
- Advanced shadow features with penumbra and colored translucency.
- Physical light units (intensity from lumens and color from kelvin).
- Frustum & occlusion (Hi-Z) culling.
- Physically based camera.
- Volumetric fog.
- HDR10 output.
- Post-process effects like fxaa, bloom, motion-blur, depth of field, chromatic aberration etc.
- One-click project generation for easy setup.
- Universal input support, keyboard & mouse, controllers (tested a PS5 controller) and steering wheels.
- Comprehensive physics features.
- CPU & GPU profiling.
- XML support for data handling.
- Thread pool that can consume any workload.
- Entity-component, event systems and most things you'll expect to find in a modern engine.
- Wide file format support: 10+ for fonts, 30+ for images, and 40+ for models.
The wiki can answer most of your questions, here are some of it's contents:
While the engine is designed primarily for experienced game developers to experiment, there are resources available for those who prefer a more guided approach.
To get started, take a look at game.cpp. This file contains all the logic for loading and setting up the default worlds within the engine, and it's a great place to understand the core structure of the engine.
I regularly upload livestreams and podcasts on my YouTube channel, discussing Spartan Engine and beyond.
Video: Livestream of FSR 2 integration | Video: The engine and the community |
---|---|
![]() |
![]() |
I personally cover the costs for Dropbox hosting to ensure library and assets bandwidth is available. If you enjoy the ease of running a single script and having everything download, compile and work seamlessly, please consider sponsoring to help keep it that way. Sponsoring directly is much more helpful than boosting the Discord server since boosts only benefit Discord, not the project. Your support goes directly into maintaining and improving everything.
- This engine started as a personal learning project and a way to enhance my portfolio while I was a university student. I also used it for my thesis at my university.
- Contributing to this project comes with great perks! Learn more about the benefits here.
- Godot integrates Spartan’s TAA. See it in action here.
- Stalker Anomaly features an addon that enhances rendering using Spartan's source. Check it out here.
- Jesse Guerrero, a contributor, wrote a book on beginner programming, featuring Spartan's code, its Discord community, and leadership.
Are you utilizing any code from Spartan Engine, or has it inspired aspects of your work? If yes, reach out to me, I'd love to showcase your project.