bermainis an indonesian word forplay
prereq:
- jank (currently using not-yet upstreamed windows port)
- and jank's cpp toolchain (windows: msys2, untested in other OS)
- babashka
- Vulkan SDK to precompile shaders
- and more listed in
bb prepsection
this jank project uses deps.edn via tools.bbuild (this deps should be automatically fetched by bb on the first call)
preparation (need to run only once)
bb prep
# this does
bb lets prep-kondo # this shells out to clj-kondo (optional, this fetch the configs from dependencis via --copy-configs)
bb lets build-sdl3 # this git clone SDL3 repo to an adjacent folder, then shells out to whatever SDL3 needs to build
bb lets compile-shaders # this shells out to Vulkan SDK's `glslc`, and compile everything in `shaders` folderdevel
# run-main
bb jank
# repl-dev
bb repl-dev
# and calva connect
# aot compile
bb lets workaround
bb compile
./target/bermain.exe
# ayo bermain jank!
# about workaround:
# when running with run-main, jank require `lib` prefix for .dll files, while the compiled one require no `lib` prefix
# reported here: https://github.com/ikappaki/jank-win/issues/37cleaning
bb lets clean
bb lets clean-shaderswhile tinkering, these were some aspect about jank that took me a bit of time to figure out.
- #cpp float values
; I thought below would work
(cpp/SDL_FColor #cpp 1.0 #cpp 1.0 #cpp 1.0 #cpp 1.0)
; but SDL_FColor require floats, and clojure is double by default
(cpp/SDL_FColor (cpp/float 1.0) (cpp/float 1.0) (cpp/float 1.0) (cpp/float 1.0))- I thought
.was necessary
(cpp/SDL_Event.)
(cpp/SDL_Event)
; is the same?