Comments (4)
This project doesn't seem to have the funds to have someone maintain and update it. I keep an eye on it every day, and the initiator has been running out of food for several days.
from nakama-godot.
@316902108 The Godot 4 support was completed about 4 weeks ago but is on master branch rather than a release right now. If you encounter bugs you're welcome to submit a pull request which we'd be happy to review, merge, and provide attribution on. 👍
from nakama-godot.
Hm. Unfortunately, I don't think NakamaMultiplayerBridge
will currently work with an authoritative match.
NakamaMultiplayerBridge.join_match()
is assuming that there is a host already connected to the match, which is responsible for allocating the peer ids. Normally, one player's client would call NakamaMultiplayerBridge.create_match()
which would make them the host, or if the match is created via NakamaMultiplayerBridge.start_matchmaking()
the host is selected automatically.
For authoritative matches to work, there would be a few pre-requistes:
- The developer would need to setup a "match handler" in Nakama per these docs: https://heroiclabs.com/docs/nakama/concepts/multiplayer/authoritative/
- Unlike relayed multiplayer, authoritative multiplayer won't automatically relay messages to other players.
NakamaMultiplayerBridge
depends on the messages being relayed, so your match handler code would need to be setup to relay those messages - We'd need to add a new method to
NakamaMultiplayerBridge
, like,NakamaMultiplayerBridge.join_as_host()
for one player to join as the host, or maybeNakamaMultiplayerBridge.join_authoritative()
and have it automatically pick a host similar to how it works with the matchmaker? For the latter, there could maybe be code in the match handler that is responsible for selecting the host?
In any case, I'm not sure what the advantage would be to using an authoritative match with NakamaMultiplayerBridge
anyway?
NakamaMultiplayerBridge
is simply using Nakama to relay the messages between the peers. These messages are binary data specific to how Godot sends RPCs - Nakama can't really process them in any way. If you really wanted Nakama to be truly authoritative over the match, you'd be better off not using NakamaMultiplayerBridge
at all, and instead send custom messages using the normal Nakama API.
from nakama-godot.
In any case, I'm not sure what the advantage would be to using an authoritative match with
NakamaMultiplayerBridge
anyway?
I've been looking into doing this so that I can have an authoritative match so I can use labels make a lobby with functionality like private matches, region info, etc that could be filtered on the client following this guide https://heroiclabs.com/docs/nakama/guides/concepts/lobby/
My plan was to do the lobby and just relay everything else in MatchLoop which is pretty simple, just look for specific opCodes related to the lobby and relay everything else. This mostly works fine by just running the RPC, joining the lobby and calling nakama_bridge._setup_host() except there's a ton of spam errors despite the MultiplayerSyncronizer working fine.
Took me a while to realize what was going on but there's a pretty big issue that makes this really difficult to solve. The nakama bridge relies on being able to send to specific presences, but the MatchLoop isn't passed the target presences so there's no way to know where those messages where meant to go in an authoritative server without encoding the presences into your payload and parsing it on the server.
from nakama-godot.
Related Issues (20)
- Socket is not working with Godot 4 HOT 2
- Update tutorials for Godot 4 HOT 5
- Nakama plugin not visible in Godot 4.0.3 HOT 3
- Method return value cannot match type, Causing errors in Godot4.0. HOT 1
- Nakama Server Disconnection Issue with Fifth Player in Godot Engine Game HOT 1
- All NakamaSocket methods fail with 'Request cancelled.' HOT 6
- Add match_label API
- Game crashes on HTTP request HOT 3
- Pass Error Information to Godot 4 client
- Question - RPG/OpenWorld style multiplayer
- Party presence event is not received by client when party is created HOT 3
- p_create arguments authenticate_email_async doesn't work HOT 1
- Export on exe not working with server connections
- Getting Request 1 failed with result: 13, response code: 0 on client.authenticate_email_async(email, password) HOT 4
- Metadata is supported for relayed matches, but I can't create a new match with metadata, only joining is possible. HOT 1
- Incomplete Session Restore HOT 1
- When passing name with create_match_async then listing the match label is null HOT 4
- Question: What would be the best way to write a "pop_statistic" to a nakama relay server? HOT 1
- Session-Based Multiplayer support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nakama-godot.