Advertisement

Lode Runner guards A.I.

Started by May 30, 2011 12:53 PM
5 comments, last by m_waddams 13 years, 5 months ago
Hi everyone,

The guards in my Lode Runner remake are a little too clever I guess.
In the original they would keep doing stupid (strange?) things,
like 'fleeing' from you when you're both on the same ladder...
I'm thinking maybe the guards should 'retreat' to their starting positions
when they can't reach the lode runner. For instance in level 9 (see below),
it's almost impossible to finish (it can be done, luring them to higher ground).
Any ideas, or existing algorithms for lode runner games? (not the original,
I don't want them that stupid : - )

Download Lode Runner


lr9.jpg
Do you have them evaluate their path to the player on every update? A very easy way to dumb them down just a little is if they only plan their paths every second or two.

They should still continue to the point they intended to go the last time they "thought," but the delay in changing means the player might get a little breathing room by quickly slipping through between updates.

You can also have them think again every time they reach their target point so they're more responsive when they're hot on the player's tail, but a good evasive action would give you some distance and let them turn "normal" again.
Advertisement

Do you have them evaluate their path to the player on every update? A very easy way to dumb them down just a little is if they only plan their paths every second or two.
Yeah, but they would still be too clever. Sometimes they need to take the long way round. They have to go up (see picture, or http://www.youtube.c...h?v=Z3mrMiqvsDk, the stupid way they behave in the original).
Sorry, my suggestion was for dumbing down the AI in general, I didn't take your level into consideration.

Looks to me like they can tell when they're going to sandwich the player while on a ladder, and reroute any above you to attack from below instead. I'm not too familiar with the game but I assume that's why the player in the video waits for one to get low enough before climbing.

Since the level itself has that ladder as a key limitation, there may not be much else to do except the same thing.

Looks to me like they can tell when they're going to sandwich the player while on a ladder, and reroute any above you to attack from below instead.
But then why don't they actually sandwich? My guards would, and it still wouldn't solve anything...

But then why don't they actually sandwich? My guards would, and it still wouldn't solve anything...


I'm guessing it checks for that specific condition, where two guards are using or intending to use the same ladder that the player is on, and there are no paths for escape. Then it probably restricts the space above the player so they can't consider climbing down. Imagine the player has an invisible wall above them when that happens in that video, and you can see the AI move to find the next shortest route - Dropping off the top and attacking from the bottom. With a shorter ladder or with other floors in between, the effect would be less noticeable.

A programmer might create little failsafes like that to prevent completely unwinnable situations that happen too often in their game. If the player had the opportunity to avoid the trap, sure it's their own fault for getting stuck. But when the design of a game or level makes these problems happen way too easily, you'll either have to redesign things or make an exception so the player doesn't get too frustrated at it. If that ends up making the level 'too easy' as opposed to 'ridiculously unfair," most designers might prefer cutting the player a break.

Of course, I'm only guessing based on a minute-and-a-half clip for a game I haven't played, so if anyone else wants to correct my assumptions, please do!
Advertisement

[quote name='Milton Waddams' timestamp='1306765033' post='4817511']
But then why don't they actually sandwich? My guards would, and it still wouldn't solve anything...

A programmer might create little failsafes like that to prevent completely unwinnable situations that happen too often in their game. If the player had the opportunity to avoid the trap, sure it's their own fault for getting stuck. But when the design of a game or level makes these problems happen way too easily, you'll either have to redesign things or make an exception so the player doesn't get too frustrated at it. If that ends up making the level 'too easy' as opposed to 'ridiculously unfair," most designers might prefer cutting the player a break.

Of course, I'm only guessing based on a minute-and-a-half clip for a game I haven't played, so if anyone else wants to correct my assumptions, please do!
[/quote]
Thanks for thinking along :)

I'm not sure I want to implement such crazy failsafes.
I think I'll have them go to their starting positions (which happen to be nicely out of the way), and move around only a bit .

This topic is closed to new replies.

Advertisement