What is the best method to make NoobHub simple random matchmaking (2 players)?
I have tried with simple messaging and it works but it has problem when two players enters in the same time, it then creates two separate connections, one for each player instead of only one.
When there is small delay between players entering matchmaking screen, everything works OK.
Somebody help?
Comments
1) The client app subscribe to "public" channel
2) I have modified node.js file to create a room (rooms hash in Javascript) or connect to players in the same room when this first message is receive. The variable socket.connection_id is perfect to identify a connected player.
3) Every client receives a special message with the connectionId of each players.
4) Now every player knows the channel to publish messages.
https://github.com/huytd/node-js-game-server
It provides some room creation support but you should create your own cliente based on lua socket and Noobhub client.
No Node.js needed, pure Lua code
The original project is here: https://codeberg.org/glitchapp/noobhub-love2d
and my Gideros version: https://drive.google.com/drive/folders/1Rpc9qeowENCrHmEGFvuCJp_xoo0LTIY3?usp=sharing
or
https://drive.google.com/file/d/1UvlouR2b-hTut6VChu8zcF7zPAyNsshL/view?usp=drive_link
Demo:
PS2: for those who are into client/server stuff, this would be cool if you show us the basics with a demo
PS3: when I come back to it I need to add it to the wiki
Likes: pie