Multiplayer - Synchronous Network IO Between Clients?

Hello All,

I’ve finished my first project and I’ve gotten very familiar with coding in Corona now. Fantastic SDK btw.

My question involves network IO. So for my first project, I used my own SQL database and ASP.NET web server to do HTTP REST calls from my Corona clients. Which worked perfectly with registering, logging in, posting scores, etc.

But for my next project I want to do a realtime multiplayer. I looked into Google Game Services but that is only for Android and I’m looking for cross-platform functionality here.

Anyone have any idea how I can go about this? I don’t want to use pubnub or Google Game Services as I plan on having my own dedicated server for this.

One idea is to be constantly doing HTTP requests to a web server to get data between the clients but that will obviously cause lag. I want this to be a real time action RPG and I want response times to be below 100-500 MS if possible.

Is there any way to get a constant stream of data from a web server? Or from another device?

Thanks,

Ryan

also shameless plug :slight_smile:

https://play.google.com/store/apps/details?id=com.happa.games.loltrivia

Noobhub is good http://developer.coronalabs.com/code/noobhub

I think its very cool. That being said I needed to customise a lot and I found out I don’t like Node (I know, terribly unhip) so I rewrote it in Python using Tornado.

Thanks Jon seems like a step in the right direction.

Quick question. Do you know if noobhub is only for messaging? Or can custom data be sent over the requests as well?

I’m not sure, I guess you could stream anything, but I don’t know about the Corona side of things. If you ask over in that Noobhub thread you should get quick answer. The developer is helpful.

What where you thinking to send?

I’ll see if I can talk to overtorment about it!

Data like player locations, monster locations, attacks, abilities, etc. So the players can play together in a party and the game is as synchronized as possible.

Thanks again

Ah sure, I thought perhaps you meant images or something.

You just wrap the information in JSON (the client may do that for you as far as I can remember) and send it along as often as necessary. With decent server other person will have it in a few ms. Its very simple.

Sounds good. I’ll check it out! Thanks!

Noobhub is good http://developer.coronalabs.com/code/noobhub

I think its very cool. That being said I needed to customise a lot and I found out I don’t like Node (I know, terribly unhip) so I rewrote it in Python using Tornado.

Thanks Jon seems like a step in the right direction.

Quick question. Do you know if noobhub is only for messaging? Or can custom data be sent over the requests as well?

I’m not sure, I guess you could stream anything, but I don’t know about the Corona side of things. If you ask over in that Noobhub thread you should get quick answer. The developer is helpful.

What where you thinking to send?

I’ll see if I can talk to overtorment about it!

Data like player locations, monster locations, attacks, abilities, etc. So the players can play together in a party and the game is as synchronized as possible.

Thanks again

Ah sure, I thought perhaps you meant images or something.

You just wrap the information in JSON (the client may do that for you as far as I can remember) and send it along as often as necessary. With decent server other person will have it in a few ms. Its very simple.

Sounds good. I’ll check it out! Thanks!