This looks so great! I'll definitely give it a try
EDIT: It's super cool!
I have a question, though:
How would I implement a simple server-side processing of the message, then reply to the user who sent it (not every user)?
For instance, I'd like to generate a unique username server-side. Later on, I could even connect the user with a MongoDB, link the game to a website and stuff.
Is there a simple
(client) hub:publish(msg) -> (server) if msg.action == "something" then replyToUser(true/false) end
scheme?
Noobhub - opensource multiplayer library for LÖVE
-
- Prole
- Posts: 17
- Joined: Sat Jan 11, 2014 3:33 pm
Re: Noobhub - opensource multiplayer library for LÖVE
I get this question a lot.
Correct answer is setup some other solution. For authentication, username generation, or large chunks (like, megabytes) of data exchange.
Noobhub is for realtime messaging only.
ALSO, regarding the licensing. Noobhub is licensed with _the_most_ permissive license ever - WTFPL. Enjoy, make profits, make some fun!
Correct answer is setup some other solution. For authentication, username generation, or large chunks (like, megabytes) of data exchange.
Noobhub is for realtime messaging only.
ALSO, regarding the licensing. Noobhub is licensed with _the_most_ permissive license ever - WTFPL. Enjoy, make profits, make some fun!
Re: Noobhub - opensource multiplayer library for LÖVE
Thanks for the answer, OvertormentOvertorment wrote:I get this question a lot.
Correct answer is setup some other solution. For authentication, username generation, or large chunks (like, megabytes) of data exchange.
Noobhub is for realtime messaging only.
ALSO, regarding the licensing. Noobhub is licensed with _the_most_ permissive license ever - WTFPL. Enjoy, make profits, make some fun!
I'm not asking for an authentication system, I already have this ready.
I'd just like to know if there's a way to send a message to the user who sent the package.
Re: Noobhub - opensource multiplayer library for LÖVE
You could send additional data. The only issue is, it would still need to broadcast to everyone who is connected. The client would then have to tell if the message was them.
Example:
Server broadcasts this data "USER-B:This is a message for user b"
Client A: Received Message, does it start with "USER-A"? No, ignore, this message isn't for me.
Client B: Received Message, does it start with "USER-B"? Yes, this message is for me, display it.
Client C: Received Message, does it start with "USER-C"? No, ignore, this message isn't for me.
Example:
Server broadcasts this data "USER-B:This is a message for user b"
Client A: Received Message, does it start with "USER-A"? No, ignore, this message isn't for me.
Client B: Received Message, does it start with "USER-B"? Yes, this message is for me, display it.
Client C: Received Message, does it start with "USER-C"? No, ignore, this message isn't for me.
- DeltaF1
- Citizen
- Posts: 64
- Joined: Mon Apr 27, 2015 4:12 pm
- Location: The Bottom of the Stack
- Contact:
Re: Noobhub - opensource multiplayer library for LÖVE
I feel like I'm missing something about this. Do you have to write all your server code in node.js? Or is this just for trusting peer-to-peer games?
-
- Prole
- Posts: 17
- Joined: Sat Jan 11, 2014 3:33 pm
Re: Noobhub - opensource multiplayer library for LÖVE
DeltaF1, you dont need to write any nodejs code. Nodejs is just for messages routing.
Code in Lua, send, receive messages. Implement realtime or turn-based game logic etc
Code in Lua, send, receive messages. Implement realtime or turn-based game logic etc
- DeltaF1
- Citizen
- Posts: 64
- Joined: Mon Apr 27, 2015 4:12 pm
- Location: The Bottom of the Stack
- Contact:
Re: Noobhub - opensource multiplayer library for LÖVE
So it would all be peer-to-peer then?
-
- Prole
- Posts: 17
- Joined: Sat Jan 11, 2014 3:33 pm
Re: Noobhub - opensource multiplayer library for LÖVE
I guess you can call it that way, but to be more precise this is called "publish/subscribe"
-
- Prole
- Posts: 34
- Joined: Sat Nov 28, 2015 5:54 am
Re: Noobhub - opensource multiplayer library for LÖVE
This is really great, thank you very much for making it!
- LordSeaworth
- Prole
- Posts: 22
- Joined: Tue Jun 07, 2016 10:29 pm
Re: Noobhub - opensource multiplayer library for LÖVE
Seems interesting to use in my game at a later point.
Who is online
Users browsing this forum: No registered users and 2 guests