Reload Match Events

Hey @Rob161, please see my response here.

This approach has some potential issues - storing every message individually within a tick may slow your match loop down, since your game is turn-based I suppose the tickrate will be low, so this may be fine if there’s only a few players, but at scale (or if under-provisioned) the DB may not keep up and drag the game loop, causing it to fall behind the set tick rate.

You’d at least want to batch the messages into a single storageWrite operation every few ticks, but usually db operations should be avoided within your main loop, and be delegated to execution flows outside of it. The best would be to buffer them in memory and store them whenever the match is stopped.

As mentioned in the other thread, you’re not storing a list of messages, but a single one. You need to either store an array of messages within your storage object, or use different ‘key’ values within the same collection and user_id to list the with the storageList api.

Hope this clarifies.