A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Pathfinding

  1. #1
    Member
    Join Date
    Aug 2008
    Posts
    54

    Pathfinding

    Still working on this zombie game, and I've finally can't avoid this any longer lol...

    Right now my zombies find the tangent angle between them and the player, adjusts rotation, and walks towards him... pretty straightforward. What I'm wondering is if any one can put me onto an efficient pathfinding algorithm that will come into play, if for example there is a box between the player and the zombie that I don't want the zombie walking through...

    My game is not grid-based, so I don't believe A* will work with it... not to mention I think A* would be overkill for the level of game I'm making.

    Thanks in advance...

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    I think you're right about A*, thats only going to be useful in maze-like maps...if you just have a player and some obstacles you're probably best off just hit-testing and if it fails, move your zombie back and turn him 90°. Or, here's a slightly more advanced approach.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center