Jump to content

Top down world with player falling from it (like in Bastion)


piotr
 Share

Recommended Posts

Hi,

 

I'm really at loss here and I'd appreciate some help. Is it possible in Phaser to build a top down world with the player (and enemies) falling from it when it goes over the edges (see picture)? What would be a possible layer and collision set up?

Thanks

p.

post-15566-0-00502100-1438549245.png

Link to comment
Share on other sites

This looks like a basic isometric game, where you have allowed tiles (the road) and tiles that kill you (the tiles you can't walk on).

 

Another way would be to simply create a polygon shape that are the "denied" areas (areas where you die) and add a simply collision event to kill the players when they hit it (and maybe simulate a falling animation).

Link to comment
Share on other sites

tips4design is thinking what I'm thinking. Don't think of it as "falling", think of it as a death animation that plays when the player intersects a particular polygon. Cut player control, change animation, tween the sprite off the screen.

 

You can sort the world using "this.game.world.sort('y', Phaser.Group.SORT_ASCENDING);" at the bottom of your update method in your state (example pulled from the docs) to achieve the depth sorting you want, too.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...