Skip to content
Henrique Maziero edited this page Apr 15, 2023 · 1 revision

Rain Meadow

What is Rain Meadow

Henpemaz - I'm really torn between naming Rain Meadow just the game-mode that we're making, or maybe the multiplayer engine underneath it. Doesn't matter a whole lot atm though.

Core ideas

(read these thrice)

It's p2p and there is no central host* - There is no individual client responsible for loading all rooms and all worlds.

Players self-host whenever applicable - If for instance a player the only one to be using a room/region, then it's totally autonomous in managing the physics and everything in it. If an entity is closely related to a player, then that player should be the one responsible for simulating that entity so that it has zero lag.

No resource is simulated by two distinct players - For each resource there is an assigned owner, and that owner is the only one responsible for simulating it, and it's results are absolute.

Resources and Entities

Resources follow a lease transaction model - Resources such as room, worlds, can be leased and released. Who it gets leased to becomes the host, or owner, of that resource.

Leased resources can be subscribed to - If a resource (room, world) is already leased, it can be subscribed to. The host for that resource produces the data, and the subscribers consume the data.

Entities follow an ownership model - Entities can be added to resources, and removed from them. Entities have an owner and it is the owner's responsibility to fire events and update state for that entity.

Clone this wiki locally