Giter Club home page Giter Club logo

Comments (4)

316902108 avatar 316902108 commented on September 25, 2024

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.

novabyte avatar novabyte commented on September 25, 2024

@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.

dsnopek avatar dsnopek commented on September 25, 2024

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:

  1. The developer would need to setup a "match handler" in Nakama per these docs: https://heroiclabs.com/docs/nakama/concepts/multiplayer/authoritative/
  2. 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
  3. We'd need to add a new method to NakamaMultiplayerBridge, like, NakamaMultiplayerBridge.join_as_host() for one player to join as the host, or maybe NakamaMultiplayerBridge.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.

gmjosack avatar gmjosack commented on September 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.