thread
If you were going to re-create this game: https://cardsjd.com/minesweeper/game/#/menu (which is a multiplayer minecraft game) using Convex.dev how would you go about it?
Some issues I have been
1. How do you represent the grid of cells?
A medium sized grid would be 64x64 which is 4096 cells. Now not all cells require actions, a lot of them are automatically revealed as per the rules of the game.
What could the schema be? Would you store the entire grid as a
v.bytes()? Im concerned that each and every cell change would result in a LOT of data being sent to the clients. Would you store a list of "actions" then replay the actions on the client to get the state? Then use a paginated query where page is size of 1 to only get the one action added?
2. How would you think about epitomizing this?
4096 cells is what like 2000 actions per battle? If you have like 10 battles an hour thats 480,000 function calls per day JUST for the cell turn actions, not to mention all the re-fetches of data for each client.
Im also thinking about leaderboards and things, if you want to keep a running leaderboard per battle that summarization could be expensive as that would also have to update frequently.
...
Ye so maybe this idea wouldnt work from a cost perspective on Conevx, thoughts?

