Exo enables the writing of expressive, safe 3D games with Spectre's DbC guarantees built into the engine API.
Exo is a fully featured and uncomplicated 3D game engine, aiming to solve the issue of over-engineering in 3D game logic by adopting a near-declarative, builder-style approach to scene construction and management.
It leverages the Spectre Programming Language, offering C-like performance (working with both the QBE and C99 backends), and allowing for a modern, DbC approach to game programming that enforces safety whilst retaining performance.
As with every other project in the Spectre ecosystem, Exo is always open to contributions, so instead of complaining, maybe contribute.
Exo uses a builder API that keeps the game code readable and declarative. Thus, there is no need for XML, YAML or any editor lock-in, only Spectre source code is required, which compiles quickly and reads as if it were documentation.
fn build_water_scene() ecs.Scene3D = {
val scene: mut ecs.Scene3D = ecs.new_scene(
ecs.make_light(
ecs.make_vec3(0.0 as f32, 4.5 as f32, 0.5 as f32),
ecs.make_vec3(0.72 as f32, 0.88 as f32, 1.00 as f32),
2.0 as f32,
10.0 as f32
)
)
scene.gravity = 0.0
val water: mut ecs.WaterSurface = ecs.make_water(
-0.575 as f32,
0.0 as f32,
0.0 as f32,
0.0 as f32,
0.0 as f32,
ecs.make_vec3(0.18 as f32, 0.52 as f32, 0.82 as f32),
1.4 as f32,
0.018 as f32,
2.8 as f32,
0.35 as f32
)
water.fit_scale = 0.71 as f32
scene.water = some water
return scene
}
$ spectre init
$ spectre add https://github.com/navid-m/exo.git
Ship your first 3D scene.