billyb2 / game

GNU Affero General Public License v3.0
2 stars 0 forks source link

Add lobby support #47

Open billyb2 opened 3 years ago

billyb2 commented 3 years ago

@Susorodni mentioned wanting support for lobbies in the net code, so that one server could host hundreds or even thousands of games at a time, without having to make another expensive process for each person who wants to join. Doing this would be pretty simple, just make it so that each network request that involves playing the game (so almost all of them, minus stuff like downloading maps or seeing what lobbies are open, etc.) have a u16 that identifies the lobby at the beginning of them. then, whenever a network request is received by the server, and player 3 in lobby 8 wants to move for example, it wouldn't interfere with player 3 in lobby 2.