diff --git a/.gitattributes b/.gitattributes index e32787d..a89a9aa 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ Data/** filter=lfs diff=lfs merge=lfs -text +Tools/*.7z filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore index 21aaed6..2d36d7e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ Build/ Nocheckin/ feely_pona_build.exe feely_pona_version.txt +Tools/emsdk diff --git a/build.bat b/build.bat index 329a4df..f395b9e 100644 --- a/build.bat +++ b/build.bat @@ -19,7 +19,7 @@ copy feely_pona_build.exe %code_dir% 1>nul popd REM Run the build program -%code_dir%\feely_pona_build.exe --dev-fast-build %* || exit /B 1 +%code_dir%\feely_pona_build.exe %* || exit /B 1 popd exit /B 1 diff --git a/feely_pona_build.cpp b/feely_pona_build.cpp index b0b6b05..5b8a755 100644 --- a/feely_pona_build.cpp +++ b/feely_pona_build.cpp @@ -80,7 +80,7 @@ void RebuildProgramIfRequired(int argc, char const **argv) } #endif -#define PRINT_HELP Dqn_Print_StdLnF(Dqn_PrintStd_Out, "USAGE: feely_pona_build [--help|--dry-run|--web]") +#define PRINT_HELP Dqn_Print_StdLnF(Dqn_PrintStd_Out, "USAGE: feely_pona_build [--help|--dry-run|--web|--fast-dev-build]") int main(int argc, char const **argv) { Dqn_Library_Init(Dqn_LibraryOnInit_Nil); diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..badeaa3 --- /dev/null +++ b/readme.md @@ -0,0 +1,65 @@ +# Feely Pona (aka. Terry Cherry) + +This is the repository for the game Terry Cherry that was developed as part of +an impromptu game-jam in September 2023 over 4 weekends to make a hero ++ tower-defense mashup combination game. The game was developed in C++ using +Raylib 4.5.0 as the base framework for the game. + +This game was developed with 3 people + +- Doyle: Engine & gameplay programmer +- Joshalosh: Game designer, sound, gameplay programmer +- Tom: Art + +This game is currently available online at [Terry +Cherry](https://game.doylet.dev/terry_cherry). + +## Building + +We target Windows and the web via WASM using Emscripten. The game is built +using our C++ meta build program (which generates command invocations and +forwards them to the command line). + +### Windows + +You must ensure you have MSVC's `cl.exe` on your path to build. This game was +tested on MSVC 2023 (v14.34.31933). + +For most intents and purposes you may simply execute `build.bat` on Windows +which bootstraps the build program and automatically calls the meta-build +program. With fast computers nowadays our default is to build all targets by +default (except web due to extra toolchain requirements). + +### Web + +A web ready version using WASM can be built by passing `--web` to the meta build +program/script. You must have the EMSDK toolchain activated and in your path +from [Emscripten SDK](https://github.com/emscripten-core/emsdk). This repository +provides a slimmed down version of EMSDK in the `Tools` folder zipped up and +served over Git LFS. + +The slimmed down EMSDK is the official download with a bunch of unused binaries +and directories removed that aren't strictly necessary for building the web +target (e.g. provide a stub Java version file to skip it, delete unused clang +binaries). + +Unzip the slimmed down EMSDK `Tools/2023-10-10_emsdk_40e9cd8f.7z` or install +from Github and download the latest SDK. A full build for the web target can +then be done by + +``` +# Run EMSDK's script to add the toolchain to the path +Tools\emsdk\emsdk.bat activate latest + +# Build the game +build --web +``` + +This will produce at `Build\Terry_Cherry_Emscripten` a HTML and WASM file ready +to be served by the browser. To test it locally you may start up a local server +for that directory, e.g. + +``` +cd Build\Terry_Cherry_Emscripten +python -m http.server +```