Comments (3)
@jonbonazza When you call the socket function for creating a party can you print what the contents of the structure you get back looks like?
from nakama-godot.
@jonbonazza When you call the socket function for creating a party can you print what the contents of the structure you get back looks like?
Okay so finally had some more time to look at this, it looks like I get a NakamaRTAPI.Party
struct and it does indeed have the leader and current party presences (which in my case, just has the one member). So I guess my questions then are:
- Do I not get a presence event with the leader on party create? I only get that info in the response? This is fine if it's the case, just wanted to make sure I understand it correctly.
- In the
Party
struct,presences
is an array ofUserPresence
objects. Is there ever a situation where this array will have more than one item in it in the case of party creation? I'm assuming this is just an array because the class is reused in other places as well in during party creation, this array will always have exactly one entry, is that correct?
from nakama-godot.
Do I not get a presence event with the leader on party create? I only get that info in the response? This is fine if it's the case, just wanted to make sure I understand it correctly.
@jonbonazza When one of the realtime features of Nakama is used they all share the same structural pattern of an initial state is returned (in the case of Parties its NakamaRTAPI.Party
) and deltas (joins and leaves) which will be received from the event listeners (i.e. received_party_presence
signal). Together it provides the most compact way to keep track of presences in that gameplay feature. When a Party is created the leader receives the initial state but will not also receive a signal on received_party_presence
.
Is there ever a situation where this array will have more than one item in it in the case of party creation? I'm assuming this is just an array because the class is reused in other places as well in during party creation, this array will always have exactly one entry, is that correct?
The system is designed to batch presence changes so its possible (though in the case of Party creation - it would be a very small window of time) that the party is created and another player finds it to join (if its an open party) before the party creator then receives their NakamaRTAPI.Party
struct response. In this case it would be practically unlikely to occur but the design must account for it anyway to avoid potential race conditions.
Can we move the follow on questions to a forum thread? 🙏
Hope this helps.
from nakama-godot.
Related Issues (20)
- Nakama.create_client() alway returns NULL
- How to update a label value for a match
- Parse error: Could not find type "p_type" in current scope. HOT 3
- Network ridiculously slow HOT 3
- "Array cannot be null" error when making RPC call in C# using GodotHttpAdapter HOT 1
- Nakama does not work for Godot 4.0 HOT 3
- Socket is not working with Godot 4 HOT 2
- Update tutorials for Godot 4 HOT 3
- Nakama plugin not visible in Godot 4.0.3 HOT 3
- Method return value cannot match type, Causing errors in Godot4.0. HOT 1
- NakamaMultiplayerBridge with Authoritative HOT 4
- 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
- p_create arguments authenticate_email_async doesn't work HOT 1
- Export on exe not working with server connections
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.