Skip to content

e2dk4r/pikuma-2d-game-physics-programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loosely following 2D Game Physics Programming

Build for Linux

$ ./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

Gotchas

  1. 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 # recompile

Build for Windows

Core 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages