SP4CEBAR 2025-10-07 14:40 (Edited)
Open In Editor (single player)
An NX program can save data to a file named "Disk.nx". On IOS, your NX programs, including your Disk.nx, are stored on iCloud, platforms like MacOS and Windows have more freedom but could store them on iCloud as well. iCloud allows collaborating on a file online with others, so I shared a Disk.nx with all of you (two actually, see section "Servers" below). When using this shared Disk.nx instead of your current Disk.nx, your program can "talk" to others that use the same disk. This program is made to play a simple game as turn-based online multiplayer. I expect the program to be easily modify-able for other turn-based online games.
Now that you are ready to play, here are some guidelines to avoid confusing the program:
cat Disk.nx in a terminal) to see the latest changes to the file.I shared Disk.nx files on iCloud (see "Servers" below): Save one to your iCloud, then move it to your "Lowres NX" folder on iCloud, then NX should be able to use it. See instructions above on "how to play". Don't confuse your "recents" folder with your "Lowres NX" folder like I did.
if the shared disk were in use, you could use another one
⚠️ Tread with caution: anyone on the internet could have modified one of the Disk.nx files I shared
SP4CEBAR 2025-10-08 15:41 (Edited)
You may treat this code as an example of a turn-based multiplayer game, you could for example modify it into a card game.
If you are more adventurous, you could mess with the code to make different multiplayer rules: game where each player can prepare their moves all at once before the result of them is revealed, like rock paper scissors.
You could even try to let each connected program modify their file (channel) continuously to sync the states of more action-packed games.
4 + TIMER MOD 12SP4CEBAR a sneaky markdown trick
I tested it on Linux by running two NX instances and it actually works!
SP4CEBAR 2025-10-08 19:47 (Edited)
jpospTynker 2025-10-09 00:02
this is SICK! it’s crazy multiplayer works in LOWRES NX now
SP4CEBAR 2025-10-09 11:51
I'm glad you like it!
SP4CEBAR 2025-10-09 13:49 (Edited)
SP4CEBAR 2025-10-09 14:37 (Edited)
Now you can play multiplayer on IOS! See program desciption above for more details.
Please let me know if you managed to open and modify the Disk, with an NX program on platforms other than IOS. I also just updated the description to provide more instructions and details.
SP4CEBAR 2025-10-09 16:24 (Edited)
jpospTynker 2025-10-09 21:42
this is awesome, definitely doing something with this! imagine 12-player Co-op with fellow NXers!
SP4CEBAR 2025-10-10 13:06 (Edited)
I love the enthausiasm! I updated the instructions to make it clear for most platforms how to play.
All we need now is to arrange a time when anyone that wants to play will be online to play!
...as well as a joining order (with around 30 seconds between each joining player)
SP4CEBAR 2025-10-10 13:22 (Edited)
Also, if anyone wants to modify this turn-based online multiplayer example into a more complex game such as a card game, feel free to do so:
SP4CEBAR 2025-10-10 18:45 (Edited)
G A M E: G U E S S T H E N U M B E R" should contain all the code that defines the game behavior. It should be all you need if you just want to change the gameplay but keep the roundsT U R N - B A S E D M U L T I P L A Y E R" should contain all the code that defines the multiplayer rounds behavior. Modify this, if you want to make multiplayer games without rounds like rock-paper-scissors, or terraria (definitely the same level of complexity :) )SP4CEBAR 2025-10-11 08:51
Here's an invitation to play multiplayer: Do You Want To Play The First Online Multiplayer Game?
M&J Coding and Technologies 2025-10-11 14:38
Ummm I’m kinda confused could you simplify it. Btw I’m on iOS
SP4CEBAR 2025-10-11 20:00 (Edited)
Thanks for the feedback!
TL;DR
An NX program can save data to a file named "Disk.nx". On IOS, your NX programs, including your Disk.nx, are stored on iCloud. iCloud allows collaborating on a file online with others, so I shared a Disk.nx with all of you (two actually, see section "Servers" above). When using this shared Disk.nx instead of your current Disk.nx, your program can "talk" to others that use the same disk. This program is made to play a simple game as turn-based online multiplayer. I expect the program to be easily modify-able for other turn-based online games.
jpospTynker 2025-10-11 20:20
woah now i wanna make a 4 player platformer
jpospTynker 2025-10-11 20:21
imagine r/place or something with this
SP4CEBAR 2025-10-12 06:16 (Edited)
Good luck, feel free to use code from here such as the connection phase. You can test multiplayer by opening an NX program twice on PC to launch two instances, you won't need any cloud for this. The possibilities are endless,
SP4CEBAR 2025-10-12 14:46 (Edited)
Even though it's short, it is hard to read what it does
MULTIPLAYER_TURNS:
IF TARGET_CLIENT_COUNT > 1 THEN GOSUB RIVAL_TURN
IF CLIENT_ID = TURN_ID OR TURN_ID = -1 THEN GOSUB YOUR_TURN
RETURN
This is much more straightforward
MULTIPLAYER_TURN:
IS_YOUR_TURN= TURN_ID = CLIENT_ID
IF IS_YOUR_TURN THEN
GOSUB YOUR_TURN
ELSE
GOSUB RIVAL_TURN
END IF
RETURN
We also don't need the IS_YOUR_TURN variable anymore
jpospTynker 2025-10-12 15:07
i will try to make a platformer from this, with the acceleration the only thing online and the positions being stored in the game itself, but i still feel it will be nonstop conflict issues i have to fix :/
SP4CEBAR 2025-10-12 18:30
Good luck, have fun!
cmos 2025-10-14 02:30
too bad i don't have icloud D; (or anything apple for that matter)
i might try to get a google drive disk.nx up,
but no promises!
SP4CEBAR 2025-10-14 11:19 (Edited)
Good luck! note that the "Disk.nx" file has a capital "D", otherwise NX may not be able to find it.
You could also create a new apple account here, it does not require any apple device, but will give you 1GB instead of 5GB of iCloud drive. It also won't give you an "@icloud.com" email account