A.I.???

For questions about using Classic.

Post » Mon May 31, 2010 2:31 am

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?
B
1
G
2
Posts: 7
Reputation: 639

Post » Mon May 31, 2010 6:19 pm

No A.I. information to learn from? I have not been successful with search outcome.
B
1
G
2
Posts: 7
Reputation: 639

Post » Tue Jun 01, 2010 1:34 am

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
B
3
S
2
G
2
Posts: 187
Reputation: 1,449

Post » Tue Jun 01, 2010 2:58 am

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.
B
1
G
2
Posts: 7
Reputation: 639

Post » Tue Jun 01, 2010 5:26 pm

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.
B
2
S
2
G
4
Posts: 156
Reputation: 1,762

Post » Wed Jun 02, 2010 5:26 am

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!
B
1
G
2
Posts: 7
Reputation: 639


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest