2D rendering
Batched sprites, shapes and chunk-cached tilemaps, 2D lights with normal maps, sprite masks, parallax and pixel-perfect cameras.
Forging Ferox
Open source ยท Apache 2.0 Pre-release 0.1.0
Forged in Swift. Fired by Metal.
The open-source game engine for Apple Silicon.
Ferox is a Metal-native game engine for macOS, written in Swift. 2D and 3D, physically based rendering, hybrid ray tracing, MetalFX upscaling, physics and an editor, all in small Swift modules you can read.
Features
Ferox provides the parts a small or medium 2D or 3D game normally needs, and every part is open source under the Apache License 2.0.
Batched sprites, shapes and chunk-cached tilemaps, 2D lights with normal maps, sprite masks, parallax and pixel-perfect cameras.
Clustered PBR with metallic-roughness materials (glTF compatible), skinned meshes, LOD, cascaded shadows and image-based lighting.
Ray-traced shadows, reflections and ambient occlusion where the GPU supports them, with raster fallbacks.
The Ferox temporal upscaler, MetalFX spatial and temporal upscaling, dynamic resolution and quality presets.
A sparse-set ECS with hierarchy, a fixed-timestep loop with interpolation, events and a job system.
Rigid bodies with sequential impulses, joints, triggers, queries and a character controller.
Spatial audio, retained-mode UI, animation clips and state machines, and CPU and GPU particles.
FeroxEditor offers a hierarchy, inspector, Play, Pause, Step and Stop, snapshot undo and redo, and scene files.
Transport, reliable channels and snapshot replication. Scoped as foundations, not a finished multiplayer stack.
Apple Silicon
Ferox renders only through Metal and avoids cross-platform abstraction layers, so the renderer can use what the hardware offers.
When a feature is unavailable, Ferox checks for it at run time and falls back cleanly.
| Platform | Status |
|---|---|
| macOS 14+, Apple Silicon | Primary target: full renderer, ray tracing and MetalFX where the GPU supports them. |
| macOS 14+, Intel with a Metal GPU | Intended to work, with features chosen by run-time capability checks. |
| Linux | The platform-independent modules build and are tested in CI. No renderer, window or audio. Headless mode works. |
Pre-release. The Swift sources and Metal shaders have been syntax-checked but not yet compiled, run or profiled on Apple hardware. Expect compile errors on the first build, and please report them. This site publishes no benchmark figures, because none have been recorded.
Quick start
You need macOS 14 or later and Xcode 15.3 or later, which provides Swift 5.10. Apple Silicon is recommended.
git clone https://github.com/virajshoor/Ferox.git
cd Ferox
swift build
swift test
swift run HelloFerox
Every example also runs headless, without a window. This mode works on Linux too: swift run HelloFerox --headless --frames 120
Tools
Hierarchy, inspector, gizmos, Play and Stop, undo, and opening and saving .fxscene files. It is still a basic editor, with no viewport picking and a fixed toolbar layout.
swift run FeroxEditor
Reports the GPU's capabilities and which features each quality preset enables, with an optional offscreen render smoke test.
swift run FeroxDiag --render
Repeatable CPU and offscreen GPU benchmarks with JSON output. Run them in release mode on your own machine. No results are published here.
swift run -c release FeroxBenchmarks --quick
Modules
Importing Ferox gives you every module. The individual modules can also be used on their own. Most of them do not need a GPU.
FeroxMathVectors, matrices, quaternions, colour, geometry, transforms and random numbers.FeroxCoreTime, events, jobs, logging, profiler, JSON values, handles and safe paths.FeroxSceneECS world, hierarchy, system scheduler and scene serialisation.FeroxPhysics2D and 3D rigid bodies, joints, queries and a character controller.FeroxAnimationAnimation clips and animator, tweens, timelines, and CPU and GPU particles.FeroxInputKeys, gamepads, action maps and contexts, and input recording and playback.FeroxAssetsAsset manager and database, glTF 2.0 import, and PNG and JPEG decoding.FeroxRenderMetal renderer: frame graph, passes, lighting, post-processing, ray tracing and 2D batching.FeroxUIControls, layout anchors, draw lists, text and fonts.FeroxAudioAudio model and the AVFoundation backend.FeroxNetTransport, connections, peers, replication and message coding.FeroxUmbrella module: Engine, Game, GameLauncher and the editor core. Re-exports every module.