I am planning to implement a system in my game where players can easily fetch a random gamepass ID and server ID at a specified price. The pool of available gamepasses will be automatically updated every time a player joins the game; it will fetch the player’s gamepasses and add them to the list (datastore) of available gamepasses that can be randomly selected based on the given price.
(the “list†contains every gamepass from each player from every server; its a cross-server market).
The main gimmick is that players can be prompted to buy a random gamepass from the “pool†of gamepasses (the ones added into the datastore) with the same price (given by the player). Its relatively important that this system allows for efficient selection and removal of gamepasses for when the player joins/leaves.
This means that A: The system/way of saving data should allow for easy random gamepass selection based off of price. B: Be able to efficiently remove the players owned gamepasses WHEN the player leaves.
Do you guys have any solutions/suggestions for creating such system? I want to hear your thoughts about it
like especially how i should organize the datastore(s), and how i should generally approach with creating the system itself
the player joins the game, and their gamepasses and server ID are added to the datastore.
the player requests to receive a random gamepass prompt from the datastore with a specified price of 5 Robux.
only gamepasses priced at 5 Robux are considered for the prompt.
the player is prompted to buy a random gamepass from the datastore that matches the specified price.
player buys the gamepass
when the player leaves, their gamepasses are removed from the datastore to prevent others from buying gamepasses from players who are not in the game.
2 posts - 2 participants