Choeeey Posted December 14, 2014 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"? Link to comment Share on other sites More sharing options...
Dragonfire Posted December 14, 2014 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/ Link to comment Share on other sites More sharing options...
Choeeey Posted December 14, 2014 Author 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 Link to comment Share on other sites More sharing options...
Dragonfire Posted December 14, 2014 Share Posted December 14, 2014 I am no Phaser expert, but how Phaser can detect, that the black area is not walkable? Link to comment Share on other sites More sharing options...
valueerror Posted December 15, 2014 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/ Link to comment Share on other sites More sharing options...
Choeeey Posted December 15, 2014 Author 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? Link to comment Share on other sites More sharing options...
rtlehr Posted December 15, 2014 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/ Link to comment Share on other sites More sharing options...
Recommended Posts