NetworkSync
A mod API for network synchronization and communication
模組介紹 作者原文
Network Sync API for Zelda 64: Recompiled
A multiplayer networking framework for Zelda 64: Recompiled that enables Actor synchronization across different game instances.
[!WARNING]
This project is still in active development and the API is subject to change. It represents an experimental implementation of networking capabilities and should be considered a work-in-progress.
Project Overview
This project consists of several components that work together to provide network functionality:
- Network Sync API (network-sync) - An API mod that exposes networking functionality to other mods
- Network Sync Runtime (network-sync-runtime) - A Rust-based dynamic library that implements the networking logic
- Network Server (network-sync-server) - A webSocket server that handles player connections and data relay
- Test Mod (network-sync-test) - A sample implementation that demonstrates the networking functionality
API Reference
See the full API Documentation for detailed information about available functions and data structures.
The Network Play API provides functionality for:
- Connecting to network servers
- Joining and leaving multiplayer sessions
- Synchronizing actor data across game instances
- Retrieving information about other players in a session
Architecture
The system uses a client-server architecture where:
- A central websocket server manages connections and relays player state
- Each game instance connects to the server as a client
- Players can join "sessions" where their data is synchronized
- Actor attributes are synchronized across game instances
Limitations
- Currently only synchronizes limited player data (position, rotation)
- Limited error handling and reconnection logic
Test Implementation
The test mod demonstrates:
- Connecting to the server at game startup
- Joining a predefined session
- Synchronizing the player's position
- Rendering remote player models
Setup & Building
Prerequisites
- Clang and Make for building the C components
- Cargo/Rust for building the Rust components
- Zelda 64: Recompiled installation
Building the Project
- Clone this repository:
git clone
cd mm-network-sync
- Build the runtime, C API mod, and test mod:
make
This will:
- Compile the Rust WebSocket library
- Build the C API mod
- Build the test mod
- Copy the built files to your Zelda 64: Recompiled mods directory:
make install
Or manually copy build/main/mm_network_sync.nrm, build/test/mm_network_sync_test.nrm, and the compiled build/network_sync_runtime.dylib (or.so.dll) to your mods folder.
- Run the server:
Using Cargo:
cd network-server
cargo run
Using Docker Compose:
docker compose up -d
This will start the network server in a detached mode, which is useful for running it in the background.
- Launch Zelda 64: Recompiled with the mods enabled.
安裝與使用 安裝:按包內說明操作
- 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
- 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
- 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
- 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。
不同模組的安裝位置差異較大,包內說明是最可靠的依據。