![]() First of all, the player needs to collide with the ground that they are standing on (but nothing has to happen as a result of that collision, we will just have Phaser’s physics applied). The player must navigate through the level to reach the flag, but there are multiple potential collisions that need to be handled along the way. Take a look at this example from a game I am currently developing: Phaser has a built-in physics system that makes it quite easy to handle these sorts of scenarios. If a player touches a powerup then the powerup should be destroyed and the player should gain its effects, if the player hits an enemies bullet they should probably be hurt or killed, if a player jumps onto a platform they should land on the platform (not fall through it). These entities are going to need to interact with one another in some way to make the game playable. You might have the players character, a floor or some walls, some enemies, items, and so on. ![]() ![]() When building a game with Phaser you will likely have various objects on the screen. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |