A port of the simple race game from MTK OS to SDL2 and Emscripten.
- Arrows and 4, 6, 8, 2 on Keypad – Movement.
- Space, Return and 5 on Keypad – Fly.
- Tab, N and 0 on Keypad – Switch MIDI.
- M and 7 on Keypad – Mute sound.
- F1 Race page.
Ready-to-run game builds are available in the "Releases" section.
Linux, Ubuntu 22.04 LTS: Install the SDL2 and SDL2_mixer libraries before starting the game.
$ sudo apt install libsdl2-2.0-0 libsdl2-mixer-2.0-0
$ ./F1-Race
Web: Add a MIME type for WASM to serve files properly.
More information about this here: Hosting a WebAssembly App.
Nginx: Add this to the http
section of the configuration file:
types {
application/wasm wasm;
}
Apache: Add this to the apache2.conf
or httpd.conf
configuration files:
AddType application/wasm .wasm
Install MSYS2 first and run "MSYS2 MINGW64" shell.
$ pacman -S mingw-w64-x86_64-make mingw-w64-x86_64-gcc
$ pacman -S mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_mixer
$ mingw32-make build-windows
$ mingw32-make build-windows-static # Alternative, maybe broken over time.
$ sudo apt install build-essential libsdl2-dev libsdl2-mixer-dev
$ make build-linux
Install Emscripten first.
$ source /opt/emsdk/emsdk_env.sh
$ make build-web
Thanks to @nehochupechatat for source and @OldPhonePreservation for original MTK MIDIs.