How do I do two layers with platforms?

  • Hey everyone!

    I wanted to make a game like Mighty Morphin Power Rangers The Movie for the Snes. It's a beat 'em up platformer. The thing about this game is that it has 2 layers of gameplay in which the characters can freely change.

    Do you have any suggestions on how to implement these two layers? I think the solid behaviour would be pretty messy to work with...

    Video for reference:

    https://youtu.be/KJ1cKoNtUws?t=29s

    Thanks in advance

  • Out of first look I would suggest you put all the objects that are supposed to be on the second layer in a family and program them to accept collisions(solid enabled) only when the player is overlapping the object at offset -50 for instance. It might be messy but I think it is doable.

    There's a small example, it's not perfect, but you can improve on it - https://1drv.ms/u/s!Ap7lCHAb5gNE5U_hQ5pc7OLclmKV

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • wallabe this wouldn't work on a 2 player game, I need both solids enabled! like, if player 1 is on one solid and player 2 is on the other

  • For 2 players I can only think of using Physics to do that, unless you find a plugin for separating collisions using Solid. With Physics every object would have it's own collision switch for every other object.

  • Layer - 0 make the background color Brown, like the color of the doorways.

    Layer - 1 create storefronts > sidewalk.

    Layer - 2 create the trees.

    Layer - 3 create the road.

    ---

    Layer - 1 Add by standers 1st. Then a player on that layer.

    Layer - 3 create 2nd player.

    Create enemies, animations on their respective layer.

    For a 1 player game - start them on the road. If the want to move to the side walk > push up on the controler > move player to layer 1.

    May have to mess around with it a bit. Especially the solid trees so the player doesn't morph through them.

  • I guess the solution would be to make a platform behaviour myself using custom movement... If I make any progress, I'll post it here.

  • I think the key would be to make it so that you can only collide with objects on the same layer as you. I have no idea how to do that however without plugins, which is a problem. So... Can you make it so that objects can only collide with specific objects?

  • Enemie 1 > is on layer x

    Player 2 > is on layer x

  • what if you used invisible sprite like strips on the screen to indicate which layer it would be affected by ?

    like for instance if player and enemy are on the invisible sprite then they should be moved to layer 2 and if they are on that layer do some like the overlap offset ordeal.

    and dont use solid since solid wont work with screen layer. this can be used for the z order effect as well. so in other word the player moving downward would have to be moving toward the higher layer number while the player moving upward to be moving to the lower layer number.

    this is just one example or if you like to you can use something like If player is between a certain Y value let say 300 min to 600 max move him to a layer and changes when hes at 100-200.

    And use the layer as a positional / pick up

    although you would still have player clipping issue not sure how to go around that but i think the key is invisible sprites to control the layouts ?

  • So just to update this.

    I actually made it. I used the Custom Movement behaviour. But it required me to actually redo the whole platform behaviour with the only difference being the check between different solids. Kinda troublesome but I hope the extra work pays off later!

    Thanks for everyone who gave tips here!

  • siks Cool, this topic pops up every once in a while and I've battled with this problem myself. So far I haven't really found a good solution for this in C2, if you have any tips/capx to share how to implement it and point me to the right direction that would be great:)

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