I’m migrating my game engine to Nakama, and during migration I have to slowly move things over.
It turns out I have some complex logics that depend on my database to execute.
So I’d like to send matchData to an ongoing autorithative match from a server, similarly to what the JS clients does. Is there a way of doing this.
I’m currently able to communicate server to server to RPC, but I don’t find any way to send match data that way. And as per my research on the forum, it’s by design (which makes sense)
Hello @eduardomoroni
You could abuse the MatchSignal API. The frequency at which this API is used can negatively impact the match loop, so it should be used sparingly.
Is there no way to migrate over the data to Nakama? Ideally your match logic shouldn’t depend on the database during execution.
Best.
1 Like
Thanks, I’ll try out MatchSignal.
To give a bit more of context, I’m migrating a TCG game from a custom engine to Nakama.
The current logic involves, lobby creation, match creation, and games (each match can have multiple games). And for each step of the way I’m collecting analytics.
So in order to move everything with minor disruptions, I’m splitting up in phases. So on each phase I’ll be replacing a call to my engine to Nakama. But some steps of the phased migration, can be done quicker if I’m able to replace on the custom engine code by a similar code that runs on nakama server. And whenever my custom server is asked to executed that piece of logic, it will RPC to Nakama.
Some things that depend on database for instance:
Whenever we start a match, we query player’s deck, create a game table, shuffle decks, etc…
Whenever each game ends, we update stats for that game (basically persisting the game state)
So for now my plan is:
I keep the processing on my custom server, and send the processed data as “MatchData” to nakama, that simply updates its memory. Once I validate this works, I’ll be then moving the processing to nakama.