Tips for Buying EarthBound

July 13th, 2011 | EarthBound, Hacking, Uncommon Knowledge

The delivery man system in EarthBound seems pretty simple from a player’s perspective, but on the inside, it’s a completely different story. Ever notice how the delivery guy will walk around the map like a real character instead of just plowing right through walls and barriers? That’s tough stuff to program.

Many years ago, the PK Hack regulars wanted to dig into the delivery system to see how it worked and how robust it was. So they devised a test:

Part 1: Stick Ness in a cordoned-off area and see what happens



Part 2: Open up a few areas and try again



Impressively, the game finds a route, despite being a rather complicated trip. We also get to see which paths he chose – the bottom one both times. As I think Blue Antoid once put it:

The conclusion:

This subroutine was obviously programmed by hyper-intelligent space ants. We have not choice but to submit to the whims of our new insect overlords. Obey! Obey!

All in all, very cool, especially considering how absolutely insane EarthBound’s map system is – which happened to another (and probably THE biggest) reason for the game’s development woes.

Most other games developers probably wouldn’t have cared if a simple delivery guy walked over obstacles and walls, so I think this shows how devoted the developers were to not cutting corners. Not that that was really ever in doubt, of course :P

EDIT: Coming from a computer science background myself, I realize that pathfinding is not that difficult. But for whatever reason, this is cited by programmers (one of whom was Satoru Iwata) as being one of the toughest things to get working right in the game (see Sep. 9, 1994 here). Of course, the game was written in assembly twenty years ago, I’m sure it’s a lot easier nowadays.

 

Other Related Posts:

 

35 Comments to EarthBound Delivery System


Carl said on Jul. 13, 2011

It seems pretty ridiculous to let such a trivial part of the game hold up development so much. Where did you learn about this aspect of the delay?

Mato said on Jul. 13, 2011

No, don’t get me wrong, it wasn’t the main reason at all. It sounds like mostly the entire scripting and mapping system was what the problem was – the entire game’s framework, in other words. The delivery thing was just a tiny side thing.

It was mentioned in a Famitsu interview (Sep. 9, 1994), I posted quick stuff about it here: http://starmen.net/mother2/publications/

Zoom! said on Jul. 13, 2011

Interesting!

Miles of SmashWiki said on Jul. 13, 2011

“I, for one, welcome our insect overlords.”

But really, that it would be programmed for such specific situations is insane.

Halloween said on Jul. 13, 2011

This is awesome.

BigDream said on Jul. 13, 2011

Weird…

Zoom! said on Jul. 13, 2011

@MilesofSmashWiki I agree.

Mark said on Jul. 13, 2011

“You must be somewhere really strange.”

*Checks cone circle*

He’s good.

What'sHerFace said on Jul. 13, 2011

Huh. That’s actually really, really interesting that something like that would be programmed into a game like this.

It’s pretty advanced for a SNES game, isn’t it? I think a lot of games even now would have just had the guy appear or do a cutscene or something.

Ryusui said on Jul. 13, 2011

It’s not that crazy.

http://flixel.org/features.html

Scroll down to “pathfinding” and check out the demo. You can even redraw the maze and the sprite will find a path to the goal, if one exists. If you download Flixel, you can even peek through the code and see how it pulls it off.

It’s not so much that “it’s insane that they programmed such an incredible pathfinding algorithm” as “it’s insane that they programmed it for this one specific thing.” But then, when you have a labor of love like the Mother franchise, no amount of polish is too much. :3

tapioca said on Jul. 13, 2011

there’s actually a couple really simple algorithms that do that with varying efficiencies. given the huge pizza-guy-lag, i wouldn’t be surprised if they just used one of the easier to program but less efficient ones.

Mato said on Jul. 13, 2011

As a computer science guy, I realize pathfinding isn’t actually a huge deal – my first instinct would be to use a simple recursive function dealy, dunno how much stack space the SNES would offer though. The programmers say it was really tough to implement though, for whatever reason. I haven’t looked at the disassembled code, so I wonder what solution they went with.

DJMankiwitz said on Jul. 14, 2011

Neat. Compare that to the Post Man in Twilight Princess. On the flip side, that guy can find you anywhere, ANYWHERE! (Except when he falls off a cliff.)

Iizak said on Jul. 14, 2011

Cool :)

Christie said on Jul. 14, 2011

That’s pretty interesting. I especially like the message they show when he can’t get to you XD

alezicarus said on Jul. 14, 2011

I have to make this quick. My space ant overlord calls for me but….Wow. That’s paying attention to detail.

Hukky said on Jul. 14, 2011

You forgot to mention that the delivery guy always just runs straight to the left or right when he leaves. :p

RandomGuardian said on Jul. 14, 2011

It’s not that small a detail. I always carry a For Sale Sign when I can’t go to a store. It amazing how the game can guide a sprite through places like peaceful rest valley or the gold mine. Also getting a “I can’t find you” message is easy with the for sale sign. How can you get that message with the escargo express guy though?

Matteomax said on Jul. 14, 2011

Why is he laughing like crazy?

Mato said on Jul. 14, 2011

He’s supposed to be out of breath, the translation makes it seem a little weird though.

Someone Else said on Jul. 14, 2011

@RandomGuardian

If you call for Escargo Express and then immediately go to the Lost Underworld, you can get the message. I don’t think anyone can find you down there.

MrSaturn03 said on Jul. 14, 2011

For something so easy it seems in the game, it looks VERY complicated. Another good insight Mato, thanks!

DJMankiwitz said on Jul. 14, 2011

I always read it as “awkward laughter” he’s using to try and smooth out his incompetence, but it makes more sense as heavy breathing.

tapioca said on Jul. 14, 2011

lol i got super curious about the stack space too when i was writing that post. >_< i wonder if anyone has specs on things like that.

LucasTizma said on Jul. 14, 2011

The impressiveness comes from the limited hardware resources. I regularly architect entire software systems, but I never think about the low-level resource constraints because, well, I don’t have to. Modern systems, even mobile phones, have plenty of resources for all but the most intensive tasks.

Something like a NES or an SNES must have been a b**ch to program for! Blech. I hate low-level hacking, which is why I don’t think I could ever stomach hacking a ROM to translate it. :P Thankfully there’s Mato!

I’ll stick with the high-level system architecture and OOD, thank you very much! :)

LucasTizma said on Jul. 14, 2011

Looks like they rushed the translation for the pathfinding dead end text (probably because nobody would likely ever encounter it). All sorts of spacing and punctuation errors. Boo… Drives me crazy.

perplexingArticulator said on Jul. 15, 2011

Why am I now tempted to learn to hack EarthBound and proceed to subject the poor delivery man to a series of increasingly complicated traffic-cone maze tests?

DJMankiwitz said on Jul. 15, 2011

Will a cube or portal gun be involved in this tests? For science?

RandomGuardian said on Jul. 15, 2011

I dont know, but why are you still talking? There is science to be done!

Lango said on Jul. 15, 2011

@MilesOfSmash they don’t program for any specific path, including this one. They have an algorithm that looks at open spaces and calculates the shortest distance to get there (pathfinding) and when it can’t find a valid path is when the delivery man says he can’t get there, there is no area-specific programming going on.

Jorpho said on Jul. 15, 2011

I remember using the For Sale sign in a few awkward spaces whereby the customer would simply vanish into thin air once he was done talking. But I guess the exhaustive testing had to stop somewhere.

PlooKon09 said on Jul. 15, 2011

These days if programmers were this dedicated we could have AI that which weapons when out of ammo and retreat when low on health and even set up traps.

AwkwardAfro said on Jul. 15, 2011

I wish my delivery service had that kind of dedication.

Eric Spain said on Jul. 19, 2011

I’ve written many pathfinding algorithms, and on modern hardware they aren’t hard.

What makes it impressive is that it was on the SNES in assembly which had not much space. They couldn’t throw around megabytes of story or billions of clock cycles.

The exact algorithm is called A*(a star). It can be modified to fit whatever is needed. A similar one is Dijkstra’s Algorithm.

tapioca said on Jul. 19, 2011

@eric they’re only looking for any free screen edge. a* probably wouldn’t be necessary. it’d be cool to disassemble and see what they used though.


 
 

Recent Comments

  • Chewy: Also the store link has a redirect URL of www.hobonichiplanner.com so you can just go there to access the store!
  • Chewy: Covers can sell out pretty quickly, so I’d recommend checking out the store as soon as it opens at 7 PM PST on August 31st for those...
  • BoaTransistor: Mr. Itoi retweeted something about this earlier today, with a source link: http://www.inside-games.jp/art icle/2014/08/21/79668.html...
  • Chivi-chivik: I must say as well that I really like both original and GBA versions of the music. The problem is MOTHER 2: I STILL don’t know...
  • Chivi-chivik: @SpitefulCrow Who died and made you the one to decide who is and who isn’t a real fan? The point is to play all the games, we...
Subscribe to Comments Feed!

Archives

Search

Master Belch and Mr. Saturn plushes!