Intelligent A.I

GrimmGhostsGrimmGhosts Member, PRO Posts: 33

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?

Comments

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,170

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

    https://help.gamesalad.com/gamesalad-cookbook/2-making-it-better/a-pathfinding/

    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 Member Posts: 599

    That sort of sums up what @adent42 said.
    Best
    Two.E

  • bob loblawbob loblaw Member, PRO Posts: 793

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

    very good learning resource for the platform.

Sign In or Register to comment.