I am working on a webGL game where anyone that plays the game (anonymously) can submit a piece of text/content to be placed in the world for everyone to see. When a new piece of text is submitted, any player that is close enough to see will see a spawning animation of that text being placed. All submitted texts are stored on the server.
I am using Nakama as a backend for storing the placed text objects using a json containing {x, y, z, text} through the leaderboard system, but I am not sure if this is the best approach.
Currently, every text object placed by a player is a leaderboard score submission with the json in the metadata and the submission time as score (so that the list remains sorted in time).
However, Nakama does not have a leaderboard update method for including multiple submissions for a player. The old submissions get overwritten by the “higher” score.
To circumvent this, I am creating a new session for every object that is placed, but this is probably not very efficient since this means every text object receives its own random user account etc. Imagine that the amount of text objects will easily exceed 10 000.
Ideally, a single user can submit multiple scores(=text objects in the world) and they will all be stored. So what I am looking for with Nakama, is a single big, list of JSON to which multiple users can read and submit simultaneously at high frequency, sorted by submission date.
How can I best implement such a data structure for my game using Nakama?
(See attached picture for the game)
- Versions: Nakama 3.5, Linux Docker, Godot 4 Client Nakama
- Server Framework Runtime language (If relevant) X
{code or log snippet}
Media: