b0c83af092
Complete replacement of the tactical-shooter project with the netfox-cs-sample (MIT) — a CS 1.6 inspired multiplayer FPS built with Godot 4 and netfox. ## What's new - Full CS-style gameplay: teams (T/CT), rounds, economy, buy menu - 6 weapons: Knife, Glock, USP, AK-47, M4A1, AWP - Bomb plant/defuse with 2 bombsites - Flashbang & smoke grenades - Proper netfox rollback netcode at 64 tick - Network popup UI for host/join - HUD, crosshair, round timer, scoreboard - All netfox singletons registered as autoloads (works in exported builds) ## Architecture - Listen-server (host from client, no dedicated server binary) - Multiplayer-fps game lives at examples/multiplayer-fps/ - Netfox addons registered as autoloads for exported build compat - Godot 4.7 with Forward+ renderer ## Removed - Old headless-server architecture (client_main, server_main, player.gd, etc.) - Custom netfox bootstrap with ENet fallback - Old ChaffGames FPS template (2,420 lines, 844 KB) - SimulationServer GDExtension stub - Godot-jolt physics (netfox sample uses default Godot physics) - Duplicate weapon_data.gd, anti_cheat.gd, round_manager.gd, etc. - Server browser API Python venv (87 MB) - test_range map and modular assets ## Preserved - Git history - Server config at config/default_server_config.cfg - Windows export preset - Build directory (gitignored) Co-authored-by: naxIO <naxIO@users.noreply.github.com>
36 lines
1.3 KiB
Markdown
36 lines
1.3 KiB
Markdown
# Servers, clients, and ownership
|
|
|
|
Much of this documentation discusses things in context of servers and clients.
|
|
This page is intended to clear up how this translates to Godot's concept of
|
|
multiplayer ownership.
|
|
|
|
## Ownership in Godot
|
|
|
|
In Godot's multiplayer system, each node belongs to a multiplayer peer, i.e. a
|
|
player. This can be set from scripts, and is not replicated. This means that
|
|
the logic assigning ownership to nodes must produce the same result on every
|
|
machine for things to work consistently.
|
|
|
|
## Ownership in netfox
|
|
|
|
To mesh better with Godot's existing conventions, *netfox* doesn't work in
|
|
terms of server and client, but uses ownership instead.
|
|
|
|
Whenever *the server* is mentioned, it refers to a given node's owner.
|
|
|
|
In practice, this means that nodes representing game state are and should be
|
|
owned by the server.
|
|
|
|
## Limitations
|
|
|
|
At the time of writing, ownership is hard-coded in some cases. One such case is
|
|
*NetworkTime*, which is always owned by the host peer and always takes the host
|
|
peer's time as reference.
|
|
|
|
This means that peer-to-peer games are not officially supported by *netfox*,
|
|
but might be able to work with some workarounds. If feasible, you can build
|
|
self-hosted games by including *netfox.noray*.
|
|
|
|
In theory, multiple players can own different parts of the game state, but
|
|
*netfox* is not tested for such use cases.
|