Page 2 of 3

Re: Noobhub - opensource multiplayer library for LÖVE

Posted: Fri May 30, 2014 9:36 am
by OmarShehata
Oh wow! This is exactly what I've been looking for! I was just about to start the painstaking process of writing multiplayer from scratch. Thank you so much, will definitely use this in my game.

Re: Noobhub - opensource multiplayer library for LÖVE

Posted: Mon Jul 14, 2014 10:25 am
by Overtorment
a quick-start guide on how to setup your own server http://www.develephant.net/noobhub-mult ... 5-minutes/

Re: Noobhub - opensource multiplayer library for LÖVE

Posted: Mon Jul 14, 2014 11:21 am
by Jeeper
Very nice! Keep up the good work.

Re: Noobhub - opensource multiplayer library for LÖVE

Posted: Tue Jul 15, 2014 8:35 am
by drunken_munki
nil

Re: Noobhub - opensource multiplayer library for LÖVE

Posted: Tue Jul 29, 2014 9:28 pm
by superich
Hello Lovers,

Long time creeper, first post. I've been spending the last month or so trying to make heads or tails of networking. Finally got on my feet with lua-enet, but then I found this beautiful library! I was wondering if anyone's got any _even easier_ tutorials than what's on OT's github. I've gotten his example up and running on my VPS, but I'm a total javascript noob and not very networking savvy. Specifically looking for an example of broadcasting to all peers, and another example of sending to individual peers.

Thanks!

Re: Noobhub - opensource multiplayer library for LÖVE

Posted: Wed Jul 30, 2014 3:10 am
by ArchAngel075
How does noob hub operate with large packets of data being sent at once?

I currently am writing up a multiplayer game (not yet shown on these forums, but in due time) and when starting I looked at lua-enet and luaSocket to determine which should be used. lu-enet won as it had automatic packet fragmenting which as far as i know luaSocket does not.

If, for instance, I send some needed data on connect, like a map file (Lua export of Tiled), maybe images that are custom skins player made (rescaled by server for minimum bandwidth and smaller file size) and lastly a up to 500kb JSON-ed table which represents a cooked version of the gameworlds database containing all the needed objects that are active in the world, that's around 30-enemies and 2-players and others-most of data arises from pointlight-sources that contain bulk infomation to render them properly.

With all the data, being sent as a whole packet instead of manual fragmentation, does noobhub fragment on its own and ensures reliability and sequence or does noobhub expect developers to atleast be more careful and send the packet fragmented and manually?

---

Otherwise it is good to see a wonderful multiplayer code helper popping up, as when i started my first multiplayer concept using LUBE i found it daunting - then moving to lua-enet supported by LÖVE things became easier since it auto-fragmented packets making my worries of event slightly bloated packets slowing down game.

---

If the above question is answered as "yes-does auto fragment" then ill be more inclined to see if perhaps i can swap out lua-enet to see if i get gains in speed and effieciency against lua-enet...

Re: Noobhub - opensource multiplayer library for LÖVE

Posted: Wed Jul 30, 2014 9:35 pm
by Overtorment
ArchAngel075 wrote:How does noob hub operate with large packets of data being sent at once?

I currently am writing up a multiplayer game (not yet shown on these forums, but in due time) and when starting I looked at lua-enet and luaSocket to determine which should be used. lu-enet won as it had automatic packet fragmenting which as far as i know luaSocket does not.

If, for instance, I send some needed data on connect, like a map file (Lua export of Tiled), maybe images that are custom skins player made (rescaled by server for minimum bandwidth and smaller file size) and lastly a up to 500kb JSON-ed table which represents a cooked version of the gameworlds database containing all the needed objects that are active in the world, that's around 30-enemies and 2-players and others-most of data arises from pointlight-sources that contain bulk infomation to render them properly.

With all the data, being sent as a whole packet instead of manual fragmentation, does noobhub fragment on its own and ensures reliability and sequence or does noobhub expect developers to atleast be more careful and send the packet fragmented and manually?

---

Otherwise it is good to see a wonderful multiplayer code helper popping up, as when i started my first multiplayer concept using LUBE i found it daunting - then moving to lua-enet supported by LÖVE things became easier since it auto-fragmented packets making my worries of event slightly bloated packets slowing down game.

---

If the above question is answered as "yes-does auto fragment" then ill be more inclined to see if perhaps i can swap out lua-enet to see if i get gains in speed and effieciency against lua-enet...
Thats a good question.
Noobhub wont split data in chunks. It just json encodes published message, and pushes it to channel. The server has the connections pool, and for each connection it allocates buffer in heap memory. It is configurable, and default value is 8 kb. If your message exceeds that amoun t- that's bad, it wont be delivered.
Increasing this amount is also a bad idea, because nodejs server even on poor hardware can easily keep thousands of connections. If every connection will allocate 500kb of heap memory just for any case (like, transmitting game assets) - your server will most likely will run out of RAM. So Noobhub is tuned for in-game interactions only ( sending messages like, {"action":"move","coordinates":{"x":111, "y":222}} ).

So my suggestion is that you use to transmit game assets anything that works best for you, and try Noobhub for actual multiplayer interaction. Check out the demo project, its very simple.
Also, compared to lua-enet, theres no need to install anything additionally. Noobhub utilizes built-in lua-sockets directly.
The drawback is that Noobhub at the moment is TCP only, and Pub/Sub messages are routed through 3rd party (which is nodejs server)

Hope this helps. Cheers!

Re: Noobhub - opensource multiplayer library for LÖVE

Posted: Fri Mar 20, 2015 5:29 pm
by Overtorment
Hello guys,

Im happy to announce that latest version was recently pushed to Github. Mostly memory leak fixes.

One of Noobhub users reported that Noobhub happily serves 1.1k CCU (concurrent users) utilizing only 6% CPU on only one processor core, and consuming not more than 600 Mb RAM in peak. About 95k multiplayer games runs through this instance daily.
And not a single millisecond of performance degradation (latency) on 1k CCU!

Cheers!

Re: Noobhub - opensource multiplayer library for LÖVE

Posted: Tue Mar 24, 2015 1:58 pm
by ejmr
I scraped multiplayer long ago in the game I've been working on, but if this library had existed at the time I might have kept the multiplayer gameplay. Just wanted to say nice job and thank you for writing and sharing this library. Keep up the good work!

Re: Noobhub - opensource multiplayer library for LÖVE

Posted: Tue Oct 13, 2015 10:53 am
by Overtorment
Up!
Just pushed some fixes :)