wonder Expert Licensed User Longtime User Nov 26, 2015 #1 Hello hello, Erel, I remember seeing a thread a while ago which contained a video of you drawing some circles on the PC and having it being streamed instantaneously to the Android device. Was it a library? I can't find it. Can I use it for a multiplayer game? Many thanks in advance!
Hello hello, Erel, I remember seeing a thread a while ago which contained a video of you drawing some circles on the PC and having it being streamed instantaneously to the Android device. Was it a library? I can't find it. Can I use it for a multiplayer game? Many thanks in advance!
Erel B4X founder Staff member Licensed User Longtime User Nov 26, 2015 #2 You are looking for MQTT: https://www.b4x.com/android/forum/threads/iot-mqtt-protocol.59471/#content It is a good solution for multiplayer games.
You are looking for MQTT: https://www.b4x.com/android/forum/threads/iot-mqtt-protocol.59471/#content It is a good solution for multiplayer games.
wonder Expert Licensed User Longtime User Nov 26, 2015 #3 Thank you so much!!! By the way, where's that video example?
Erel B4X founder Staff member Licensed User Longtime User Nov 26, 2015 #4 You can find all the videos that I've uploaded here: https://www.youtube.com/channel/UCgO74_195wKn60Y7ZV3DzIQ
You can find all the videos that I've uploaded here: https://www.youtube.com/channel/UCgO74_195wKn60Y7ZV3DzIQ
wonder Expert Licensed User Longtime User Nov 26, 2015 #5 Fantastic, thank you!! I have no idea how, but I want to build a B4J server that uses this kind of technology. Time to learn some new stuff.
Fantastic, thank you!! I have no idea how, but I want to build a B4J server that uses this kind of technology. Time to learn some new stuff.
DonManfred Expert Licensed User Longtime User Nov 26, 2015 #7 wonder said: Time to learn some new stuff. Click to expand... You dont need to learn much as B4J uses the same language as B4A
wonder said: Time to learn some new stuff. Click to expand... You dont need to learn much as B4J uses the same language as B4A
LucaMs Expert Licensed User Longtime User Nov 26, 2015 #8 From here: LucaMs said: I'm thinking if this MQTT can be useful (more useful) for my project (multiplayer turn based game). Click to expand... From this thread: Erel said: ... It is a good solution for multiplayer games. Click to expand... AAAARRRGH (which means: "now I don't know if I should "move" to MQTT )
From here: LucaMs said: I'm thinking if this MQTT can be useful (more useful) for my project (multiplayer turn based game). Click to expand... From this thread: Erel said: ... It is a good solution for multiplayer games. Click to expand... AAAARRRGH (which means: "now I don't know if I should "move" to MQTT )
wonder Expert Licensed User Longtime User Nov 26, 2015 #9 Thank you so much, guys!! Some questions: - Will it be fast enough to real-time multiplayer? - Is it possible to achieve a ping time between 30 and 50 milliseconds? - If so, it does depend on the server, right? - What would be the maximum data package size (in bytes) to achieve such values?
Thank you so much, guys!! Some questions: - Will it be fast enough to real-time multiplayer? - Is it possible to achieve a ping time between 30 and 50 milliseconds? - If so, it does depend on the server, right? - What would be the maximum data package size (in bytes) to achieve such values?
Erel B4X founder Staff member Licensed User Longtime User Nov 26, 2015 #10 If you are using an online server (over the internet) then you should expect latency of at least 100ms. The message size and protocol are less important.
If you are using an online server (over the internet) then you should expect latency of at least 100ms. The message size and protocol are less important.
wonder Expert Licensed User Longtime User Nov 26, 2015 #11 So, how do online games achieve lower latency values? Assuming that I have my own B4J server, it should be possible (maybe without MQTT?) , right?
So, how do online games achieve lower latency values? Assuming that I have my own B4J server, it should be possible (maybe without MQTT?) , right?
Erel B4X founder Staff member Licensed User Longtime User Nov 26, 2015 #12 wonder said: Assuming that I have my own B4J server, it should be possible (maybe without MQTT?) , right? Click to expand... No. The latency I talk about is not related to the protocol. It takes time for a single byte to go from your computer, through all the gateways and reach the server. If your server is physically close to the users then the latency will be smaller. Whether you choose a MQTT server or HTTP server will most probably not affect the latency at all. For example a ping round-trip to b4x.com: My computer in Israel - ~200ms A computer in USA - ~30ms
wonder said: Assuming that I have my own B4J server, it should be possible (maybe without MQTT?) , right? Click to expand... No. The latency I talk about is not related to the protocol. It takes time for a single byte to go from your computer, through all the gateways and reach the server. If your server is physically close to the users then the latency will be smaller. Whether you choose a MQTT server or HTTP server will most probably not affect the latency at all. For example a ping round-trip to b4x.com: My computer in Israel - ~200ms A computer in USA - ~30ms
wonder Expert Licensed User Longtime User Nov 26, 2015 #13 So the way to achieve 30ms would be having several region dedicated servers around the globe. (Not that I have the money for that, ahah)
So the way to achieve 30ms would be having several region dedicated servers around the globe. (Not that I have the money for that, ahah)
EnriqueGonzalez Expert Licensed User Longtime User Nov 26, 2015 #14 You may not, but Amazon has that kind of infrasctructure and you can rent it, https://aws.amazon.com For example, Netflix uses it. I think it is possible to have a B4J (java) app there.
You may not, but Amazon has that kind of infrasctructure and you can rent it, https://aws.amazon.com For example, Netflix uses it. I think it is possible to have a B4J (java) app there.