How do I create a 4 player same screen game?

0 favourites
  • 3 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • 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?

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

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