Desired tutorial - multiplayer
Posted: Tue Jun 21, 2011 2:46 pm
I just realized that we don't have a decent networking tutorial yet, which is a shame.
It would be really nice if someone wrote one which covered the following:
1) Start by making a simple "game" where each player is a randomly-colored circle on a screen with some walls or something
2) Using LuaSocket (or maybe Lube), make a server and client (maybe as separate .love files)
3) The client would connect to the server and then tell the server when a player pressed movement keys. Note: I definitely think we should impress the values of non-authoritative clients even on this simplest of networking tutorials.
4) The server would take the client's movement requests, simulate them (i.e., make sure they don't go through walls), and then upload the new positions of each player's circle
5) When a client disconnects, the server removes their circle. Likewise, if the server quits, gracefully disconnect the clients.
It wouldn't need to cover lag-compensating systems or the like, it would just be a simple thing meant to familiarize people with networking and the (non-authoritative) client / server model.
It would be really nice if someone wrote one which covered the following:
1) Start by making a simple "game" where each player is a randomly-colored circle on a screen with some walls or something
2) Using LuaSocket (or maybe Lube), make a server and client (maybe as separate .love files)
3) The client would connect to the server and then tell the server when a player pressed movement keys. Note: I definitely think we should impress the values of non-authoritative clients even on this simplest of networking tutorials.
4) The server would take the client's movement requests, simulate them (i.e., make sure they don't go through walls), and then upload the new positions of each player's circle
5) When a client disconnects, the server removes their circle. Likewise, if the server quits, gracefully disconnect the clients.
It wouldn't need to cover lag-compensating systems or the like, it would just be a simple thing meant to familiarize people with networking and the (non-authoritative) client / server model.