How do I create 8-directions collision?

0 favourites
  • 4 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • I am creating a top down zombie shooter and I am currently programming the zombies, but I ran into a problem. The zombies tend to stack up when chasing the player, giving the imprecation that there are less zombies than there really are. The zombies AI uses a combination of path-finding and 8-directions. I would like the zombies to sort of repel each other (similar to Minecraft http://static.planetminecraft.com/files ... 177659.jpg).

    I have tried making the zombies have the Solid behavior but that leads to very glitchy behavior (Like zombies pushing the player thru walls). If anybody can help please respond. Thank You

  • The most realistic way is using boids algorithm. There is an example for that in forum. Alternatively simple hack would do the trick:

  • The most realistic way is using boids algorithm. There is an example for that in forum. Alternatively simple hack would do the trick:

    I love the example CAPX you showed. It is exactly what I was looking for! Except for one problem. The code you provided does not work with instances of the same object. If you know a way to make this work with instances of the same object, I would be thrilled!

    PS I tried using Boids flocking algorithm. But it did not produce the type of behavior that I wanted.

    PPS Sorry for the response being so late.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can use family for that :

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)