A.I.???

This forum is currently in read-only mode.
  • I build most part of my game with level and character, but I wonder how to make A.I. for each character sprite?

    I have sometimes 22 character per layout and they all need differing A.I. assignment. Like some need to move back and some forward, some to right and some to left, some diagonally, but all based on what a character on the opposing side does. Sometime, the enemy needs to chase after a good guy.

    Is there a tutor guide for making A.I. in Construct?

  • No A.I. information to learn from? I have not been successful with search outcome.

  • Hello.

    Game AI is one of the most difficult aspects of game programming. That's one reason why many games do not feature single player modes.

    It's difficult to say what would work for your needs, but 'custom movement' behavior with conditions dictating what the movement will be based upon what the player does would be a common scenario. There are generally no 'cookie-cutter' solutions to game AI.

    Construct also has 'Line of Sight' and 'RTS' behaviors that can be of great help in this area. RTS seems to be a 'shortest path to...' algorithm, and can be one way to implement chasing.

    Here are a couple of my Google searches that seemed to have some promising links:

    game ai programming

    shortest path algorithm

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for response information

    I first thought A.I. in Construct can be based on movement, your information give good confirm. I wondered if there have been game example of A.I. in .cap to learn, but I think I can get create A.I. based on custom movement looped for each character and attach it to specifed animation frame? That should work nice I think so.

    Do most people use custom movement with events? Seem like this is great for custom A.I., no? I first had just make animation movements random with lots of collision points and it worked okay, but I say to self that I'd like it more, ummmm, controllable. I'm control freak, haha. I do write c++ but this system with event take adjustment time to unlearn many c++ way of thinkings.

    Please excuse, my English quite stupid but learning.

  • Most A.I. in games today is based on a combination of two systems. The first being a waypoint system. These would be key points in the map that the A.I. should be traveling to at some point, for whatever reason.

    The second is a hierarchy of importance. The A.I. might have a routine set for exploring, then one set for defending itself, and then another for chasing after the player. The routine chosen would be based on factors like Player health, enemy health, ammo remaining or are they near a power up etc. These different routines are ordered by importance and the best one is chosen based on the situation the A.I. is in.

    So, the combination of the two then (for example) might be this: A.I. is wandering from point to point and spots the player. A.I. has full health and ammo so begins a chase. A.I. health drops too low so it looks for a nearby point to run to and get health, etc etc.

    Sorry if that was obvious stuff, but all of this can be set up in Construct relatively easily with groups of events, private variables and containers.

  • I thank you all for kind information. I use custom movement now. I have make it set up so enemies follow hero to fight base on hero direction angle. Still more enemy and hero interaction need added, but very promising as of present.

    Final simple thing must be said, Construct is best!

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