GitRead 中文社区
首页趋势排行榜原创文章严选周刊
更多资源
新手训练营
精选专题热门话题GitHub 文档资源精选实战指南

SpartanEngine

A game engine with a fully bindless, GPU-driven renderer featuring real-time path-traced global illumination, hardware ray tracing, and a physics simulation running at 200Hz, built over 10+ years of R&D

  • 语言C++
  • 默认分支master
  • 大小759.6 MB
  • 更新10 小时前
  • Issues16
在 GitHub 打开
avatarPanosK92

项目介绍

PanosK92/SpartanEngine 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 MIT License 许可证,目前获得 3.2k 个 Star、282 次 Fork。

仓库全名
PanosK92/SpartanEngine

README 摘要

Path traced. GPU driven. Started before AI and developed alongside me while in the game industry. 12 YEARS IN DEVELOPMENT 1 ENGINEER 600+ ENGINEERS ON DISCORD 200 Hz VEHICLE SIMULATION PLATFORMS GRAPHICS APIS Windows Linux macOS DirectX 12 Vulkan Metal Overview Spartan is a complete C++ game engine. Path-traced global illumination, hardware ray tracing, a bindless GPU-driven renderer and a racing-grade vehicle…

完整内容见 GitHub 原始 README 或本页 。

常见问题

SpartanEngine 用什么语言开发?

主要使用 C++ 编写,采用 MIT License 许可证,目前有 3.2k 个 Star。

SpartanEngine 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 SpartanEngine 的源码?

可以直接克隆仓库:git clone https://github.com/PanosK92/SpartanEngine.git,默认分支为 master;安装与运行步骤见仓库 README。

SpartanEngine 最近还在维护吗?

仓库最近一次更新为 10 小时前,当前有 16 个未关闭 Issue;Star 数为 3.2k,可作为社区活跃度的参考。

本页面展示项目元数据与原始 README,GitRead 中文社区 编辑团队负责选题收录。

相关仓库

tensorflow/tensorflow avatar
tensorflowtensorflow
2 小时前
201.4k
77.8k
3.4k

面向所有人的开源机器学习框架

deep-learningdeep-neural-networksdistributed+5
C++
1.4 GB
0
详情
ggml-org/llama.cpp avatar
llama.cppggml-org
3 小时前
133.9k
25.3k
2.6k

C/C++ 中的大语言模型推理

ggml
C++
480.4 MB
3
详情
react/react-native avatar
react-nativereact
11 小时前
126.9k
25.5k
1.4k

使用 React 构建原生应用的框架

androidapp-frameworkcross-platform+5
C++
970.4 MB
0
详情
electron/electron avatar
electronelectron
12 小时前
123.8k
17.9k
780

使用 JavaScript、HTML 和 CSS 构建跨平台桌面应用

electronjavascriptc-plus-plus+6
C++
227.6 MB
0
详情
godotengine/godot avatar
godotgodotengine
9 小时前
119.9k
26.8k
13.4k

Godot Engine – 多平台 2D 和 3D 游戏引擎

game-developmentgame-enginegamedev+4
C++
1.8 GB
0
详情
microsoft/terminal avatar
terminalmicrosoft
3 小时前
105.4k
9.7k
1.8k

新的 Windows Terminal 和原始的 Windows 控制台主机,全都集中在这里!

cmdcommand-lineconsole+8
C++
177.5 MB
0
详情
opencv/opencv avatar
opencvopencv
14 小时前
91.5k
57.1k
2.9k

开源计算机视觉库

opencvc-plus-pluscomputer-vision+2
C++
558.2 MB
0
详情
bitcoin/bitcoin avatar
bitcoinbitcoin
14 小时前
90.6k
30.0k
345

Bitcoin Core 集成/暂存树

bitcoinc-plus-pluscryptocurrency+2
C++
324.5 MB
0
详情

关于

atmospheric-scatteringbindlessbsdfcar-simulationcppcutting-edgeecsgame-enginegpu-drivenimguilivestreampath-tracingphysxray-tracingrestir-gispartanssaotaavulkanxess
  • MIT License
  • 3.2k Stars
  • 282 Forks
  • 78 Watching

简要分析

热度分
3863
价值分
2024
活跃状态
活跃
GitHub

语言占比

Batchfile
C
C++
HLSL
JavaScript
Lua
PowerShell
Python
Shell

Release

  • Spartan v2026.11.09.12.1014 小时前
  • Spartan v2026.11.09.03.2923 小时前
  • Spartan v2026.11.09.03.2223 小时前
  • Spartan v2026.11.09.03.1323 小时前
  • Spartan v2026.11.08.04.451 天前

贡献者

PanosK92PanosK92IkerGalardiIkerGalardipattakosnpattakosnNickeliumNickeliumMrDrElliotMrDrElliotdeg3xdeg3xdependabot[bot]dependabot[bot]DimitrisKalyvasDimitrisKalyvasApostolosBouzApostolosBouzIgnacioMGarridoIgnacioMGarridoJesseGuerreroJesseGuerreroGeorge540George540

Spartan Engine

Path traced. GPU driven.

Started before AI and developed alongside me while in the game industry.

Build Status Discord Stars License

Download  Documentation  The Plan  Wiki  Discord  X  Website


12

YEARS IN DEVELOPMENT

1

ENGINEER

600+

ENGINEERS ON DISCORD

200 Hz

VEHICLE SIMULATION
PLATFORMS GRAPHICS APIS

Windows

Linux

macOS

DirectX 12

Vulkan

Metal

Overview

Spartan is a complete C++ game engine. Path-traced global illumination, hardware ray tracing, a bindless GPU-driven renderer and a racing-grade vehicle simulation sit alongside what a shipped game needs:

Editor Lua and visual scripting
code or node graphs for gameplay
Standalone runtime Game builder
packages a world into a distributable game
Steam
achievements, stats and rich presence

The bundled worlds show the range, from Plan, a playable racing game across the island of Zakynthos, to path-traced interiors and a car showroom. Its rendering technology ships in Godot Engine and S.T.A.L.K.E.R. Anomaly, it features in a published programming book, and more than 600 engineers follow its development on Discord.

Important 重要

Built for veterans. Spartan is one engineer’s engine, so there is no support queue and no one-to-one help. There is documentation, a Lua scripting guide and a codebase written to be read. If you are a high-agency engineer who can take it from there, you can ship with it.

Showcase

Zakynthos: an open island some 30 km across, with towns, an airport, more than 200 spline roads, instanced forests and an FFT ocean
ZAKYNTHOS  ·  an island some 30 km across with towns, an airport, 200+ spline roads, instanced forests and an FFT ocean
Island coast: dynamic time of day, atmospheric scattering and shallow-water caustics Sponza: ReSTIR path tracing, no light probes, no bake
ISLAND COAST  ·  dynamic time of day, atmospheric scattering, shallow-water caustics SPONZA  ·  ReSTIR path tracing, no light probes, no bake
Ferrari LaFerrari on a turntable, lit by three emissive tubes through volumetric fog Showroom: layered car paint with clearcoat and ray-traced reflections
SHOWROOM  ·  LaFerrari lit by three emissive tubes through volumetric fog CAR PAINT  ·  layered clearcoat and ray-traced reflections
Liminal space: procedural and streamed, lit by path-traced global illumination
LIMINAL OFFICE  ·  procedural and streamed, path traced, no bake

All real-time captures. Every world is fully simulated: walkable, interactive and drivable.

Features

No bake

ReSTIR path-traced global illumination every frame. No probes, no lightmaps.

One draw per pass

The GPU owns the data. Bindless buffers, GPU culling, a single indirect draw.

200 Hz

Racing-sim vehicle dynamics inside a general-purpose engine.

Expand a section for the full breakdown.

Lighting and global illumination  ·  ReSTIR, ray tracing, IES profiles, clouds, fog, FFT ocean
  • ReSTIR path tracing with spatiotemporal reservoir resampling for real-time multi-bounce global illumination
  • Clustered deferred shading with a GPU-built logarithmic-Z grid and cone-vs-AABB culling for spots, so many local lights cost near-constant time per pixel
  • IES photometric light profiles (LM-63): spot lights emit the measured beam of a real fixture, from car headlights with regulation cut-offs to architectural downlights, with correct lumens and candela across direct lighting, volumetric fog and path tracing. A feature usually reserved for the big commercial engines
  • Hardware ray-traced reflections and shadows via ray queries
  • Atmospheric scattering and image-based lighting with bent normals
  • Volumetric clouds (Nubis-style) baked into the sky panorama, with cumulus and cirrus layers, multi-scatter lighting and aerial perspective
  • Froxel volumetric fog: one view-aligned volume for height and distance fog, sun shafts and underwater caustic shafts, with temporal reprojection and shadowing
  • FFT ocean with a Tessendorf spectrum and multi-cascade IFFT in compute, driving a camera-following clipmap with choppy displacement, dynamic normals and crest foam
  • Screen-space shadows (inspired by Days Gone) and XeGTAO ambient occlusion
  • Shadow map atlas with fast filtering and penumbra estimation
Rendering architecture  ·  bindless, GPU-driven, meshlets, universal HLSL

Geometry, materials, textures, lights, transforms and bounds live in persistent, globally accessible buffers. No per-draw descriptor updates, no per-draw resource binding, no CPU-side draw loops.

  • Zero-binding draw path: all per-draw data lives in a single bindless storage buffer, push constants carry only an index
  • Single global vertex and index buffer for all geometry (inspired by id Tech), with vertex pulling that bypasses the Input Assembler and is shared by rasterization and ray tracing
  • GPU-driven indirect rendering with per-meshlet frustum, Hi-Z occlusion and backface cone culling; the CPU issues a single DrawIndexedIndirectCount per pass
  • Meshlet clustering via meshoptimizer, with mesh shaders when available and a vertex-pulling fallback
  • Bindless everything: materials, lights, samplers, uber shaders, minimal PSO permutations
  • Universal HLSL compiled for Vulkan (SPIR-V), DirectX 12 and Metal (Metal Shader Converter)
  • GPU-side asset processing: mip generation (FidelityFX SPD) and texture compression (Compressonator) at load time, not baked offline
  • Unified deferred rendering: opaque and transparent surfaces share the same BSDF and render path
  • Async compute for SSAO and screen-space shadows, in parallel with shadow rasterization
Performance, camera and post-processing  ·  DLSS 4.5, XeSS, FSR 4 upscaling, FSR 3.1 frame generation, TAAU, VRS, GT7 tonemapping, HDR10
  • NVIDIA DLSS 4.5 Super Resolution (SDK 310.9.1) and Intel XeSS 2.0.2 (SDK 3.0.2)
  • AMD FSR upscaling (FSR SDK 2.4.0) on Windows with Vulkan and D3D12. Select AMD FSR in Renderer Options (or r.antialiasing_upsampling 5). The SDK selects FSR 4.1.2 on supported Radeon GPUs and FSR 3.1 on other supported GPUs. Run dependency setup to fetch the signed loader and upscaler DLLs. Frame generation retains its existing, separate SDK.
  • AMD FSR 3.1 frame generation (FidelityFX SDK 1.1.4) on Vulkan and D3D12, works on any vendor’s GPU, with frame-generation-aware fps, latency and frame rate limiting
  • TAAU: temporal anti-aliasing with built-in upsampling, Halton jitter and variance-clipped history
  • Variable rate shading and dynamic resolution scaling
  • Foliage impostors as the final GPU LOD, so dense forests stay cheap at distance
  • Texture streaming within a fixed memory budget
  • Custom GPU breadcrumbs for crash tracing and post-mortem debugging
  • Physically based camera with auto-exposure and physical light units (lux, lumens and kelvin)
  • Tonemappers: ACES, AgX and Gran Turismo 7 (default), with HDR10 output
  • Post-processing: bloom, motion blur, depth of field, chromatic aberration, film grain and sharpening (CAS)
Vehicle dynamics at 200 Hz  ·  Pacejka tires, thermal brakes, LSD, aero, force feedback

A full vehicle dynamics model running inside the PhysX fixed-timestep loop. Not a gameplay approximation: racing-sim fidelity inside a general-purpose engine.

System Details
Tires Pacejka MF 5.2 with combined slip, thermal model, pressure, wear and multiple surfaces
Suspension Convex hull sweep contact, spring-damper, anti-roll bars, bump stops, bump steer, camber and toe
Weight transfer Geometric and elastic lateral split via roll centre heights and roll stiffness
Drivetrain Engine torque curve, turbo, 7-speed gearbox, rev-match, open, locked and limited-slip differentials, RWD, FWD and AWD
Brakes Thermal model with fade, front/rear bias and slip-threshold ABS
Aerodynamics Drag, front and rear downforce, ground effect, DRS and rolling resistance
Steering Ackermann geometry, high-speed reduction and self-aligning torque
Assists ABS, traction control and handbrake
Integration Semi-implicit Euler with consolidated net torque per wheel
Input Controllers and steering wheels with haptic feedback
Camera GT7-inspired chase camera with speed-based dynamics
Engine systems  ·  physics, animation, particles, weather, roads, Lua, audio, editor, profiler, VR
System Details
Platforms Windows (DirectX 12 and Vulkan), Linux (Vulkan) and macOS 26.0+ (Metal 4), with prebuilt binaries in every release
Physics PhysX with rigid bodies, character kinematics and vehicle dynamics
Animation Skeletal animation with keyframed clips, crossfade blending, four-bone skinning and two-bone IK with ground-aware foot planting
Particles GPU-driven compute emission and simulation, depth-buffer collision and soft blending
Weather Rain that soaks exposed surfaces, fills puddles and keeps covered areas dry, feeding tire grip
Procedural roads Catmull-Rom spline roads with extruded profiles, terrain conforming, instanced props and path followers
Scripting Lua 5.4 via Sol2 with the full engine API and lifecycle callbacks
Visual scripting Node graph editor that compiles to Lua, with every engine API function as a node and a tutorial world
Audio 3D positional audio, streaming, reverb and procedural engine synthesis via SDL3
Cinematics Camera cut sequencer with entity tracking, spline-driven movement and exact cut timing
Entity system Component-based with transform hierarchies, prefabs and XML serialization
Threading Hardware-aware thread pool with parallel loops and nested parallelism detection
Editor Hierarchy, asset browser, inspector, script, visual script and shader editors, gizmos, profiler and memory viewer
Profiling Nsight/RGP-style timeline with graphics and async compute lanes, RenderDoc integration and a GPU/CPU memory fragmentation map
Asset import 40+ model formats (Assimp), 30+ image formats (FreeImage), 10+ font formats (FreeType)
VR (WIP) OpenXR with multiview single-pass stereo on Vulkan and DirectX 12

Quick start

Tip 提示

Just want to try it? Prebuilt binaries ship with every release; on first launch the World Launcher downloads the project assets and the worlds. Building from source? Getting started has the details.

  Windows
# then open spartan.slnx (use d3d12 for DirectX 12, or no arguments for a menu)
generate_project_files.bat vs2026 vulkan
  Linux
tools/linux_dependencies.sh && ./generate_project_files.sh gmake vulkan && make config=release_x64
  macOS 26.0+  Apple silicon, Metal 4
# needs Xcode 26, Homebrew (brew install cmake ninja) and the Metal Shader Converter
# from developer.apple.com/metal/shader-converter, then open spartan.xcworkspace
tools/macos_dependencies.sh && ./generate_project_files.sh xcode4 metal
Build targets and architecture notes

The binaries/ folder keeps executables at the top level. Windows vendor DLLs live in third_party/ (Direct3D Agility components in third_party/d3d12/), compiler intermediates and Windows symbols in build/, preferences in settings/, diagnostics in logs/, and engine-wide generated data in cache/. Existing preferences, logs, and engine caches migrate on first launch without replacing files already at the new locations. World-specific bake caches remain alongside their world resources. data/, project/, and crashes/ retain their existing roles. steam_appid.txt stays beside the executable for local Steam development. Ship the vendor folder with the executable; game exports and Windows release archives preserve its structure. Python bytecode caches are excluded from game exports.


Project generation creates one target, spartan, built for the selected graphics backend in three configurations:

Configuration What it is Executable
development Optimized with full symbols, the default spartan_<backend>_development.exe
debug Unoptimized spartan_<backend>_debug.exe
release Optimized with link-time optimization spartan_<backend>.exe

The same executable is the editor and the game: -game hides the editor panels, and a game.xml written by Build Game next to the executable turns it into a packaged game that plays its start world directly. The full list of command-line arguments is in Getting started.

With dependencies already installed, regenerate without downloading them:

tools/premake5.exe --file=tools/premake.lua --skip-setup vs2026 vulkan
# macOS
tools/premake5 --file=tools/premake.lua --skip-setup xcode4 metal

Engine and world boundary. There is no game layer in C++. source/world/WorldSystems.cpp installs the world lifecycle hooks: camera controls, vehicle render submissions, breakable trees and the optional world systems (ambient wildlife, ambient atmosphere, road details, layered road surfaces). Vehicle physics and state live under source/car, vehicle MCP commands in source/mcp/McpCommandsCar.cpp, and traffic, race drivers, route drivers, car resets and skid marks are regular components in source/world/components. The optional world systems are off by default; a world turns them on through the WorldSystems Lua table from its companion script, the .lua with the same name next to the .world (worlds/plan.lua for plan.world), which runs on every load before the roads are built. Worker model imports publish their entity hierarchy through World::EntityBatch::Commit() after construction succeeds.

Physics. Scene stepping and contact observation use game-independent callbacks; the game installs vehicle contact handling. Vehicle state is opaque to engine consumers, while the existing Physics authoring and Lua API remains compatible.

Asset ownership. World saves record native asset ownership in OwnedResources. Automatic cleanup only removes unreferenced files recorded there; unlisted files, shared libraries, sculpt data and generated caches keep their separate lifetimes. Legacy worlds acquire ownership of referenced assets when saved and do not prune unrelated legacy files.

Component attributes. Attributes exposed for editing go through the component’s setters. Raw copy-only or derived fields are read-only; use the named authoring properties for edits.

Play lifecycle. Play startup captures all authored transforms before any component starts, with both phases spread across frames. Stopping play drains completed worker batches before restoration and removal. World unload cancels staged work and clears renderer scene references and temporal history while preserving device lookup tables.

Documentation

Getting started
Build, run, command-line flags and the binaries/ layout
Architecture
The engine loop, subsystems, threading, events and profiling
Worlds and entities
Components, the .world format, prefabs and resources
Lua scripting
Script lifecycle, companion scripts, the full API and visual scripting
Rendering
Frame pass order, bindless GPU-driven design, RHI, shaders, materials
Physics and vehicles
PhysX, the 200 Hz car model, .car files, AI, input
Engine systems
Animation, audio, navigation, terrain, weather, cinematics, XR, Steam
Console variables
The cvar system and every registered cvar
Editor
Panels, shortcuts, undo and the game builder
MCP bridge
Driving the live engine from AI agents and tools
Testing and CI
Smoke tests and the build pipeline
Code style
Conventions for contributions

In the wild

Godot Engine
Integrates Spartan's TAA
Source →
S.T.A.L.K.E.R. Anomaly
Ships a rendering addon built on Spartan's source
ModDB →
Published book
Jesse Guerrero's beginner programming book features Spartan's code and community
Amazon →
Origin
A portfolio piece at the University of Thessaly under Professor Fotis Kokkoras

Projects built on Spartan code can be featured here. Get in touch →

Ready for games?

Yes. Older coverage, like “The BEST Game Engine You SHOULDN’T Use”, describes an engine that no longer exists. Back then Spartan was a renderer. Today it has the scripting, runtime, packaging and Steam support to ship, and graphically it goes further than any other open-source engine.

The one thing that hasn’t changed is support: if you need hand-holding, pick something else. If you don’t, Spartan is ready.

Community

Discord
Rendering deep dives and work in progress, with 600+ engineers.

Contribute
Contributors get exclusive perks designed to accelerate learning.

Sponsor
Funds the hosting behind the one-click setup.
Panos Karabelas podcast
Podcast  ·  Exploring the tech world and beyond, conversations across cutting-edge industries, on YouTube and Spotify

License

Note 注意

Released under the Spartan Engine License 2.0. Free for noncommercial use, and free for commercial use until a product earns $1M, for any team under $25M a year. No sign-up, no approval.

Who What you pay
Hobbyists, students, noncommercial projects Nothing
Organizations under $25M a year (revenue plus funding) Nothing until a product earns $1M, then 3% of revenue above $1M
Organizations at $25M a year or more Custom agreement, get in touch
Selling Spartan itself as an engine, SDK, or hosted service Custom agreement, get in touch
License summary

Use, modify, and redistribute the engine, including reusing its code in other projects. Keep the copyright notice identifying Panos Karabelas and the license with redistributed code; compiled distributions must carry them in documentation or accessible legal notices. No splash screen or logo is required.

Each product keeps the terms of the license version it first shipped under, for its lifetime. One-time buyouts are available on request. Third-party components retain their own licenses, and copies previously released under MIT retain their existing permissions.

See license.md for the complete terms and the license FAQ for plain-language answers.


Built by Panos Karabelas  ·  12 years and counting

评论

登录 后发表评论
暂无评论
GitRead 中文社区
深度解读 · 趋势洞察 · 价值精选

关于

关于我们联系我们编辑准则收录标准赞赏人员

发现

技术趋势新手训练营资源精选实战指南精选专题热门话题GitHub 文档

条款

隐私政策服务条款网站地图
26.9万收录项目
5.4万中文话题
155精选专题
发现技术价值,连接开源智慧
© 2026 GitRead · GitHub 中文社区 本站与 GitHub, Inc. 无隶属关系;GitHub 是 GitHub, Inc. 的商标。