How would I implement AI for Platformer?

Get help using Construct 2

Post » Sun Dec 02, 2012 5:54 pm

Hello.

I came across an idea that would involve a static non-scrolling platformer game.

Sort of like this map I have:

https://www.dropbox.com/s/5fmft07t64hvhkc/Level1.png


Your objective would be to destroy the AI that is trying to destroy you.
The AI I want them to basically behave just like your character with the "platform" behavior you can declare on your player under "movements".

So say your character jumps to one of the platforms on the left hand of the platform map, the AI will follow you to that platform.

Can this be done? I just cant grasp the logic flow I would need. I would need some help.

Thanks for anyone that helps. I appreciate it.


B
14
S
5
Posts: 345
Reputation: 2,427

Post » Sun Dec 02, 2012 9:53 pm

Maybe no one knows.
B
14
S
5
Posts: 345
Reputation: 2,427

Post » Mon Dec 03, 2012 12:13 am

I found the closest example to what I would like to do.

I would like my enemy AI to follow you on multiple platforms and attack you, but not as quite as the example below, its a little too fast of following.

http://www.johnnysix.net/games/FollowTheLeader01p/GameThirsty2012-12-03 00:16:28
B
14
S
5
Posts: 345
Reputation: 2,427

Post » Mon Dec 03, 2012 3:19 pm

The closest I could get is have the enemy set angle toward player with x and y location of player, with bullet behavior. But it is not realistic, because it does not act the same as the player using the platform behavior.
B
14
S
5
Posts: 345
Reputation: 2,427

Post » Mon Dec 03, 2012 5:21 pm

It's tricky man, I've never tried it, sound too complicated for me haha. I guess you'd put a bunch of logic sensors and set up a bunch of variables like jump, stop, turn etc and tell the AI to either stop, jump, turn or whatever whenever they pass over the sensors.

There's a bunch of examples in the forums, do some digging and you'll find it. Even in the arcade I think there's an example.CrudeMik2012-12-03 17:21:30
B
39
S
12
G
8
Posts: 580
Reputation: 7,108

Post » Mon Dec 03, 2012 11:23 pm

o.0 im confused lol.
B
14
S
5
Posts: 345
Reputation: 2,427


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests