Peer-To-Peer Connectivity Over Wifi - Possible With Corona?

I’m working on a game that’s local multiplayer only (so everyone needs to be in the same room). Something like AutoLANworks great, but I’m not really worried about the protocol or API. I’m just wondering how to get the devices connected.

If there’s a WiFi router around, everyone can connect to it, and everything works fine. But what if there’s no wireless access point? I know you can set up a wifi hotspot on one device, and have everyone connect to it… I’ve tested that and it works, but that’s not a great solution.

Is there a way to enable peer-to-peer WiFi from within the app? I know you can do this with Bluetooth, but Corona doesn’t support Bluetooth. Or any other solutions when there’s no WiFi access point?

We support Lua sockets, so you can setup apps that listen to particular ports or talk to apps using socket level communications.  This is pretty low-level so you would have to produce all of the code to make it happen.

Thanks for the quick reply, Rob. My understanding was that even with Lua sockets, the devices still need to be on a network. So they somehow need to connect - with a bluetooth peer-to-peer network, or an Ad-Hoc WiFi network. Then the socket level communication rides on top of that. Of course, my understanding of this is pretty rough so I could be wrong…

Well, as an alternative I can recommend a library of mine I wrote for Corona multiplayer

http://forums.coronalabs.com/topic/32775-noobhub-free-opensource-multiplayer-and-network-messaging-for-coronasdk/

Its not p2p (it relies through server) but it will work for anyone who is connected to internet (3G, wifi…)

Anyway, in my lib you can find examples how to work with LuaSocket.

Hope it helps. Cheers

We support Lua sockets, so you can setup apps that listen to particular ports or talk to apps using socket level communications.  This is pretty low-level so you would have to produce all of the code to make it happen.

Thanks for the quick reply, Rob. My understanding was that even with Lua sockets, the devices still need to be on a network. So they somehow need to connect - with a bluetooth peer-to-peer network, or an Ad-Hoc WiFi network. Then the socket level communication rides on top of that. Of course, my understanding of this is pretty rough so I could be wrong…

Well, as an alternative I can recommend a library of mine I wrote for Corona multiplayer

http://forums.coronalabs.com/topic/32775-noobhub-free-opensource-multiplayer-and-network-messaging-for-coronasdk/

Its not p2p (it relies through server) but it will work for anyone who is connected to internet (3G, wifi…)

Anyway, in my lib you can find examples how to work with LuaSocket.

Hope it helps. Cheers

HI all,

 I wanna ask something related to wifi.

Is there any api in corona sdk to get the wifi’s info (name,…) that the device is connecting?

any api to know that the device is connected to WIFI not Cellular?
Regard,
 Thay

The folks at M.Y.Developers did a product called AutoLAN which I think supported peer-to-peer TCP/IP support.  You can search for it to learn more about it.

Rob

HI all,

 I wanna ask something related to wifi.

Is there any api in corona sdk to get the wifi’s info (name,…) that the device is connecting?

any api to know that the device is connected to WIFI not Cellular?
Regard,
 Thay

The folks at M.Y.Developers did a product called AutoLAN which I think supported peer-to-peer TCP/IP support.  You can search for it to learn more about it.

Rob