nbody simulation in C using raylib
  • C 80%
  • Lua 10.2%
  • GLSL 9.8%
Find a file
Stef c7c7bb3bf9
add default light shader for our sun
Signed-off-by: Stef <stef.robbe@protonmail.com>
2026-04-14 15:10:37 +02:00
.claude start adding lighting shader 2026-04-14 12:33:33 +02:00
src add default light shader for our sun 2026-04-14 15:10:37 +02:00
.clang-format holys hit a bouncing ball 2026-04-06 11:35:44 +02:00
.clangd holys hit a bouncing ball 2026-04-06 11:35:44 +02:00
.gitignore holys hit a bouncing ball 2026-04-06 11:35:44 +02:00
README.md holys hit a bouncing ball 2026-04-06 11:35:44 +02:00
xmake.lua start adding lighting shader 2026-04-14 12:33:33 +02:00

nbody

nbody simulator in C using Raylib.

Development

Adding packages

xmake require raylib

Then both of these lines are needed in xmake.lua:

add_requires("raylib")        -- declare the dependency

target("myproject")
    set_kind("binary")
    add_files("src/*.c")
    add_packages("raylib")    -- ← wire it to your target

Building & running

xmake              # build
xmake run          # run
xmake f -m debug   # switch to debug build
xmake f -m release # switch to release build
xmake clean        # clean build artifacts

Editor / LSP

Generate compile_commands.json so clangd knows about your includes and packages:

xmake project -k compile_commands

Re-run this whenever you change xmake.lua (add packages, change flags, etc.).


Package management

xmake require --list           # list installed packages
xmake require --info raylib    # details: version, path, flags
xmake require --clean          # remove unused packages

Packages are cached globally at ~/.xmake/packages/