2 ms·
I do that for my own game engine. Wrote a very thin layer in C (C99 to be exact) that has all the low-level stuff, tight loops and things that require to be dat
by deorder 8y ago
I do that for my own game engine. Wrote a very thin layer in C (C99 to be exact) that has all the low-level stuff, tight loops and things that require to be data-oriented. I do everything else on top in Lua. I use libclang to automatically create the Lua bindings from the C code using annotation attributes (X is just a macro around `__attribute__(())`), for example when using `X(ADD) xvector2_t xvector2_add(const xvector2_t a, const xvector2_t b)` it will make sure that this function is called when using the `+` symbol between 2d vectors in Lua. When needed (for performance) I can always move things from Lua to C.