o
odinpkg.dev
packages / app / karl2d-example

karl2d-example

f2eca41app

example game using karl2d library

No license · updated 2 months ago

dependencies:

# pull down karl2d submodule
git submodule update --init --recursive
# optional install fswatch if you want file watching
sudo apt get fswatch
# or maybe `brew install fswatch` on macos

hot reload:

./build_hot_reload.sh
./game_hot_reload.bin
# make a change to the code and then build again:
./build_hot_reload.sh
# or watch source files for changes and automatically compiles them:
./watch_hot_reload.sh

run on desktop:

odin run .

web build:

odin run ./libs/karl2d/build_web/ -- .

to run web build:

# build_web builds into ./bin/web/
cd ./bin/web/
# run simple webserver to serve the files
python3 -m http.server
# launch web browser on localhost:8000
firefox localhost:8000