Choeeey Posted December 14, 2014 Report Share Posted December 14, 2014 Okay so I want to make a maze game. Say i have this image: Is there a way to specify that only the white area is "walkable" and the black area is a "wall"? Quote Link to comment Share on other sites More sharing options...
Dragonfire Posted December 14, 2014 Report Share Posted December 14, 2014 The easy way: Make the background white.Add two black rectangles.Activate Physics on the rectangles. If you have more complex maps, maybe try tile maps:http://www.gamedevacademy.org/html5-phaser-tutorial-top-down-games-with-tiled/ Quote Link to comment Share on other sites More sharing options...
Choeeey Posted December 14, 2014 Author Report Share Posted December 14, 2014 Thanks, I was hoping there would be a nicer way to do this as I am going to have about 8 different possible images/tilese.g left corner, right corner, cross over etc It will be a bit too messy for me to throw rectangles about the place, especially since I want to randomly generate the maze Quote Link to comment Share on other sites More sharing options...
Dragonfire Posted December 14, 2014 Report Share Posted December 14, 2014 I am no Phaser expert, but how Phaser can detect, that the black area is not walkable? Quote Link to comment Share on other sites More sharing options...
valueerror Posted December 15, 2014 Report Share Posted December 15, 2014 if i were going to create a maze i would definitely use a tilemap.. create the whole map in tiled editor http://www.mapeditor.org/ Quote Link to comment Share on other sites More sharing options...
Choeeey Posted December 15, 2014 Author Report Share Posted December 15, 2014 if i were going to create a maze i would definitely use a tilemap.. create the whole map in tiled editor http://www.mapeditor.org/ How would this work with random generation though? Quote Link to comment Share on other sites More sharing options...
rtlehr Posted December 15, 2014 Report Share Posted December 15, 2014 Check this out, I think it will help. http://www.emanueleferonato.com/2014/10/21/phaser-tutorial-how-to-create-an-html5-survival-horror-game-in-6-easy-steps/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.