This is an endless runner style game for the tkyosam fam.
This game is compatible with touch screen devices and PC with mouse and keyboard.
You can play the game here: Tkyospaghetti
Platform | Status |
---|---|
Windows - MingGW | ✔️ |
Windows - MSVC | ✔️ |
OSX | ✔️ |
Browser - Emscripten | ✔️ |
Browser - Emscripten (with docker) | ✔️ |
How to clone:
git clone --recurse-submodules https://github.com/Reesy/TkyoSpaghetti
This project has a dependency on SDL2
, SDL2_image
, SDL2_mixer
and SDL2_ttf
(which I have bundled under /libs) but can be found at libsdl.org.
- Requirements
- CMake -- required to build this project
- Optional Requirements
- emscripten/emsdk -- required to build this project for the web
- python2 -- required if you want to host for the web via python2
- docker -- required if you want to host for the web via docker
- Recommended Plugins
- C/C++ Plugin
- CodeLLDB*
To build a Visual Studios project (the .vcxproj file will be placed in the sdl2-emscripten-project-template/build folder)
cmake . -B build
To build a release on OSX or MinGW (if using -G "MinGW Makefiles"
):
cmake . -B build
make
To build for browser with Emscripten (requires emscripten installed and on the path):
emcmake cmake . -B build
cd build && make
To build with debug symbols (on OSX):
cmake -DCMAKE_BUILD_TYPE=Debug . -B build
make
This project comes with a .vscode folder prebundled to make debugging easier, for this to work two plugins are necessary
*CodeLLDB is only recommended for debugging on modern OSX versions
Emscripten command (manually):
emcc src/main.cpp -O3 -s USE_SDL=2 -s USE_SDL_TTF=2 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS='[\"png\",\"jpg\"]' -s USE_SDL_MIXER=2 -s USE_FREETYPE=1 -s ALLOW_MEMORY_GROWTH=1 --preload-file resources/
Running in small httpserver with Python 2:
python -m SimpleHTTPServer 8080
This will create a make file and copy a basic index.html and python script to the embuild folder
emcmake cmake -B embuild .
cd embuild && make
Serving the file using httpserver with Python 2: python -m SimpleHTTPServer 8080
The emscripten build must me run first
emcmake cmake -B embuild .
cd embuild && make
docker build -t <desired_image_name> .
docker run --name <desired_container_name> -p <desired_port>:3000 <desired_image_name>
You will then be able to view the application on http://localhost:<desired_port>
i.e http://localhost:3000
SDL2 can be found https://www.libsdl.org/
Art By: Brandon
Background Found here: https://wallpaperaccess.com/pixel-city
Music By: https://soundcloud.com/victor-bui-trong Collision sound: https://freesound.org/people/JustInvoke/sounds/446125/ Jump sound: https://freesound.org/people/elektroproleter/sounds/157568/