Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Intelligent A.I

GrimmGhostsGrimmGhosts Posts: 33Member, PRO

I was wondering if it was possible to create an A.I that would know how to navigate around the map instead of just bumping into houses go around them, and walk on bridges correctly is that possible?


  • adent42adent42 Posts: 1,497Key Master, Head Chef, Executive Chef, Member, PRO GameSalad Employee

    It's a bit more difficult to use in a "real time" application, but GameSalad has an A* path finding behavior.

    With a lot of details missing here's what you'll need to do:

    1-Layout your map as a grid. Obstacles and bridges need to take up whole grid squares.
    2-Make two tables with the same grid size. One for your map, one to record the path of your actor.
    3-Mark table cells on the map table that correspond to obstacles with -1.
    4-Use the A* behavior to find a path between two squares.
    5-Each cell should correspond to point on the screen (the center of grid square for instance). Use a timer to move an actor to the correct point on the path.

    I know it's a bit skimpy on detail, but hopefully that helps!

  • Two.ETwo.E Posts: 575Member, BASIC

    That sort of sums up what @adent42 said.

  • bob loblawbob loblaw Posts: 409Member, PRO

    i was just about to mention your template @Two.E

    very good learning resource for the platform.

Sign In or Register to comment.