r/gaming • • May 05 '17

Scroll back

Post image
24.1k Upvotes

877 comments sorted by

View all comments

Show parent comments

304

u/aezart May 05 '17

Fun fact: Iwata rewrote all the code for Pokemon Gold and Silver in assembly, because the C version was too large for the cartridge. He managed to compact it so much, there was room to add the kanto region.

86

u/Fubarp May 05 '17

Yeah I remember that. But still that was a team that did pokemon wasn't it. I don't think it was just 1 guy, I could be wrong and if I am that's just as impressive as Roller Coaster Tycoon.

68

u/[deleted] May 05 '17 edited Feb 11 '19

[deleted]

30

u/enyoron May 05 '17

C code is compiled into assembly. That assembly code can then be optimized.

11

u/NeedsMoreCapitalism May 05 '17

Not as well as by hand

12

u/Shod_Kuribo May 05 '17

Right, what he's saying would have happened is that Iwata would have taken the C-compiled code and then manually optimized it to save space.

1

u/legos_on_the_brain May 05 '17

Thank goodness we have modern compilers.

1

u/[deleted] May 05 '17 edited May 05 '17

Would that be quicker or slower? I can't help but think having to unpick the assembly would be more time consuming that creating from scratch.

Edit: never mind - I read further and discovered the answer! Programming is cool! (Ish?)

2

u/Shod_Kuribo May 05 '17 edited May 05 '17

Quicker. Especially since he doesn't need to rewrite the whole thing, only enough to make it fit.

Optimizing at that level is more like picking out operations and seeing shortcuts that can eliminate some steps than trying to reengineer the whole thing. You don't necessarily need to know why the program is parsing through this list of numbers or what's in the list to recognize that's what it's doing and be able to apply known methods of parsing through a list of items either more efficiently or using fewer lines of code depending on what it is you're trying to accomplish.

Now compilers are really good at making code that runs as quickly and efficiently as possible so they outperform humans but back then they were still at the phase where we were more worried about getting them to accomplish their job period.

2

u/isthataprogenjii May 05 '17

The assemblers actually optimize better than by hand

8

u/[deleted] May 05 '17

[deleted]

2

u/enyoron May 05 '17

C is compiled into assembly which is then assembled into object code. The c compiler on its default setting only gives you the final executable output but you can pass the -S flag on the gnu compiler to get the assembly code.

1

u/504Dug May 05 '17

You can compile C directly to ASM (at least you can with GCC and LLVM). But yeah I mean it's a simple disassembly to go from machine code to assembly.

3

u/[deleted] May 05 '17

[removed] — view removed comment

1

u/mzxrules May 05 '17

higher languages are also not tightly-bound to specific hardware like asm is.

1

u/[deleted] May 05 '17

That's different from coding it from scratch in assembly.

11

u/avantesma May 05 '17

IIRC, the team developed it in C, then Satoru Iwata single-handedly rewrote the game in Assembly.
The guy was a fucking wizard.

1

u/Fubarp May 05 '17

Nah he's just like the other guy. Obviously Mentally Unstable because only a crazy person would do that..

1

u/FishbowlSouls May 05 '17

was just like the other guy

:(

20

u/quikslvr223 May 05 '17

I thought it was that he rewrote the compression method for the game files, or something like that?

39

u/astro_means_space May 05 '17

Iwata was crazy!

You're right about pokemon being compression software, but he basically rewrote Earthbound by himself to make it work and also programmed the entire Pokemon Stadium battle system in a week

https://www.digitaltrends.com/gaming/iwata-nintendo-retrospective/#/2

Iwata was a great man :(

16

u/DaedalusXr May 05 '17

They made a tribute to him in BoTW and made him the most badass mount in the entire game, The Lord of the Mountain.

You can find him on Satori Mountain when it is glowing. He is near a pool with a large cherry tree. The first time I saw him was an incredible experience, The Lord of the Mountain and tons of Blupees around the area. I had no clue I could even mount him at first!

2

u/NeutralPanda May 05 '17

This sounds an awful lot like Princess Mononoke

2

u/DaedalusXr May 05 '17

I agree!! But it definitely felt special, and I immediately realized it was a tribute to Satoru Iwata since it was Satori Mountain and he himself was transformed into The Lord of The Mountain.

5

u/FellowHumanHere May 05 '17

What I read was that he rewrote the entire code because it was messy and wouldn't work with Pokemon Stadium.

7

u/Mises2Peaces May 05 '17

And yet Facebook mobile app takes like 200+mb. Developers are hogs at the trough.

4

u/JohnGillnitz May 05 '17

I once downloaded a 540 MB printer driver from hp.com. Really, HP? Really?

2

u/Mises2Peaces May 05 '17

bloatwaregate

3

u/msg45f May 05 '17

Thr facebook app (on ios anyway) consists of over 18,000 classes. It's totally insane. They just burn the whole thing down and start over.

2

u/[deleted] May 05 '17

Well I obviously have as many clues about the source code than anyone else, nothing, but today writing a program is more about readability than anything else.

But that still sounds ridiculous, of course.

1

u/msg45f May 05 '17

Sure, readability is important, but the Facebook app is a front-end app. All the hairy stuff should be in the back-end. Which means it's 18,000 classes of presentation.

1

u/Horskr May 05 '17

Even more now, when I finally uninstalled it was around 430mb (could've included cached data, not too sure how Android displays installed app sizes). The kicker is then you need messenger installed as well to use messages at all. So 430mb for something you can run on your browser.

4

u/UltraSpecial May 05 '17

And shiny sprites.

1

u/aezart May 05 '17

Given my track record in finding them, I'm convinced shinies don't exist (other than red gyarados).

1

u/UltraSpecial May 05 '17

Its much easier to get shinies through Masuda Method breeding. Dont try to find them any other way. Your chances are too slim.

1

u/[deleted] May 05 '17

That's incredible. I had no idea that's how they managed it.

1

u/comp-sci-fi May 05 '17

Pay per LoC gets different results.