Noobhub - Free Opensource Multiplayer And Network Messaging For Coronasdk

Noobhub is based on luasocket actually. Nodejs is only a server.

Multiplayer over UDP is a huge pain, since its a lower-level protocol as compared to TCP.

But even usage of UDP doesnt mean that youll get rid of latency you don’t have to implement latency compensation and prediction algorithms, if its a real-time multiplayer we are talking about.

Anyway, I would recommend to separate your multiplayer interaction code, so it would be easy to change transport layer (Noobhub, any other) and try different solutions for your needs, and see what works best.

Noobhub is simple and reliable (dozens of projects made on it), and carries publish/subscribe pattern in the core. I would say its a good starting point.

Can i ask u guys for a favor?

I suck at java/javascript. can someone please provide me a sample on how to set up my server to…

when the clients connect they all go to waiting-room channel from where the server pair 4-6 players, create a random room and send them there and do it for all waiting players in the waiting-room.

I will be really thanksull for your favor. Thanks in advance.

overtorment? a favor please? 

I will be very thankful for your this kindness! 

Well, you dont have to write a single line of javascript code actually.

Google for “publish/subscribe”. This is what actually is Noobhub in the core.

So, you do all the coding stuff in Lua the way you used to.

I think I was posting on this thread how to create lobby and matchmaking, no?

It is very strange… I built my sample working game for android and isntalled in my galaxy s2 but the connection doesn’t work, I tried with my another phone galaxy s plus and same problem. I installed an app and pinged my server from my mobile and it successfully pinged and the server can also ping my phones. then i build the noobhub sample project and installed and it also doesn’t show any network activity :frowning:

What is wrong? Am i missing something?

PS: on pc everything works.

aren’t you forgetting network permissions for the pp…?

the app on the phone should ask for permission to access internet.

I was supposed to ask android for permission :0

thanks for pointing that, i didn’t know it…

I searched all over internet i couldn’t find your thread/posts on creating lobby and matchmaking.

Can u please guide me on how to set my server so when the clients connect they all go to waiting-room channel from where the server pair 4-6 players, create a random room and send them there and do it for all waiting players in the waiting-room.

Thanks again!

Oh, it was on old Noobhub discussion thread http://developer.coronalabs.com/code/noobhub

Here’s copypaste:

All users of the game should be subscribed to the same channel, say,
“my-super-game-lobby”. This is called “lobby”.
Once somebody needs to find a gaming partner, he posts a message to the lobby channel, like, ‘who_wants_to_play’.
Every client on lobby who is up for a game, answers ‘i_wanna_play’.
Ofcourse, initial ‘who_wants_to_play’ message should carry unique identifier of request, and ‘i_wanna_play’ answers should carry this identifier as well (and unique user id also).
Once game starter got responses to his ‘who_wants_to_play’ request, he can choose (random?) user to play with, so he posts a message to lobby ‘lets_play_in_channel’, carrying id of the user to play with, and new unique name of the channel. The user who this message was intended for should instantly subscribe to this new channel, where all in-game interactions will happen. That’s it, game begins.

This whole process is called ‘negotiation’, and ofcourse it can be more complex than the brain-dead-simple variant I described :stuck_out_tongue:

Hi overtoment!

I am almost done with the client side and now it is time to start work on server script. It is my first time creating an online game so i am very confused with server side.

My game is somehow similar to famous “fun run” game.

What do you think how they implemented the client server? Is that similiar to what you posted above?

Can you please guide me a little how to setup my client server with that type of game?

Thanks Alot!

Bro, you dont need to set-up anything.

Just write the god-damn code  :slight_smile:

Those are the tutorials I highly recommend:

https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking

http://gafferongames.com/networking-for-game-programmers/what-every-programmer-needs-to-know-about-game-networking/

http://gafferongames.com/networking-for-game-programmers/

And yes, Noobhub will do for any type of multiplayer communication.

when i run the server node.js i get error???

Please someone help me.

error.jpg

is that nodejs on windows? 

looks like not.

you need Linux to run node.js

Thanks for the reply overtorment.

I am on windows 7 64bit 

I don’t have linux at the moment :frowning:

is there any workaround/solution?

AND 1 BIG THANKS FOR THE GREAT TOOL :slight_smile:

Two options: install Oracle Virtual Box and download Linux Ubuntu Server.

Second option: get a cheap linux VDS for couple of bucks per month.

And of course you can use noobhub server that is hardcoded into example. That’s mine cheap VDS specially for development.

I have a question please…

I am working on a mass realtime multiplayer game and it is my first time messing with networking stuff.

As far as i know the noobhub uses tcp. and everybody on the internet is saying udp is the choice if you are working on a realtime action based multiplayer games. Is it true?  should i use noobhub over tcp? what is your opinion?

I have one more question…What if i do everything in luasocket? is it reliable and can handle such type of games? what is the benefits of using noobhub (which is based on node.js i think) over luasocket?

Thanks in advance.

Noobhub is based on luasocket actually. Nodejs is only a server.

Multiplayer over UDP is a huge pain, since its a lower-level protocol as compared to TCP.

But even usage of UDP doesnt mean that youll get rid of latency you don’t have to implement latency compensation and prediction algorithms, if its a real-time multiplayer we are talking about.

Anyway, I would recommend to separate your multiplayer interaction code, so it would be easy to change transport layer (Noobhub, any other) and try different solutions for your needs, and see what works best.

Noobhub is simple and reliable (dozens of projects made on it), and carries publish/subscribe pattern in the core. I would say its a good starting point.

Can i ask u guys for a favor?

I suck at java/javascript. can someone please provide me a sample on how to set up my server to…

when the clients connect they all go to waiting-room channel from where the server pair 4-6 players, create a random room and send them there and do it for all waiting players in the waiting-room.

I will be really thanksull for your favor. Thanks in advance.

overtorment? a favor please? 

I will be very thankful for your this kindness! 

Well, you dont have to write a single line of javascript code actually.

Google for “publish/subscribe”. This is what actually is Noobhub in the core.

So, you do all the coding stuff in Lua the way you used to.

I think I was posting on this thread how to create lobby and matchmaking, no?

It is very strange… I built my sample working game for android and isntalled in my galaxy s2 but the connection doesn’t work, I tried with my another phone galaxy s plus and same problem. I installed an app and pinged my server from my mobile and it successfully pinged and the server can also ping my phones. then i build the noobhub sample project and installed and it also doesn’t show any network activity :frowning:

What is wrong? Am i missing something?

PS: on pc everything works.