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.gzSDL3 C Runtime Compiler
Yes, you have to run and you can compile (if you have cc and c++ in your PATH..)
!
Dependencies
This project uses git submodules for external libraries.
After cloning, run the following command to include my own implementation of SmartPointers
git submodule update --init --recursiveto update the submodules run:
git submodule update --remote --recursiveBetter replace my own smartpointer with std ones^^
When compiling we fetch tree-sitter and tree-sitter-pp to lex CPP
The following packages need to be findable by cmake's find\_package:
- SDL3
- FreeType
- OpenGL
In game we compile the dynamic library (Sandbox Mode) with cc and the other code from the Editor-Wall with c++, so make sure both are accessable over your $PATH variable and that they are or link to a valid c or c++ compiler.
- cc (c compiler in PATH)
- c++ (c++ compiler in PATH)
Compilation
Check that the font we use is existent at your system or fix the font path to an existing font which is actually getting set in src/text\_3d/text\_3d.hpp
sdl_runtime_compiler > grep -rI "/usr/sh" src/
src/text_3d/text_3d.hpp: "/usr/share/fonts/dejavu/DejaVuSansMono.ttf";Smash a
cmake -B build
cmake --build buildand you should find the game in the created build dir
Workflow
Almost all recent added new functions are written by ClaudeCode. I pass some files for context and let me passs the additions i have to do I rename functions and variables so i understand whats going on. I check if its time to restructure parts and sometimes do the restructuring with help of AI.
Blame AI
I am using ClaudeCode for some programming tasks (rarely any other AI you can see in the note below). As i try to always commit with "With Claude", or something like that, we can blame my source and find out how much and what is written by ai. So ChatGPT wrote me a blame scipt: blame\_ai.sh
# per file ai usage AND total ai usage of src dir
bash blame_ai.sh
# ai usage per file (highlight ai pink) and total usage at the end of the file
bash blame_ai.sh src/states/game_state.cppthis script is dumb and just checks for matching "claude|chatgpt|deepseek|gemini" in commit messages (at last thats what i told chatgpt to do)
So its in no way accurate as i sometimes merged my own stuff with AI or the other way arround OR i refractor stuff of AI or the other way arround..,- but it gives a brief idea of where AI was involved.
Which you can already see if you checkout if that comment was written by AI...