The Daily Click ::. Forums ::. Klik Coding Help ::. Platformer sidekick AI ?
 

Post Reply  Post Oekaki 
 

Posted By Message

Blue66



Registered
  24/05/2008
Points
  1186

GOTW JUNE 2010 WINNER!Hero of TimeVIP Member
27th February, 2009 at 19:51:44 -

Er, yes. The topic is already the full question

How can I realize a trusty sidekick that follows your around in a platformer? Kinda like the kid from Ainevoltas2 (love that damn game^^)

Thanks!

 
www.paulinthenet.de
www.gungirl2.com

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
27th February, 2009 at 22:19:49 -

The earliest way I got this working in my game was to have a list recorded of the direction, X and Y and any initial propulsion physics (like jumping, wind etc) of the main character. Every key event, such as running outside of a radius between the 2, jumping, fighting etc, basically anything more than standing nearby would start the recording sequence and the AI player would follow. This works especially well if you're using 2 PMO objects to handle them both. Then have the AI look at the position and move at the same speed etc.

It's kinda primitive really and only really works if both the player and AI have the same physics properties.
So it'd be good to use either the List object with string parsers or an array.

But that is just relentless following and doesn't take into account independent path finding, say if the AI character misses a platform and has to work its way back up. That's another load of coding.

Edited by Dr. James MD

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

alastair john jack

BANNED

Registered
  01/10/2004
Points
  294

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!VIP MemberMushroomI am an April Fool
27th February, 2009 at 23:29:12 -

I asked the same question when I was making Aine2, lol.

 
lol

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
28th February, 2009 at 00:22:11 -

Here's the link to the thread.
http://www.create-games.com/forum_post.asp?id=205285&show=all

 
n/a

Blue66



Registered
  24/05/2008
Points
  1186

GOTW JUNE 2010 WINNER!Hero of TimeVIP Member
1st March, 2009 at 01:49:24 -

Didn't find the thread on my own but it's very helpful. Thanks guys

PS: Please do Ainevoltas 3 or at least make an extended version of A2, it's highly addicting and fun to play ^^

Edited by Blue66

 
www.paulinthenet.de
www.gungirl2.com
   

Post Reply



 



Advertisement

Worth A Click