piotr Posted August 2, 2015 Share Posted August 2, 2015 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?Thanksp. Link to comment Share on other sites More sharing options...
Red Spark Posted August 2, 2015 Share Posted August 2, 2015 AFAIK It's not possible with traditional 2D physics. You'd need to use some isometric physics lib or to create your own. Link to comment Share on other sites More sharing options...
tips4design Posted August 2, 2015 Share Posted August 2, 2015 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). drhayes and Tilde 2 Link to comment Share on other sites More sharing options...
drhayes Posted August 2, 2015 Share Posted August 2, 2015 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. Tilde 1 Link to comment Share on other sites More sharing options...
Recommended Posts