I am working on game with multiplayer
How to make it possible to connect more than 1 client?
Or how to read from multiple clients at time?
Multiple clients
Re: Multiple clients
How are you currently connecting with just one client?
Current project:
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
https://togfox.itch.io/backyard-gridiron-manager
American football manager/sim game - build and manage a roster and win season after season
- EngineerSmith
- Prole
- Posts: 38
- Joined: Thu Dec 02, 2021 11:38 am
- Contact:
Re: Multiple clients
If it is enet, each peer on the server is it's own "client" (in server-client arch). You can get the peer from event.peer
If it is luasocket (UDP), each receivefrom return's each client's connected ip address (unique for that current connection, ip can change, and port will change on each connect)
---
If you need an enet example (for new people to enet), I wrote a chat server-client if you want to see how it handles multiple connections in a basic way https://github.com/EngineerSmith/enet-example
My multiplayer love jam game has it more complex with threads if you want to see how I handle logging in too https://github.com/EngineerSmith/love-j ... in/network
If it is luasocket (UDP), each receivefrom return's each client's connected ip address (unique for that current connection, ip can change, and port will change on each connect)
---
If you need an enet example (for new people to enet), I wrote a chat server-client if you want to see how it handles multiple connections in a basic way https://github.com/EngineerSmith/enet-example
My multiplayer love jam game has it more complex with threads if you want to see how I handle logging in too https://github.com/EngineerSmith/love-j ... in/network
Who is online
Users browsing this forum: No registered users and 68 guests