Nimbin[12]?SDL & Graphics / sdl_runtime_compiler / info.txt

sdl_runtime_compiler git · main

SDL3 game for running and compiling code at runtime

sdl3 c++ compiler dlopen cmake · first commit 2026-04-19 · last commit 2026-07-03 (3 months ago) · synced 3 days ago · upstream: git.ide3.de/hsnr/sdl-runtime-compiler

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.gz
info.txt 3.6 KB · 103 lines raw
wall size should be monitor size
text size match somehow
---------------------------------

zoom to wall on key press down. if other key pressed move to wall.
    if zoom on editor "i" to start and jump?
add jetpack?
--------------------------------
i need to store the big info text meshes so displaying them is not that expensive.

---------------------------------

Text::Handler
    - handles tokens and lines as one commplete text structure so it can easily get tokenized from tree-sitter
    - holds text like in a textedocument. so text has a width, height text-align line-height, word-spacing cursor position, scroll position, position in world space
    - gets lexed from tree-sitter
        - if the text changes re lex and set color 
    - lines<Line>
        - tokens<Token>
    - render options, underline lines, border text-window , font-size,..
    - can handle token rotation (so all tokens follow player in a specific rotation (makes it easy to read the text -- is actually implemented))
    - can render the tokens

Text::Line
    - position, linenumber, shallRenderNumbers, line height, word spacing
    - tokens<Token>
    - can belong to Text

Text::Token
    - color from Text tokenizer or
      color from single token linting if not belonging to a text (save that value) or
      color because the color shall be a static color (can get set)
    - gets parsed from tree-sitter if not already known
        - list of tookens for fast lookup if creating new ones
    - has a position in world space
    - can get picked up and shot with projectile
    - can belong to Line
    - rotate to players eye horizontally
    - rotate to players eye vertically
    - rotate to players eye horizontally and vertically
    - (old Text3d)

Token::Ai
    - jiggle
    - hover
    - attack player (steal token/drop token)
    - flee from player

A Token can  shoot another Token out of a Text with a Projectile. 

I can pick up tokens out of a Text (as we currently can from the EditorWall)

Linting is an asyncroun job. before Token get a default color. We take the Linting when it is ready , we dont wait for it. We just need to recreate the text mesh if the token key has changed.

Tokenizer(TreeSitter)
    - lexes in background and applies color and key when found to token.
    - Lexes when Text changed

Wall::Editor
    - can own Text
    - vim like editing option
    - fixes Text position on the wall
    - i can shoot words inbetween other words or lines (as we can)
    
Text
    - big namespace with classes and structs
    - Text in plain
        - we might want to store that tokenized or in lines or in lines and tokenized depending on whats enabled
    - can get rendered
        - has a default color
        - can jiggle
        - can get editted with vim like style at the editor wall par example
    - can be a label/get gicked/ etc
    - can get tokenized for tokenized-coloring (tree-sitter)
    - can get scrolled to a specific position


struct Text 
{
    
}
----------------------------

- Dont pick up words through floor


-----------------------------
- i need a propper Word class
    - currently have "WorldText" but 
    - create new word -- init
    - detect collission with word -- physics should be in "system/physics,..."
        - so "WorldText" needs a cleanup?
    - move word -- update -- is also physics?
    - how to handle pick up?
    - how do we keep track of all words?
        - extra class for (datatypes, names,....)
    - i need a bin to remove a word
    - i need a funneal to add a word to wall
    - draw belongs to "world"?

- i need a Wall that displays the words we added to "code"
    - need a posibility to remove a word
    - text slides up if i add a ";" or a "\"