sdl_runtime_compiler git · main
SDL3 game for running and compiling code at runtime
C++ 72.3% C 26.2%git clone https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler.gitwget https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler/archive/sdl_runtime_compiler.tar.gzsrc/levels/level/sandbox.cpp raw
#include "levels/level.hpp"
#include "utils/config.hpp"
namespace
Nimbin
{
Level::Data
Level::build_Sandbox()
{
return {
.steps = {
{
.grants = { },
.scene = {},
.goal = Goal::AllOf{},
.hint = "Spawn a box with box(x,y,z, hx,hy,hz);",
.details = R"(This level IS the code you write.
The editor wall is a C library. When you Compile, the game
rebuilds it and spawns whatever your code describes.
Two helpers are available:
box(x, y, z, hx, hy, hz, dy); - a solid box at (x,y,z), half-size (hx,hy,hz), is_dynamic (dy)
text(x, y, z, "word"); - floating text at (x,y,z)
Build something like:
box(0, 5, -3, 1, 1, 1, 0);
Then press the Compile pult. Edit and recompile freely.)",
.reset_carry = true,
.max_ai_words = 0,
},
},
.name = "Sandbox",
.desc = "Build the world yourself: compile a library that spawns objects.",
.source_file = "assets/sandbox.c",
.dynamic_lib = true,
};
}
} // namespace Nimbin