Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate the possibility of migrating to MUD #29

Open
norswap opened this issue Jun 2, 2023 · 1 comment
Open

Investigate the possibility of migrating to MUD #29

norswap opened this issue Jun 2, 2023 · 1 comment

Comments

@norswap
Copy link
Member

norswap commented Jun 2, 2023

This is for after the tech demo.

MUD simplifies development by synchronizing the frontend and the backend easily (amongst other things).

We can't really use MUD today because the game is "session-based": each player only really needs the data about the game he is currently in, as well as the cards he owns. MUD, on the other hand, synchronizes the whole "world" state, which in our case would be every game and global card ownership mappings. This is way overkill and wasteful.

I heard from Justin at Lattice (who develops MUD) that they intend to enable selective sync. We can consider using MUD once this is in, or we could try to contribute this feature upstream.

Another concern I have is that currently, 0xFable works without indexer, but MUD requires an indexer (it is possible to use a frontend indexer, but the necessity to reprocess the whole blockchain history makes this an impractical solutions outside of demos). The reason why an indexer is required in MUD is that everything is stores in tables, which are essentially mapping of keys to structures. Without storing the list of keys on the blockchain, it is impossible to know the extent of a table. There is talk about enabling a mode where keys are stored, and maybe this is can even be implemented independently as a "MUD module" (although the synchronization part on the frontend will require more invasive changes).

I'm torn on the issue. Besides the missing features outlined above, using a framework means less low-level control, and I feel like we have already figured out a bunch of the difficulties that MUD is supposed to alleviate. On the other hand, it means we get to benefit from all the new MUD features for free.

A simple way to figure it out would be to try and do a rewrite (maybe limiting ourselves to the tech demo features) to figure out how we feel about this in practice, and where the practical pain points end up being.

@norswap
Copy link
Member Author

norswap commented Jul 4, 2023

Here's what's next for MUD: https://twitter.com/latticexyz/status/1675840828621705216

They don't mention custom sync, but the sync stack refactor seems to be a positive step in that direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant