mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 06:59:57 -04:00
Add an experimental co-op through Steam: rooms, invites, names in the world, chat and shared progress.
Up to four players, each in their own game and save, meet in a room. Rooms are Steam lobbies and the games talk through Steam's networking, so nobody forwards a port and nobody runs a server. The game signs in to Steam as its test app (480), so Steam shows the player as playing Spacewar. Off by default; the menu has a Co-op tab with Create a room, Join a room by its ID, Invite a friend, the players, chat and Leave, in English, Russian, Brazilian Portuguese and Simplified Chinese. runtime/steam.c loads steam_api64.dll from beside the exe at run time and declares the C functions it calls itself; nothing of the Steamworks SDK is in the repository, and a player copies the file from a Steam game they have. runtime/coop.c is the room: the lobby's owner is the host, lets games of the same protocol and game build in and lists them, and every game takes positions, chat and progress only from the players on that list. runtime/coop_game.c reads Link from the Player actor and shares progress, items, songs and quest items through the game's own flag routines, each value only ever raised; small keys, rupees, ammunition and hearts stay each player's own, and the save is copied to coop-backup before anything of a room reaches it. The other players show as a name with a distance where their Link stands, projected with the upscaler's camera. One Steam account cannot be in a lobby twice, and this PC has not the memory for two games, so the room and the game side were run with one game and tests/coop_peer.py as the second player over runtime/coop_local.c, a stand-in for Steam on 127.0.0.1 that only the environment turns on: the peer was let in, saw the game's Link in Hyrule Field, chat went both ways, the save was copied, one flag the save lacked was set and a flag the game does not share was refused. On Steam itself one game signed in as app 480, made a room, showed its ID and the player's Steam name on the Co-op tab and left. Not run: two Steam accounts in one room, an invite, a join by room ID over Steam, a host that leaves, a removal, and the menu's text probe on this build. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -637,6 +637,20 @@
|
||||
# The key of the application's uploaded art asset (Rich Presence > Art Assets) shown as the status's large image.
|
||||
# discord_image = nx2navi_512x512
|
||||
|
||||
[coop]
|
||||
# Co-op, experimental: play with friends over Steam, each in their own game and save (docs/coop.md). The game signs in
|
||||
# to Steam as its test app, so Steam shows you as playing Spacewar; it needs Steam running and Steam's library file
|
||||
# steam_api64.dll beside ocarina.exe. Rooms are made and joined in the menu's Co-op tab, never from this file.
|
||||
# 0 = off, the game uses no network. Takes effect at once.
|
||||
# coop = 0
|
||||
# In a room, share progress, items and songs with the other players; your save is copied to coop-backup in the profile
|
||||
# folder first. 0 = only names, positions and chat.
|
||||
# coop_share = 1
|
||||
# Show the other players' names where their Link stands (needs DLSS, FSR or TAA on).
|
||||
# coop_names = 1
|
||||
# Show new chat lines, and who joined or left, over the game while the menu is closed.
|
||||
# coop_chat = 1
|
||||
|
||||
[audio]
|
||||
# none mixes without opening an audio device.
|
||||
# audio = default
|
||||
|
||||
Reference in New Issue
Block a user