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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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