How to make a Multiplayer App...

0 favourites
From the Asset Store
The internet is bombarded daily with new apps (app is the short term for application)
  • Didn't Apple add webrtc support in ios11?

    Haven't tried mobile multiplayer.

  • You can try the Photon Cloud plugin. I'm using it and find it way easier than the built in Multiplayer plugin. It doesn't really use the traditional Host/peer setup. So even if the "host" leaves the game is still running.

    Here's a link to the plugin.

    In my game i'm using random rooms of max 4 players. You just connect and start playing with random people from anywhere.

  • You can try the Photon Cloud plugin. I'm using it and find it way easier than the built in Multiplayer plugin. It doesn't really use the traditional Host/peer setup. So even if the "host" leaves the game is still running.

    Here's a link to the plugin.

    In my game i'm using random rooms of max 4 players. You just connect and start playing with random people from anywhere.

    I know it a little, the drawback is the free user limitation.

    20 users maximum at the same time, briefly.

    I am currently using the official plugin, this has an error when chrome and safari play together.

    Do you know if photon has this error?

  • The multiplayer plugn isnt supported on IOS so thats 50% of the mobile market you cant have access to

    Thats a dealbreaker if that's the case. Im developing for mobile so I definitely want to be able to publish on iOS.

    You can try the Photon Cloud plugin. I'm using it and find it way easier than the built in Multiplayer plugin. It doesn't really use the traditional Host/peer setup. So even if the "host" leaves the game is still running.

    Here's a link to the plugin.

    In my game i'm using random rooms of max 4 players. You just connect and start playing with random people from anywhere.

    That sounds interesting. And it's good for mobile too. If its easier to learn Im all for it!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The free user limitation is ok. If you get more users constantly playing your game you're probably earning enough already to cover the fee of the next tier, depending on how you well you monetize your game of course.

    Artpunk

    Photon supports all platforms. So far i have had no problem with either android ios, windows phone, and pc all can even play against each other in the same rooms. I'm targeting mobile and i think it's perfect for that purpose as your don't need the host/peer setup. I guess Mobile users wanna be able to just jump in and play at any time against random people, or create rooms to play with friends... very simple to setup. You can disconnect from a room and keep the room open until the last one leaves.

    For me it was very comprehensible...

    if player 1 moves... you send that to the photon server which then sends that movement to the other clients.

    if you fire a shot. You can first send that to photon server then to all clients including yourself to have the shots somewhat more synced.

    Most of the time the lag is minimal. I haven't measured any exact ping but on mobile, any lag will probably be caused by your mobile connection, not photon.

    I'm not an expert but if you decides to play around with it, I'm happy to answer some questions.

  • tunepunk when u say the lag is minimal, can I ask what kind of game is that you're testing in?

    How do you think Photon would handle a slightly fast paced game like a platformer or shooter?

    Just say I wanted to have a two player co-op with players moving around the screen reasonably quickly and enemies being destroyed etc, would Photon cope with that or would it show some lag?

  • Artpunk I haven't done co-op but by game arrowheads that i'm working on from time to time is a quite fast paced shooter. You can go to http://www.tunepunk.com/arrowheads in two different browser windows side by side... move your characters close to each other, and fire an arrow. The lag is very minimal... pretty much instant, so I don't think it will be a problem.

    If you wanna try the game on a pc, the game is touch based, so move around by clicking and dragging left side... shoot by clicking and dragging backwards on the right side..

    Or you can open one instance on your phone and one instance on your pc to see if there's any lag.

  • (Open the images in a new tab the Forums aren't showing the full sizes)

    All of the lag can be hidden by proper clientside interpolation

    Test project

    http://photonsandbox.ga/

    And based on this

    You're using it extremely inefficient by sending full c2 arrays(Overall tho the game does look good), Every time the player moves a short distance you're sending out 3583 bytes of data or 3.5kb.

    You can get away with sending waay less data and still have a smooth experience,and since its a smaller blast of data if you're on a mobile device you wont notice as much lag cause you wont be sending or receiving alot of data

    The limit of 20 players is only if you use the free edition of the service,IF you download a on-premise server your player limit is 100 by default so its a significant boost

  • tunepunk Nice game you got there.

    About Photon, do you think Photon Chat Plan is good enough for card game? or do you suggest going for Realtime Plan?

    I don't see any different except for pricing.

  • Phacanu Yes it's pretty inefficient. I'm sending XY and direction and some other stuff in an array every 0.1 seconds while moving because I didn't wanna lock directions. I Know you can make it much more efficient by only sending move start and direction, then move stop when you stop to move, but that would only work if i locked directions. i don't wanna restrict the player to any directions. Since you can move at any angle I need to update frequently for it to be accurate. So far i havn't figured out any more efficient way for a free 360 movement, and aiming.

    although it looks like i forgot to round some numbers before sending lol.

  • Phacanu Yes it's pretty inefficient. I'm sending XY and direction and some other stuff in an array every 0.1 seconds while moving because I didn't wanna lock directions. I Know you can make it much more efficient by only sending move start and direction, then move stop when you stop to move, but that would only work if i locked directions. i don't wanna restrict the player to any directions. Since you can move at any angle I need to update frequently for it to be accurate. So far i havn't figured out any more efficient way for a free 360 movement, and aiming.

    although it looks like i forgot to round some numbers before sending lol.

    You can actually just send x,y,angle outside of a array and thatd already be 60% more efficent

  • Thanks. I'll try that then. I just followed the examples provided by photon. They used arrays so.... how do I send multiple variables in one event without arrays?

  • I just played a game called snake crash last night on my android phone. It had a multiplayer button that immediately put you in a game against1 random opponent from somewhere in the world. It was really fun. I want to know if Construct 2 can do that? If so, how? I feel like if we had a couple more multiplayer tutorials (demo examples) made from Ashley, a lot more people would make multiplayer games.. Especially me...

    Can you give the reference of that snake game on Android please ?

  • unicornspitfire they used to have a product especially for turn-based, but maybe chat will do the trick? At least you can try it out

  • unicornspitfire they used to have a product especially for turn-based, but maybe chat will do the trick? At least you can try it out

    The official multiplayer plugin cover up most of features I want, however, if the host is disconnected then it's over which I don't want that and switching to Photon is a little bit intimidating for me because they have multiple plan to choose. Well I gotta try it now. Cheers

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)