Page 1 of 1

Help creating a multiplayer game

Posted: Sat Oct 17, 2020 3:11 am
by Leonardo2450
Hi, I am planning to create a small game as a kind of test that is multiplayer. Something simple like two cubes moving and something else. Searching I discovered Lua-enet so I decided to try it, however I don't understand how to use it. So I directly came here, to the forum to ask you how to make a multiplayer game.

Re: Help creating a multiplayer game

Posted: Sat Oct 17, 2020 1:49 pm
by ivan
Making a multiplayer game is NOT a small task. The first significant hurdle is that it's hard to establish a socket connection between two peers due to the network translation of ports. Then you have to think about determinism and possibly some sort of a rewind/predication mechanism.
In short, it's difficult to make a real-time multiplayer game. I would recommend starting out with something smaller, preferably turn-based.

Re: Help creating a multiplayer game

Posted: Mon Oct 26, 2020 2:13 am
by nikneym
I don't recommend starting with making a multiplayer game either but if you desperately want it, you can take a look at sock.lua, an ENet and lua-enet based networking library. It's easy to understand and has 3 good examples to work on.

There are also lua-enet and luasocket but as far as I know, these two are more complex than the sock.