sm64ex-coop
Unsanctioned WIP fork for Android and other open-source UNIX-like operating systems that are not supported by the normal sm64ex-coop
, plus improved touchscreen controls. Online multiplayer mod for SM64 that synchronizes all entities and every level for multiple players. Fork of sm64pc/sm64ex. Contains code copied from AloXado320/sm64ex-alo, VDavid003/sm64-port-android, VDavid003/sm64-port-android-base, and porcino/sm64-port-android.
Feel free to report bugs and contribute, but remember, there must be no upload of any copyrighted asset.
Run ./extract_assets.py --clean && make clean
or make distclean
to remove ROM-originated content.
How to Play on Android
Click here to read the guide for Android.
Android 14, which released on October 4, 2023, partially breaks sm64ex-coop builder Termux v0.1.2, but not entirely. My advice for using sm64ex-coop builder Termux v0.1.2 on Android 14 is to type
apt-mark hold bash && yes | pkg upgrade -y
and press Enter, then wait for the command to complete, then touch "Exit (touch to reset)" in your notifications, then open sm64ex-coop builder Termux again. This bug is a manifestation of upstream Termux bug #3647 in sm64ex-coop builder Termux, and this workaround is my recommended implementation of the solution for upstream backported to sm64ex-coop builder Termux v0.1.2. This behavior will eventually be fixed in a future release of sm64ex-coop builder Termux once I decide the current release is too broken to continue distributing sm64ex-coop for Android.
- The easiest way is to download sm64ex-coop builder Termux
Click here to build the .apk
from a non-Android device.
Recording showcasing new touch controls features:
sm64excooptouchcontrols.webm
Recording showcasing several mods:
olaiabuttons.webm
All custom icons by xLuigiGamerx#6999!
What works:
✅ Direct connection - client and server (VPN guide here)
✅ GPU acceleration
✅ Normal audio
✅ (most) DynOS and Lua mods
✅ Touch controls
✅ Fullscreen
✅ External gamepads
What doesn't work:
❌ Some Lua mods on some devices
❌ Crash when "skip intro cutscene" option is used on some devices
❌ Occasional crash when loading HD texture packs - try restarting app
❌ Discord
❌ BASS audio
How to Play on any open-source UNIX-like OS
This repository also contains changes meant to make porting sm64ex-coop
to open-source UNIX-like operating systems easier (the normal sm64ex-coop
only supports GNU/Linux and MacOS at the exclusion of others). On many of them, setting up the dependencies (a C and C++ preprocessor and compiler, GNU Make, readline, binutils, libcurl, Python 3, SDL2, GLEW, an OpenGL or OpenGL ES graphics driver, and an SDL2-compatible display server) can take many steps that vary dramatically, so I've decided not to make a complete walkthrough for every single one like I have for Android. Once you have all of those configured just right, though, you'll be able to compile and play this way, and hopefully you'll only need to make minor adjustments to the Makefile
to detect the dependencies the way your OS needs it to.
git clone --recursive https://github.com/robertkirkman/sm64ex-coop.git
cp /path/to/baserom.us.z64 sm64ex-coop/baserom.us.z64
cd sm64ex-coop
TOUCH_CONTROLS=1 make
build/us_pc/sm64.us.f3dex2e
To get you started, I've confirmed my fork to work on the following operating systems (as well as GNU/Linux), and have committed initial changes for them:
✅ postmarketOS
✅ FreeBSD
✅ OpenBSD
There are some bugs when running on them, but I've fixed just enough to get sm64ex-coop
to compile, launch and host servers with mods in a playable state on them. On OpenBSD and FreeBSD, to build, I install pkg-config
and temporarily symlink make
to gmake
, gcc
to clang
, g++
to clang++
, and cpp
to clang-cpp
. On postmarketOS, I use clang
and install bsd-compat-headers
. I strongly suspect that if your device has a non-amd64
architecture and you find bugs, you'll probably want to look through my "__ANDROID__
" #ifdef
s in the code and check whether the code I've placed in them turns out to be architecture-related rather than Android-related.
How to get this mode
Build on Android for X11 windowing backend and launch in Termux:X11. Use your preferred Termux:X11 graphics driver(s);
virglrenderer-android
shown as example.
pkg install x11-repo
pkg install git wget make python getconf zip clang binutils sdl2 zlib libglvnd-dev termux-x11-nightly xfce virglrenderer-android
pkg remove which # having which installed selects SurfaceFlinger windowing backend, and not having it installed selects X11 windowing backend. sorry for this insanity. also remember to uninstall libglvnd anytime you build for SurfaceFlinger windowing backend.
git clone --recursive https://github.com/robertkirkman/sm64ex-coop.git
cp /path/to/baserom.us.z64 sm64ex-coop/baserom.us.z64
cd sm64ex-coop
USE_GLES=1 TOUCH_CONTROLS=1 NO_PIE=0 make
virgl_test_server_android &
termux-x11 :0 -xstartup "xfce4-session" &
DISPLAY=:0 GALLIUM_DRIVER=virpipe build/us_pc/sm64.us.f3dex2e
How to Play on Windows
Instructions on how to play are available on the wiki.
- The easiest way is to download coop-compiler
Goal (accomplished)
Create a mod for the PC port where multiple people can play together online.
Unlike previous multiplayer projects, this one synchronizes enemies and events. This allows players interact with the same world at the same time.
Lua
sm64ex-coop is moddable via Lua, similar to Roblox and Garry's Mod's Lua APIs. To get started, click here to see the Lua documentation.
Contribution
If you want to make a PR to sm64ex-coop, join the Discord server and communicate with us about your PR. We work on new sm64ex-coop releases on a private repo and push all of our changes to the main repo once we've added everything, so if you contact us we can give you access to that repo where you can PR your changes there.