Loosely following 2D Game Physics Programming
$ ./build.sh
$ cd build
$ # If you do not have sdl3 installed on system, make sure linux can find built
$ # from source.
$ if ! pkg-config sdl3; then export LD_LIBRARY_PATH="$PWD/3rdparty/SDL3-3.2.8-install/lib64"; fi
$ ./game- Setting
LD_LIBRARY_PATH=./causes app to segfault while recompiling.
This was discovered while copying libSDL3.so to current directory, then trying to hot reload game library.
Doing so will cause the app get SIGSEGV signal.
Reproduce Steps:
$ ./build.sh
$ cd build
$ export 'LD_LIBRARY_PATH=./'
$ ./game
$ ./build.sh # recompileCore applications come from cosmopolitan libc.
You can download individual files from https://cosmo.zip/pub/cosmos/bin or extract zip from https://cosmo.zip/pub/cosmos/zip/cosmos.zip
For building our game we need:
- bash
- cp
- cut
- date
- echo
- head
- mkdir
- mv
Compiler we support is clang. You can download prebuilt from llvm/llvm-project.
You also need Build Tools for Visual Studio 2022.
winget install Microsoft.VisualStudio.2022.BuildTools --force --override "--wait --passive --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows10SDK.16299"
Within Microsoft's docs you can find the IDs of the features available for the Visual Studio Build Tools and in this section also learn more about other parameters available for the installer.
$ export CC=clang.exe
$ ./build.sh
$ cd build
$ ./game