Enemy patterns in metroidvania games (and side-scrollers in)

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Enemy patterns in metroidvania games (and side-scrollers in)

Post by Bob the Hamster »

So I was thinking about enemy AI in metroidvania games, and realizing that more often than not, it is really about enemy *patterns* rather than AI.

One of my favorite metroidvanias is CastleVania Symphony of the Night, but when I think back it was hard for me to remember how often enemies move in fixed patterns, and how often they move in ways that are a response to your character's movement.

The one that was most stuck in my head was the skeleton who throws bones at you. From a distance, he runs closer. Then when he reaches the desired distance (just outside of your normal attack range) he wobbles left and rick while throwing bones in your direction. If you advance on him, he backs up (still throwing) but he isn't as fast as you, so it isn't hard to kill him.

However, I was thinking about other platform games, and how in some of them, the enemies seem to work purely on fixed patterns. Mario 1 and 2 both (to the best of my memory) have strictly pattern-based enemies.-- wait, I take that back, the mask that chases you when you are carrying a key in Mario 2 does track your current X/Y position, but such enemies are few and far between. In Mario 3 I can remember a few more, but mostly they are just enemies who seem to include "turn to face towards player" as a step in their pattern.

What about Metroid? I have played most of the side-scrolling metroids, but it has been long enough that my memories of specific enemy behavior is fuzzy.

My question to all of you, is what side-scrollers have you played recently, and what do you remember about the enemy AI and/or patterns?
User avatar
Mogri
Super Slime
Posts: 4669
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Re: Enemy patterns in metroidvania games (and side-scrollers

Post by Mogri »

Bob the Hamster wrote:What about Metroid? I have played most of the side-scrolling metroids, but it has been long enough that my memories of specific enemy behavior is fuzzy.
Most of the enemies in Metroid are unintelligent.

Many of them are completely unaware of you: There's the wallcrawling enemies, who move in one direction perpetually. There's the flying croissants, who just move back and forth.

Many of them are situationally aware of you: There's the divebombing bat-thing, which drops to the floor and then explodes. There's the jumping thing, which just jumps at you. There's the magma seahorse, which emerges, fires in your direction, then submerges. And there's the eponymous metroids, which just charge straight at you.

The design of these enemies doesn't really vary between Metroid and Super Metroid. Super Metroid adds some other enemies to the mix, some of which have more nuanced AI. The space pirates are the best example here. By and large, though, the game world is populated by unintelligent beasts who act unintelligently.

The IGAvania titles have some fascinating AI even outside the context of combat. The Yoricks kick their skulls, then chase after them. The novice witches fly haltingly on their brooms and occasionally succeed in casting a spell. The boomerang skeletons have a relaxed pose but snap to attention when they notice you. Lots of little details show the love that goes into the game.

Super Metroid is a great game, but for reasons largely unrelated to its bestiary.
User avatar
Meowskivich
Blubber Bloat
Posts: 2199
Joined: Tue Mar 06, 2012 12:38 am
Location: Earth
Contact:

Post by Meowskivich »

Hammer Bros throw projectiles in an arcing fashion in random and precarious patterns, and will HUNT YOU DOWN IF YOU STARE AT THEM FOR TOO LONG. NO JOKE. TRY IT OUT. In mario 3 they made dodging them easier because they wield their hammers for about ~0.1 seconds before tossing them.
Chain chomps sorta bounce around and periodically dive in your direction, restricted by the length of their chain, though if you let them tug at their chain 64 times (I think it was) they BREAK THE CHAINS AND THEN sorta just leave you alone as they excited hop away off screen and are never seen ever again. A good idea to do in stage 5-1 of Mario 3 if you want to take the secret treasure exit of that stage and all you have is a plain racoon leaf.

Mario 3 has some good examples of basic platformer enemy AI that's pretty fair.

Big Mouth Bass (I can't remember if that's his name, I have the NES instruction manual behind me but I don't wanna get it) - He swims from one side of the screen to the other, then on his way back, if you are low enough to him, he will attempt to hop out of the water and eat you.
Some cheep cheeps (like in stage 3-2, I believe) will have this same AI, but they just hurt you with plain collision damage.

Cheep Cheeps - Various AI for the situation. There's the what is essentially random projectiles from down below AI where they just get flung in random arcs in proportion to your position and speed.
There's hoping across the water tops and I believe the 3rd or 4th hop tends to be about ~2.5 times as high as a normal hop.
There's swimming back and forth in a selected area, as well as until they hit a wall, or even on the occasion in auto-scrolling stages that certain variation, I think, can pass through blocks and just carry on infinitely.

Bloopers - They will chase you down, but they move toward you in quick but un-turning bursts, only changing directions after they stopped moving for the brief nanosecond to re-aim itself in your general direction. The Mother Bloobers (and yes, blooper and bloober are both technically correct, it's sorta random what it is called) have the same AI but with a tiny trail on mini-bloopers following the mother, and after the 3rd - 5th movement, it will shoot off it's babbies in, if I remember correctly, a quickly expanding clockwise four-way burst. She will then regenerate more after some time after doing this, but proceeds to act like a normal blooper until that time comes to sacrifice her children for the war effort.

Boo Diddly - Simply chases you through everything as long as you're not looking at it, being like a slower version of a weeping angel, really.
There are fireball ghosts that look like candle flames until you pass by them and they tend to walk for a bit and then quit. If I remember correctly. I didn't feel like giving them a separate category.

Thwomp - waits until you pass it's trigger point, which is typically the space between it and a wall/floor and plummets to smash you. then it reset it's position to normal before being ready to strike again.

Hammer Bros - I explained their general attack AI above, and it's pretty much the same regardless of class of bro, boomerang fireball or normal. Movement, they move back and forth within the same 2 block space, if I remember correctly, and randomly leap up into the air to often (but not always) change layers in their post (which typically has 3 in mario 1, but only 2 save for a few map-screen battle maps in mario 3). I don't think they can leap all the way to top layer automatically from bottom, but I've not played in a while. The Sledge Bro is a giant hammer bro, essentially, with the only difference aside from size is it's jumping, which is not to change layers, but to stun you when he lands if you're on the ground. If I remember correctly, when he reaches the peak of his jump, he doesn't come down immediately, he hovers for a rough few miliseconds and then plummets at, I believe, double-speed. Sorta implying that he's hitting the ground with great force.

Chompers - hop around in a general area, if you jump over them they jump up at you and will get ya if you're not fast or high enough. There is a variation that stands still but looks at your direction, and stepping in it's zone will cause it to lob a lot of fireballs at you in rapid succession (I'd say 5 - 7) and then it waits a brief second before it does it again. If I remember correctly, for some reason it is immune to the statue ability of Tanooki mario.

P-Plants - essentially just periodically pop in and out of warp pipes. If you stand next to the pipe or on it while it's inside, it will not emerge save for the red variation of Super Mario Bros 2 (japan, lost level in USA). those only stay down if you' on top o the pipe. any where else, and they'll come out and nip ya.
Venus Firetraps are a variation of the plant which will stay out longer but will stare at you for a moment before pitting a fireball or two in your general direction.
The mobile plants just, I think, wander in your general direction while blowing air out at a spiked ball that floats up and down in a manner to represent that, and the third blow tends to pop the ball high into the air. Some normal pipe-dwelling plants do that too, though they don't move, but they stay emerged.

Spike (if that's his name, I forgot. it's the green guys who do what I'm going to describe) - They walk in a manner towards you, if I remember correctly, and when you're in their line of sight (or just on the same floor level as them and close enough range) they will pull a spiked ball out of their mouth and throw it horizontally at you.

Goombas - walk left and right and off cliffs. weee. Paragoomba variations will hop a few times then make a big hop like the cheep cheeps, only on land. a few paragoombas will fly to a certain point up in the air and start raining microgoombas at a fair rate on you to make you unable to jump, which you can shake off by mashing the jump button.

Lakitu - like the microgoomba dropping paragoomba, but it drops SPINYS! And sometimes spiny eggs, which are even more insane green balls that hunt you down, though they can't fly, so they'll fall into pits.
Spinys tend to just walk like a normal goomba, but you can't jump on them. A rare variation has them crawling on cave cielings and will drop when you are close to them and spin at you like a koopa shell.

Koopa Troopas - See goomba for basic movement, only the red varation is smart enough to turn around when they approach a cliff edge. when stomped, they turn into a shell that can be kicked or carried for a while before they emerge again, even if you hold it. ParaTroopas come in a few variations, one hops in a consistent arc bouncing again once they hit the ground. other just fly in a set path. color does not determine the paratrooopa AI in mario 3. No racism on that account.

Buzzy Beetles - green koopa troopas that can't be killed, and do the same thing as spinys with the cieling crawling.

Dry Bones - Green Koopa Troopa AI, but turns into a pile of bones instead of a shell. Can't be picked up, but can regenerate after a while.

Podoboos - Pop out of lava pits at sometimes varying heights. Nothing special otherwise.

Radioactive Waffles (aka ROTODISKS) - orbit a single block

Koopalings - Most of them just walk after you while occasionally shooting projectiles from their rod. When struck, they retreat into their shell and zip around trying to hit you that way and pop back out after a few seconds. World 3 (wendy) will shoot out a single ring and nothing more until hit again and the ring will bounce off the walls in a pong-like fashion. She adds one ring per hit. Lemmy (I think it was) is the only other special one where he rides atop a ball and shoots bouncing balls at you as projectiles and just runs to the other side of the screen every now and again. Two of the normal koopalings will do the Sledge Bro stun thing (not the animation for it, though).

And that's all I feel like describing for now.
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x :V
User avatar
msw188
Metal Slime
Posts: 787
Joined: Tue Oct 16, 2007 1:43 am
Location: Los Angeles, CA

Post by msw188 »

The hammer bros (and their various relatives in 3) turn to face you. Adventure of Link is a sidescroller with some great simple AI-based enemies. You have the iron knuckles who try to keep a fixed distance (in the case of the blue ones, a large distance). Same basic idea with the Goriyas (boomerangs) and moblins who like to toss their spears.

I seem to remember a small handful of AI in the Kirby games, but I can't think of details at the moment. There's the great smily-dog-heads that are just stationary obstacles until you actually try to suck them in. Come on, man, the dog was just sitting there chillin! Why you tryin to scarf him down like that?!

I know this doesn't really answer the original question, but I think it's worthwhile to question the point of enemies in a sidescroller. Is it really a good idea to think of enemies and their 'AI' as separate obstacles from the stage itself? What I mean is, lots of sidescrollers have obstacles designed to test jumping and running control/reflexes, based on the stage layout. If the stage is dynamic, it's almost always pattern-based. Imagine if the stage had its own AI, where it would TRY to make blocks disappear, say, as you were about to jump onto them. Would that really be fun?

In the same sort of way, enemies having AI rather than patterns might not be desirable for some kinds of sidescrollers. The Mario games come to mind right away - the enemies are fun partially because they're dumb, and are really just extensions of the platforming obstacles. The few and far between enemies that require a bit of patience and thought to beat/advance aren't always the most fun to deal with in those games (as opposed to a bunch of well-placed , but idiotic, goombas that require only a quick timing change to your jump).

On the other hand, it would feel pretty silly if the Ironknuckles in Link didn't try to keep their distance. I guess this is the part of the difference between a "Metroidvania" game and a "platformer". But since James brought up Mario for examples, I find myself wondering which type he's going for.
I am Srime
User avatar
Meowskivich
Blubber Bloat
Posts: 2199
Joined: Tue Mar 06, 2012 12:38 am
Location: Earth
Contact:

Post by Meowskivich »

Reminds me of the great wall area, where the lizardmen atop the wall through rocks at you, their AI is set to throw where you're going to be, so if you keep running right, they'll hit you. left. hit. standing still?
hit.
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x :V
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Yeah, I have been thinking about this more, and I think what I enjoy about enemies that use mindless patterns is that after a few encounters I learn their patterns, and so when I see the same enemy later, I can predict their actions.

Actually that is true of the smarter enemies that react to your movements too. msw188, you mentioned the Iron Knuckle in Adventures of Link. I had forgotten about him, but I loved those! I remember how frustrating they were when I first started playing, but how proud of myself I was when I learned how to kill them reliably.
User avatar
Jack
Slime Knight
Posts: 266
Joined: Tue Oct 16, 2007 2:39 pm
Location: Maine
Contact:

Post by Jack »

I can't honestly think of a game where enemies didn't have a pattern but was still fun to play. Of the games mentioned each enemy has a pattern or set of easy to read moves. Take a game without either, like Dr. Jekyll and Mr. Hyde - it's both frustrating and incomprehensible.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Interesting. I had never played Dr Jekyll and Mr Hide, but I just went and watched a youtube playthrough of several stages of it.... I can only describe it as mesmerizingly tedious. I see that many of the enemies used randomness in their patterns, and I can definitely see how that takes away from the fun (although it has some really nice maptiles! I was digging those victorian houses!)

I can see that for my sidescroller, I really should use randomness somewhere between rarely and not-at-all.
User avatar
jcenterprises
Slime Knight
Posts: 132
Joined: Sun Aug 21, 2011 7:30 pm
Contact:

Post by jcenterprises »

Speaking of terrible sidescrollers, I once attempted to do a Cheetahmen-like game for the Terrible Games Contest as part of a larger collection of terrible games not unlike Action 52, though I actually couldn't get around to that game because I tried to program a space shooter game but couldn't and the project ultimately proved too amibitous for such a short amount of time. Still might want to try the Cheetahmen-like beat-em-up someday, but not really sure how to make a beat-em-up. It wouldn't have to be perfect, maybe some levels that are like Final Fight, and others that are just platformers, and it could even recreate the jumping punch glitch.
Last edited by jcenterprises on Tue Jan 28, 2014 5:43 am, edited 1 time in total.
User avatar
Meowskivich
Blubber Bloat
Posts: 2199
Joined: Tue Mar 06, 2012 12:38 am
Location: Earth
Contact:

Post by Meowskivich »

Hey. It'same. The only platformer I've played lately would have been Spyro 4, and as anyone who's done their geometry knows that game is rather meh. But being the guru of mario 3, I can keep rattling on about foes in that.

Boom-Boom - Many different tweaks to this boss are in existance, but you nearly see none due to their AI. They typically start off by jumping a tad bit into the air and then run back and forth for a set amount of time before retreating back into their shells. When jumped on outside their shells, they retreat as well. Second phase tends to be the different one of them all. Sometimes all it is is a speed up, sometimes he grows wings and then flys atop the room and swoops down to hit you now and again, I can't remember if he retreats to his shell in that form because as soon as boom-boom emerges you can hit him, thus stunlocking him into place making it a quick pathetic miniboss fight. gotta love him. I can't remember any other phases, I think I'll pop the game in tonight or sometime soon and take a look at boom-booms.

bob-omb - Walk around like goombas, I believe. After a while, they'll decide to explode. If jumped on, they become able to be carried like koopa shells, but will explode shortly after being hit like this.

I already explained chain-chomps earlier.

Flying Beetles are more like platforms than foes. may as well say this about them: they fly in a horizontal line, mostly just leftwards, and when you jump on them, they fall a small bit, then they start lifting you higher and higher as long as you're on it.

I'm going to get my instruction books out for the game. snes and nes version alike. I feel like I'm forgetting a few, oh, like the fire snakes and and the goomblocks.

Fire Snake - I don't know if that's it's name, but it's a fireball with a tiny trail of tiny fireballs that hops around, trying to chases you down. Pauses for a second after every hop, but tends to hop in your direction, sometimes even jumping higher to get at you.

Goomblocks - Microgoombas inside of brick blocks, they stay still and hidden amongst regular brick blocks, but when you near them, they start bobbing up and down a tiny bit and then they make an arcing leap towards you. being jumped on kills them.

Okay, now to the instruction guide...after I just remembered the sun

Sun - uses UV powers to shoot death beams fro the sky, eradicating all from this plane of existence. or rrather, it stays up like it's a background object, then after a trigger goes off it starts making little clockwise or counterclockwise motions in the sky, then swoops down at you, and makes it's way up to the opposite top corner of the screen and trys again.
I feel also like mentioning the twister in it's level. It goes leftwards (I can't remember if it comes after you specifically or not) and if you run into the middle or bottom of it, you get trapped and just spin in place as it carries you back a way and then it despawns and then you try again.

ok, guides, here I come.

nevermind, they're harder to get to than I thought.

however, i did remember one more, and this is probably the last one I'm going to mention (subtracting giant versions of earlier foes, there's nothign to say about them anywho)

Lava Lotus - A clear large flower thing that exists in water stages, it sits i place sorta pulsating as you see red balls spawn in it slowly, and when it's full, it spits them upwards in a spread that after a short distance, they fall down. rinse, repeat.
dOn'T MiNd mE! i'M jUsT CoNtAgIoUs!!!
Play Orbs CCG: http://orbsccg.com/r/4r6x :V
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

jcenterprises: I had never heard of Cheetahmen. I just looked up some gameplay footage, and wow, it looks hilariously buggy :)

Meowskivich: I had forgotten that Mario 3 had such a wide selection of enemies. I like that there were some rare enemies that only appeared on a small number of stages.

So we have talked about enemies that have patterns that are aware of player position or direction, and enemies that have patterns with random components (boo!)

What about enemies that have patterns that are aware of the blocks around them? For example, enemies that only try a jump if they know they can make it? Can anyone think of examples of environment-aware patterns?
User avatar
Mogri
Super Slime
Posts: 4669
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

The oldest example is the koopa troopas in SMB. The red ones turn when they reach an edge, but the green ones will walk off.

Color-coded enemies with slight behavioral differences can expand your bestiary without requiring a whole new design.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Oh, dang! How could I forget the red koopa? I guess the not-walking-over-an-edge thing is pretty common. What about only jumping at an edge that can be cleared, but turning back if they know they won't make it.

I have been thinking about how to script that.
User avatar
Sparoku
Metal Slime
Posts: 309
Joined: Tue Jun 18, 2013 3:19 pm
Location: Dairy Queen
Contact:

Post by Sparoku »

Bob the Hamster wrote:jcenterprises: I had never heard of Cheetahmen. I just looked up some gameplay footage, and wow, it looks hilariously buggy :)
You'd love AVGN's review of it then.
"One can never improve enough nor should one stop trying to improve."
User avatar
Gizmog
Metal King Slime
Posts: 2622
Joined: Tue Feb 19, 2008 5:41 am

Post by Gizmog »

Has anyone mentioned Ninja Gaiden's "Walk left and right on the edge of a platform while throwing stuff at you so you can't jump onto the platform"? I love those guys. Castlevania's bats were pretty interesting in that they spawned somewhat randomly, but followed the same wavy pattern every time so you could time a duck or a jump around them.

The NES Castlevanias also featured enemies who would sit still, as if in the background and then wait for the player to approach to a certain proximity before leaping to life and running around on the ground after you.

Generally speaking, I don't remember a lot of super intelligent enemies in sidescrollers. Adventure of Link had those guys with the shields who knew if you were gonna attack low or high and took forever to kill. Other than that, it mostly was like... patterns and rhythm and memorization.
Post Reply