How to do multiplayer?

For questions about using Classic.

Post » Thu Dec 30, 2010 2:28 am

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: http://www.youtube.com/watch?v=QH06zyZAwsE

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!
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Thu Dec 30, 2010 2:39 am

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 [code:3rvaezg1]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.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Thu Dec 30, 2010 2:46 am

He does this thing where he locks you over his head and then waits, it's cheating.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Thu Dec 30, 2010 2:53 am

[quote="QuaziGNRLnose":35brma4u]He does this thing where he locks you over his head and then waits, it's cheating.[/quote:35brma4u]

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.
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests