Hi all !
This is the first time I’m using Nakama server to create a turn-based game. This is my first experience with game servers and I have a few questions about Nakama.
Maybe someone can help me.
Thanks everyone)
1 - Persistent: how automatically restore game (for example room) with players and last game state after Nakama server failed/restart
2 - Environments: how to connect with my environment: Redis, Persistent Storage, Kafka etc.
3 - Can i write my own .NET server client adapter for handle Nakama server game events and do not use Lua or Go for writing game custom logic
Hi @alexey-miheev. Welcome!
I’ll answer each of your questions inline.
how automatically restore game (for example room) with players and last game state after Nakama server failed/restart
What do you want to persist with the “room” between restarts? If you want a lobby like system it’s the same as our match listings API.
2 - Environments: how to connect with my environment: Redis, Persistent Storage, Kafka etc.
Why do you need to connect with Redis, “Persistent Storage” (I don’t know what this is), and/or Kafka?
3 - Can i write my own .NET server client adapter for handle Nakama server game events and do not use Lua or Go for writing game custom logic
Not at the moment. You’ll need to use Lua or Go with Nakama server though we do have plans to add support for other languages at some point.
Hi @novabyte. First of all, thanks for your reply!
I think I was mistaken in my questions, since I did not use the correct terminology.
I will try to describe
automatically restore game
I want to understand whether it is possible to automatically restore the game between players ( Matchmaking ) if a server failure occurs. After restoring the server, need to restore the last state of the game and reconnect the players.
connect with my environment
Perhaps I will not save all the data in Cockroach DB, and some information needs to be taken from external sources.
It is very important for me to understand what I need in my code to maintain a stable state of the game server and what the Nakama can do automatically
@alexey-miheev There’s nothing built into Nakama server that will automatically restore a game for you but the server does provide all the features and tools you need to implement the logic yourself. I think what’s still unclear though is what sort of “server failure” you want to be prepared to recover from?
It is very important for me to understand what I need in my code to maintain a stable state of the game server and what the Nakama can do automatically
The features available in Nakama can handle all game persistence and all realtime features you’d want to add for your gameplay.
i’ll try to clear their Question, because this my Question too.
Assume currently there are 100 of matches running in the server.
One of them occurs error (i-e : Panic “index out of range”) or may be some thing else .
At that time server will restart.
and all-off remaning 99 matches that runs perfectly will also destroy.
He wants after server restart those 99 matches will start again with exact players and state where server reboot.
@alexey-miheev m i right ?
If not @novabyte this is my Question too !
Thanks
@HashtagGo In this case you shouldn’t use the Go runtime and instead use the Lua runtime support we have in the server. It will guard against poor programming that could cause "index out of range"
and other kinds of error that cause a panic in your code. The Lua runtime uses a VM per multiplayer match (and therefore only a single Lua VM instance and its associated goroutine are lost).
The Go runtime is intentionally designed to squeeze maximum performance out of the server. This is much like zero-cost abstractions in languages like C++. As a result you must write high quality code and design your code with the appropriate skill to ensure that you get all the gains out of the system.