I have several questions about Nakama that I’d like to get answers to. (I’ve been developing with Nakama for some time and have accumulated all these questions to ask together.)
-
I’m using Lua to write modules for a turn-based online game, and I have a strong dependency on timer functionality in multiple scenarios – for example, the timed expiration of buffs, the timed completion of quests, and quests/activities that automatically start at specified times. However, I haven’t found a way to implement timers/loops (e.g., a loop that runs every 1 second) where I can write custom code to track time and process time-dependent queues.
-
Why can’t I access data from other modules within a match? For instance, I have a
PlayerManagersingleton that contains a Lua table storing data for all online players, but I cannot access thisPlayerManagersingleton inside a match. -
How can a match actively notify external modules to send data? For example, when a battle ends, how can the match inform external modules of this event and send the battle results to them? In short, can a match actively communicate with other modules?
Finally, I want to ask if my current usage approach is recommended. Since I haven’t resolved the second and third questions above, I don’t store any data in matches – I only use matches as room broadcasters. Currently, I treat each map as a separate match and each battle as a separate match. Could this cause issues? Can a player join multiple matches simultaneously? Is this approach advisable?
As an additional question: What is the “first-class” scripting language for Nakama? Do most developers use Lua or Go?