Search the Community
Showing results for tags 'enemy ai'.
-
Hi If anyone is interested I created a basic enemy path chase system. It may be of use to someone else trying to make one themselves or to create a better version of it. The basics of the sytem are quite simple (mainly 2 functions) - I created a map array and a group of enemies - In the update function I use the chaseMe() function for the enemies to use their "line of sight" to start the chase if the player isclose to the x and y on the stage - If the player escapes, there is a short timer that will move the enemy (moveMonster() function) in a random direction where it may "see" you again and start the chase again It is pretty basic - the demo is below, use cursor keys to move the player http://html5gamer.mobi/projects/6/ You can view the source code in the browser (ctrl + u) or download the full demo in the zip file attached Eric 6.zip
-
- phaser
- pathfinding
-
(and 1 more)
Tagged with:
-
Hi! I'm use arcade physics in my game. After adding enemies in world, need to revive him : ) In update method, i change enemy.body.position to make him moving. Checking if enemy collide with worlds bounds then swipe direction. But i have problem. How i can check tile before enemy is drop down? I have one tile map, and two layers. Background layer and collision layer. So i figure out that tilemap have method hasTile which take three parameters x,y - tile coordinates, and layer. Can you please give me example how to convert worlds coordinates in pixels to coordinate in tiles and how to correctly use map.hasTile()? Sorry for my terrible English