Jump to content

Random enemies follow player? NOOB


roko68
 Share

Recommended Posts

Just started playing with Phaser and am trying to figure out how to randomly generate a group of enemies, and have them follow a "player". I've seen something close here:

http://gamemechanicexplorer.com/#follow-2

However, I'd like the enemies to not follow in a line.

 

I'm looking for something closer to Robotron:

 

Any thoughts or ideally code examples? Help a NOOB?

Thanks!

Link to comment
Share on other sites

The same site has other examples of homing and flocking which may be more suitable: http://gamemechanicexplorer.com/#homingmissiles-6

 

At the most basic though, you could just something like this example (which is very similar to the way it works in Robotron): http://examples.phaser.io/_site/view_full.html?d=arcade%20physics&f=move+towards+object.js&t=move%20towards%20object

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...