How to do multiplayer?

This forum is currently in read-only mode.
From the Asset Store
The official Scirra Multiplayer Signalling Server for helping peers find and connect to each other
  • Sorry to ask such a BROAD question...but what's the best way to do multiplayer?

    I'm trying to make a game similar to Mario Battle or whatever it's called. This:

    Subscribe to Construct videos now

    Basically you have 2 players that are EXACTLY THE SAME except for their sprites and their controls. I've thought up a number of ways I can do this, but none of them seem..right.

    1. Make duplicates of player 1's collision and sprite masks, put everything in 1 family, then use the family in events instead of the actual objects and let Construct's object selection do the rest. That sounded easy enough until I found out if I change one collision mask to player 2, it changes the other one as well, and there's no way to change the platform behavior's player in events. So that's not gonna work.

    2. Make player 1 and player 2 completely different objects, but with the same values and events. That would be pretty easy except I would have to program everything TWICE, and AGAIN for each additional character. So much for 4 player That's not gonna work.

    3. A confusing combination of 1 and 2 that hasn't worked out too well so far.

    So. I haven't found any examples and this is my first time making a multiplayer game. I would greatly appreciate some help as I'm trying to finish this for a new years party! Thanks!

  • Omg, I used to destroy Quazi in SMB 3 battle back when we were kids.

    As for multiplayer, you can use instances of objects, just give them a value called "player" and use that to pick them with events. You will have to copy the events for controls and change them to other keys, but it shouldn't be too hard if you structure the events well. I recommend you start with a

    value "player" equal to 1[/code:3rvaezg1] event, and subevent all the movement controls off of that. Then when it comes time to make player 2, copy that huge nested event, change it to 2, and change the control keys. The instance with value 2 should then behave the same way, but with other keys. Depending on complexity, it could get really tedious.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • He does this thing where he locks you over his head and then waits, it's cheating.

  • He does this thing where he locks you over his head and then waits, it's cheating.

    Hahaha I do that all the time! Atleast you can button mash your way out of it. No worse than constantly hitting the block underneath them.

    Anyway. Hmm..Well that helps a bit. I'll see what I can do.

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