Multiplayer on native mobile apps?

Discussion and feedback on Construct 2

Post » Sun Mar 16, 2014 3:30 pm

Hello,
Did anyone tested if the multiplayer features work on native mobile apps(exported with cocoonjs or other ways)?

Thanks,
[size=200]1. Best Construct 2 course :HERE.10$!

2. 155 games source codes for sale on scrira store 12,86$each. PM me if interested to speed up the uploading process.
[/size
B
32
S
8
G
4
Posts: 148
Reputation: 3,713

Post » Sun Mar 16, 2014 3:49 pm

i think is too early to build multiplayer games on mobile. Present multiplayer must be tested and upgraded to work perfectly on desktops
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Sun Mar 16, 2014 5:25 pm

I believe the consensus was that multiplayer requires WebRTC, which CocoonJS doesn't support. Crosswalk, on the other hand, does, so you should be able to run such games on Android through Crosswalk, at least.

From the blog post:
Which platforms are supported?
Currently only Chrome 32+ and Firefox 27+ support interoperable WebRTC DataChannels. However this also includes the mobile browsers and other Chromium and Firefox based platforms, such as node-webkit, Crosswalk and Firefox OS. Hopefully other vendors who have Chromium-based platforms like Blackberry, Amazon and Tizen will also be able to add support by updating the version of Chromium they use. Other browsers such as Safari and Internet Explorer do not have any support yet, but as with all new web platform features, hopefully support will arrive in future.
B
57
S
15
G
11
Posts: 912
Reputation: 12,606

Post » Sun Mar 16, 2014 5:45 pm

The real trouble with getting this to work on mobile is the way a lot of mobile providers handle NAT on their cell towers.. sometimes all customers on one tower, or even on a cluster of towers get stuck behind the same ip. Even worse, depending on how they are set up, different servers see a different ip, depending on where they are.

A peer-to-peer based approach will fail in a scenario like this, so you can only safely assume it works for people on their private wifi instead of outside in the wild via a mobile connection.
B
72
S
28
G
32
Posts: 477
Reputation: 19,640

Post » Sun Mar 16, 2014 5:54 pm

1. I've had a few problems with CocoonJs.
2. It may be possible to call UDP methods on iOS by extending Ejecta because you can call Objective-C methods by using it.

http://impactjs.com/ejecta

I've made a tutorial on exporting C2 to Ejecta: Deploy your C2 game to iOS - The easy way.
https://www.scirra.com/tutorials/907/de ... e-easy-way

There's also a video, but it is a good first step. Make some history.
Epic Space Online - Google it!
B
34
S
10
G
5
Posts: 165
Reputation: 6,687

Post » Sun Mar 16, 2014 9:25 pm

Both Chrome for Android and Crosswalk should support WebRTC. (Crosswalk is a version or two behind Chrome IIRC so may take a while to catch up to the version that works.) It won't be supported in CocoonJS or Ejecta (neither are real browsers).

Peer to peer connections can happen just fine through cell data - there's nothing special about that type of Internet connection, except it transmits by long-range radio instead of cables or wifi. However restrictive types of NAT are probably more common with cell providers. We did test the multiplayer object with a phone connecting over HSPA and it worked fine, with only 20ms extra latency, so it's perfectly possible. I don't know if it would work well having cell data working as host though, especially since cell data can be more unreliable. It's the kind of thing that it's hard for us to test, especially since cell data varies from country to country, so it's interesting to hear how it works for people round the world.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,228

Post » Sun Mar 16, 2014 10:49 pm

Not looked at the multiplayer stuff yet, but i am assuming Node-webkit is supported ?
B
47
S
16
G
9
Posts: 1,097
Reputation: 11,180


Return to Construct 2 General

Who is online

Users browsing this forum: jakezinis and 3 guests