How do I create a 4 player same screen game?

Get help using Construct 2

Post » Sat Apr 09, 2016 12:19 am

I have made a simple game in which each person drags and drops a character onto a platform and after a 5 seconds a random platform drops how could I do this so....

1. local multiplayer with multiple touch

2. possibly different devices multiplayer

any ideas?
Posts: 8
Reputation: 472

Post » Mon Apr 11, 2016 10:34 pm

1) you can use the touch object to keep track of who's pressing in which area of the screen to control different players as one solution eg: 4 quadrants)

2) there's a "photon" plugin for making multiplayer games in construct for use with multiple devices and also check out this plugin someone is working on

there is a construct 2 plugin for it. allows for multiple plays on one screen, like good old couch co op games. each player uses their phone as a controller
Posts: 1,002
Reputation: 17,932

Post » Tue Apr 12, 2016 12:42 am

I've never used the multiplayer stuff before, but as for your first question:

I take it your game works on the player(s) touching their player character to move it. If this is the case, the way to make it work for four people is pretty simple.

For local multiplayer with multi-touch, you need:
- A system to differentiate between several touches (keeping track of them)
- A way to keep this tied with each player
  I always like to think that if you do everything with correct programming logic, and make any situation possible, most of these sort of difficult-looking things automatically happen. That is, if your game already differentiates between touches, you've got your game. Since the game can't differentiate between players (same device, and the device doesn't know who touched the screen) the only issue is keeping track of the touches and which character they belong to.
In a bit more detail, you need the dragging and dropping part of the program to recognize the difference between touches.
  In pseudo code:
on touch | store touch index in the object
for each touch | do drag and drop events
on release, find the object with the touch index that was released | reset the variable (e.g. to -1)

Hope that helps. I don't have much experience with the touch behavior, but it should work.
Posts: 165
Reputation: 5,115

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests