r/ProgrammerHumor • • Oct 01 '22

Meme Rust? But Todd Howard solved memory management back in 2002

Post image
61.9k Upvotes

1.0k comments sorted by

4.1k

u/reibitto Oct 01 '22 edited Oct 01 '22

This information came out on an episode of the Xbox Podcast in 2020. It's somewhat old news at this point but it's one of my favorite game dev stories and a lot more people need to know about it in my opinion.

For what it's worth, MVG has done a video in the past investigating the game while running and confirming what Todd Howard claimed is true. So it's not just some fun story he made up.

Edit: Looks like posting YouTube links are ok on this sub so here are direct links to the sources in case anybody is interested:

827

u/hedgecore77 Oct 01 '22

My fave game dev story was Wing Commander. EMM386 kept throwing an error upon exiting, didn't do anything bad as you were already exiting the game, but it looked bad. They had no time to fix it as the game was shipping, so the EMM386 exe was hacked to say "Thank you for playing Wing Commander!" instead of the error.

75

u/Isteppedinpoopy Oct 01 '22

I remember that. There were a few other games that would throw an EMM error on exit, iirc. Maybe XCom?

→ More replies (11)

840

u/[deleted] Oct 01 '22

"Game the system" quite literally.

232

u/imdefinitelywong Oct 01 '22

Is this the fabled Pro Gamer Move?

→ More replies (6)
→ More replies (1)

451

u/YouCanCallMeBazza Oct 01 '22

If these kinds of stories interest you I'd definitely recommend checking out Andy Gavin's blog posts about the making of the original Crash Bandicoot. The tricks they came up with to get the game running on the PS1 is hilariously impressive.

241

u/popcar2 Oct 01 '22

Early Naughty Dog were absolute masters of video game development. I still can't believe the Jak and Daxter trilogy was made in the span of three years. They're insanely high quality games that are REALLY different.

The second one is probably the biggest success story of completely steering a franchise in a different direction. The first Jak and Daxter was a cutesy 3D platformer, but Sony wanted to adapt to the market by making games more mature. So they made Jak and Daxter 2 an edgy sci-fi adventure with guns and killing people, but still kept the heart of the series intact.

And it worked! In one year they turned their franchise in a completely different direction, and then again took wild risks like making a huge chunk of the third one a mad max-style game with different vehicles in a huge desert. And that worked too, they're all fantastic, complex games in very different contexts made in record time.

I don't think a single gaming company today has the stones or the skill to do what they did. It's always a shame to see ND now as just another generic company that makes only one style of games.

→ More replies (21)

68

u/Sure-Tomorrow-487 Oct 01 '22

Ok this is legendary. I'm only on part 3 of 15 but wow it's so entertaining and technical and a story I've never heard.

→ More replies (1)

27

u/FuzzyLogic0 Oct 01 '22

Yeah that is fascinating stuff

→ More replies (9)

93

u/Nictel Oct 01 '22

I love programming

218

u/The_Crazy_Cat_Guy Oct 01 '22

My favourite game dev story is the ultra aggressive Gandhi from the civ games lol

53

u/[deleted] Oct 01 '22

Mine is a dev saying that he had run out of space to give his 8 bit game an outro so he made the final boss unbeatable. I think it was actually Earthworm Jim director David Perry but I can't find the story online anymore.

→ More replies (5)

48

u/[deleted] Oct 01 '22

My favorite is the one about the dead drunk cats in dwarf fortress

→ More replies (10)

331

u/ChrisBot8 Oct 01 '22

Unfortunately that’s actually an urban legend and not actually a true story (Sid Meier confirmed): https://en.m.wikipedia.org/wiki/Nuclear_Gandhi Gandhi actually used nukes more than other leaders simply cause India usually discovered them before other nations.

→ More replies (13)
→ More replies (1)

3

u/NerevarWunderbar Oct 01 '22

I remember that episode. It was really fun to watch. These guys have a nice chemistry together

→ More replies (8)

230

u/PhantomTissue Oct 01 '22

Oh my word PLEASE tell me this is true, that would be hilarious.

227

u/reibitto Oct 01 '22

Yeah, it's true. I mentioned the sources in my other comment but didn't link to them directly (because many popular subs silently delete comments with YouTube links in them... I guess because they get too much self-promotion spam?). Anyway let me give it a try here and see what happens:

40

u/PhantomTissue Oct 01 '22

This is amazing lol. Thanks for the links, def gonna check this out.

→ More replies (1)
→ More replies (2)

18

u/-_Gemini_- Oct 01 '22

Of course it's true. This was a feature of the Xbox advertised to developers. Morrowind wasn't even the only game to do it; I'm pretty sure Deus Ex: Invisible War also regularly rebooted the system.

→ More replies (3)

4

u/[deleted] Oct 01 '22

Jade Empire used the same trick.

→ More replies (1)

48

u/zesterer Oct 01 '22

Rust doesn't "solve memory management". It has a safe (and surprisingly expressive!) subset of the language that is memory safe. Leaking or just not freeing things when you're not using them is permitted.

5

u/reibitto Oct 01 '22

Yeah, that's fair. You're right that's it's not accurate to say Rust solves all memory issues. It's kind of like how it's possible (and not even hard) to have memory leaks in garbage collected languages. If you're holding on to a reference to a game entity in a data structure even after it's "dead", GC can't help you there (I mean, technically there are weak references but those have very limited application).

→ More replies (3)

9

u/[deleted] Oct 01 '22 edited Oct 01 '22

It's as close to solved as ive ever seen a language get

10

u/zesterer Oct 01 '22

No, it's really not. I say this as someone who loves working with Rust, using it for both my day job and for innumerable hobby projects. It's a brilliant language, but the problems it solves are very specific, and I think those things being generalised and oversold is actually harmful to the reputation of the language.

Rust guarantees that safe Rust will not produce undefined behaviour, and memory unsafety (data races, observing uninitialised/out of bounds/use after free, etc.) is part of that guarantee. Its promises do not cover leak detection or prevention (there are actually safe ways to deliberately leak memory, which are (occasionally) useful!), nor does the language do any sort of automatic garbage collection beyond "call the destructors or values when control flow leaves the scope they belong to" (which, to be clear, is sufficient in most practical cases).

→ More replies (15)

1.2k

u/TheMcDucky Oct 01 '22

This is actually an intended (included in the SDK) feature of the Xbox that several games used.
Basically it cleared the memory but kept the framebuffer (making it potentially seamless to the player) and some additional data

378

u/Logofascinated Oct 01 '22

Thanks, I was wondering how the continuity was achieved if it was a full reboot. Preserving some data could achieve this.

70

u/SabashChandraBose Oct 01 '22

How does the driver display a screen while the system is being rebooted?

207

u/MatthewKashuken Oct 01 '22

It’s not a full reboot. It stores (basically) a “we’re here, and this is what is on screen” and the required memory for the system to function, purges the rest, then restarts the game process with the information for where it should be starting at telling it where to resume. Think of it like setting a book down and underlining the last word you read, then ripping out every page before that except for the cover. All the information needed to resume where you were, and what book you’re reading is there.

→ More replies (2)
→ More replies (1)

3.2k

u/FHeTraT Oct 01 '22

I've seen the game that has memory indicator. When it changes to red, you should save and restart the game.

4.1k

u/grat_is_not_nice Oct 01 '22

Breath of the Wild solved that problem with a Blood Moon - you wander through regions and kill monsters that spawn on location triggers in the region and collecting resources/items. But the game cannot maintain the status of all the items/monsters in all the game regions. So when memory for that information gets close to being full (depending on the number of map regions and items in those regions), the Blood Moon mechanic gets triggered and all the regions get reset to default, so all the monsters and items reappear next time you enter the region. It's a pretty cool solution to memory management and a frustrating game mechanic.

2.3k

u/[deleted] Oct 01 '22

The blood moon also triggers when the game detects something wrong is happening, like way too many enemies in a specific region, or a specific enemy in a region it shouldn't be.

→ More replies (132)

69

u/froderick Oct 01 '22

I didn't find it to be a frustrating game mechanic, if anything it helps counter the item durability issue by allowing you to go back and loot known good weapons again.

→ More replies (9)

117

u/GeneralAce135 Oct 01 '22

A frustrating game mechanic? BotW would get pretty boring pretty fast if those monsters never respawned and you spent the back half of the game wandering through an empty landscape.

→ More replies (16)

65

u/CatpainCalamari Oct 01 '22

It may be frustrating sometimes, but I would think it way more frustrating (especially during late-game) to have whole regions void of enemies.
This would make e.g. lynel farming impossible, since there are only a certain number of lynels where you can get high-level weapons that will break after a time

→ More replies (7)

104

u/FelisCantabrigiensis Oct 01 '22

Other games do that. Halo: Combat Evolved on the first XBox doesn't keep track of a lot of random stuff like dropped weapons, etc, even in places where there is no obvious in-game mechanism for them go away. It just stops tracking them and they disappear. There are no NPCs going around that could pick them up in some levels, but they still disappear. That's very frustrating if you drop a weapon, go forward, find you need the other weapon (rocket launchers in particular), go back, and find the weapon you left has just disappeared. Sometimes this cleanup can be pretty rapid, only a couple of scenes back.

You end up either having to go back to re-visit a previous scene to keep your weapon in play, or carrying things back and forth a lot.

That makes the "reset to default" be the default of "nothing here for you", and that's very frustrating at some points in the game.

→ More replies (30)
→ More replies (46)
→ More replies (4)

9.7k

u/audriuska12 Oct 01 '22

My favorite memory management story: some team couldn't find a way to fix a memory leak... in a missile guidance system. So they just decided to load the missile up with more RAM than the leak could fill before, quote, "the most extreme form of garbage collection."

4.6k

u/kinokomushroom Oct 01 '22

Missile guidance system programmers: "We made it 100% sure so that the missile won't randomly explode as soon as you hit the launch button or that it will definitely not fly back to our own base killing us all"

Also missile guidance system programmers: "lol don't worry about the memory leak :)"

3.2k

u/EuroPolice Oct 01 '22

It's amazing because I worked in a project were if you spent 2 minutes or more in a screen that only displayed a couple options you would get an error code and need to log again. The solution? Make the error code read "Logging out for inactivity".

→ More replies (59)

92

u/SteeleDynamics Oct 01 '22

By the time the missile guidance system runs out of memory, the middle is far enough down range that it's no longer our problem :)

→ More replies (3)

30

u/nonicethingsforus Oct 01 '22

We made it 100% sure so that the missile won't randomly explode as soon as you hit the launch button or that it will definitely not fly back to our own base killing us all.

In actual guidance systems, they often can't (honestly) assure even that.

This is my most used relevant XKCD for a reason.

→ More replies (5)

111

u/kautau Oct 01 '22

Also missile guidance system programmers: “we’re Raytheon, or Boeing, or general dynamics, or (insert weapons company) and now the us gov is on the hook with our contract. Give us millions more or we’ll cancel the project and blame you”

→ More replies (13)
→ More replies (23)

715

u/R2CX Oct 01 '22

“It can’t be stopped now general. We’ve put uhm… a locking mechanism that prevents it from taking any other commands.”

125

u/manesag Oct 01 '22

“Ahh it’s done it, it’s got one of them, soon he will have all of them”

66

u/coloredgreyscale Oct 01 '22

Before that:

General: "shoot a missile at their location!"

2 minutes later: "lol, jk"

8

u/slydjinn Oct 01 '22

Just as everyone anticipated, nuclear winter will be averted due to a memory leak...

→ More replies (1)

103

u/SoftBellyButton Oct 01 '22

The missile knows where it is, till the ram runs full, then it doesn't know where it is.

36

u/PhoenixxFeathers Oct 01 '22

But a missile only knows where it is because it knows where it isn't

→ More replies (1)
→ More replies (2)

103

u/KazakiLion Oct 01 '22

The less awesome version of this was the Patriot missile timekeeping code making it’s intercepting calculations less accurate the longer it had been turned on. https://www-users.cse.umn.edu/~arnold/disasters/patriot.html Folks started to figure out you could sneak missiles past batteries that bad been set up for a while.

18

u/[deleted] Oct 01 '22

This is the basic scenario you get on any fixed-point/non-fpu system.

Also they didn't reuse the timekeeping code aparently.

298

u/Snazzy21 Oct 01 '22

Fill RAM then bam

277

u/audriuska12 Oct 01 '22

Half-fill, technically. They estimated how much will leak over the missile's maximum flight time, then added double that.

→ More replies (7)
→ More replies (3)

129

u/yeetforceone Oct 01 '22

lol deploy more RAM

249

u/mee8Ti6Eit Oct 01 '22

Honestly, for a missile they're probably better off not doing any GC/memory management at all. The code will be simpler and less likely to have bugs, and the extra RAM would be like 0.001% of the missile cost.

224

u/ZeAthenA714 Oct 01 '22

The problem with loading more RAM to hide a memory leak is, what happens when that code get reused in another missile later down the road? Is the "fix" of adding more RAM correctly documented? Will the team that inherit the code actually pay attention to that documentation? What if they are well aware of the problem, they make sure they have the appropriate amount of RAM, but some of the alterations they've done in the code actually makes the leak worse?

Throwing more RAM at it is a bad idea, especially for a system as critical as a missile. This just sounds like the developers were told "just fix it right now we have a presentation in two hours and we need it to work so that we can sell billions of them" and never had the chance to come back and properly fix the code.

→ More replies (43)
→ More replies (21)

40

u/lopjoegel Oct 01 '22

When spare cycles for memory management are not possible.

11

u/Luiaards Oct 01 '22

Why use machines for missile guidance when there's Project Pidgeon

→ More replies (1)

10

u/redmarketsolutions Oct 01 '22

This makes me a lot more confident in some revolutionary's ability to fight modern military hardware with scraps.

18

u/[deleted] Oct 01 '22

In in those system i guess more ram would be a whopping 512kb

16

u/Theemuts Oct 01 '22

Ah yes, the famous DK64 missile.

5

u/[deleted] Oct 01 '22

I would not be able to write code for missile systems and shit. It would make me feel too dirty. Someone approached me once about trajectory systems and I was just like "nope, not gonna help you murder people my guy"

4

u/jld2k6 Oct 01 '22 edited Oct 01 '22

They did the same thing with the N64 expansion pack, they had to bundle it with Donky Kong 64 to make it work with a memory leak they detected after already making cartridges because their developer 64's had more memory so they didn't notice until it was played on a regular n64. Since they didn't fix it, even with an expansion pack the game will eventually crash if you play it long enough

3

u/gnuban Oct 01 '22

This approach is frequently employed in low-latency financial applications written in GCed languages. Crazy, yes, but it's being done.

3

u/rohmish Oct 01 '22

Year 2142: a missile system long thought to be decomissioned had it's 4TB ram fill up and due to a memory management related error combusted killing entire civilization

→ More replies (27)

1.6k

u/jeffscience Oct 01 '22

According to the guy at IBM who designed it, a critical PowerPC chip in the Space Shuttle would only boot 2/3 of the time. It wasn’t a problem, because they’d just reboot it until it worked, as part of the launch sequence.

(Or something like that. It was a dinner story and I wasn’t taking notes.)

193

u/RetardedChimpanzee Oct 01 '22

The PowerPC chip is still the go-to for many satellite processors.

72

u/Shrubberer Oct 01 '22

Hitachi SuperH is also pretty common. That's what my company uses.

→ More replies (9)
→ More replies (7)

216

u/omniclast Oct 01 '22

Just like the motor on my 30 year old speedboat

→ More replies (5)

47

u/inaccurateTempedesc Oct 01 '22

Sounds like the Ubuntu 12.10 PC I had when I was a kid. It would kernel panic 4/5 times, so I'd try to boot it up 5 times.

20

u/ArchWaverley Oct 01 '22

I had a PC years ago that wouldn't boot until I opened the CD tray. I can only assume the BIOS was trying to boot from it even though I triple checked it was at the bottom of the list, and the drive itself was pretty broken. So I just got used to hitting the power button, counting to 5 and opening the CD tray.

→ More replies (3)

840

u/BBQGiraffe_ Oct 01 '22

The solution to memory leaks? Just power off the memory lol

→ More replies (3)

684

u/Dragon_yum Oct 01 '22

Game programmers on old system where some of the most clever and sly people around

63

u/Thisstuffisbetter Oct 01 '22

My favorite is the fix for fallout 3 problem with trains. They couldn't figure how to make them move. So they made a train style hat/head on an npc, enlarged the head/hat, then just had it run really fast. https://www.pcgamer.com/heres-whats-happening-inside-fallout-3s-metro-train/

18

u/IsNotAnOstrich Oct 01 '22

That reminds me of how the statue of the player in Oblivion is just an NPC frozen in place

→ More replies (5)

57

u/_drumstic_ Oct 01 '22

Like how a screenshot of Super Mario Bros. is bigger than the game itself.

22

u/dlouwe Oct 01 '22

When developing Myst, Cyan was pushing the limits for things like image fidelity and dynamically loading big audio/video assets based on player actions, at a time when CD ROMs were still very new and consumer grade optical drives were still very slow.

In order to keep play feeling smooth without big delays and load times, they had to manage how the data would be positioned when it was printed so that related assets would be physically close to each other on the disc, which reduced the time the drive head would need to spend seeking the data.

6

u/AlphaIOmega Oct 01 '22

Fun Pokemon fact:

There wasnt enough memory to store new sprite/sprite info for shiny pokemon, so they shifted the hex value for a shiny pokemon to the next bit, which was the next pokemon. So Gen III pokemon are just the same color values as the next Pokemon in the list. Shiny Venusaur(#003) had the color values for #004(Charmander). This doesnt apply to all pokemon, just ones where the next colorway would work properly.

10

u/TheGoodOldCoder Oct 01 '22

Nowadays, "clever" is a bad word to programmers.

20

u/[deleted] Oct 01 '22

Clever used to mean optimizing in novel ways to fit everything into limited memory. Now it means sacrificing efficiency and readability in favor of one-line solutions because they look cool.

→ More replies (1)
→ More replies (1)

5

u/[deleted] Oct 01 '22

My favorite stories are from Jordan Mechner's journals from when he created Prince of Persia. The final boss being the protagonist's shadow in order to reuse and save resources was pure genius.

4

u/DYGTD Oct 01 '22

I can't imagine what kind of black magic Bethesda had to summon in order to get their old Terminator games to work. Those games were jank, but their tech was wildly ahead of the times.

→ More replies (2)
→ More replies (9)

481

u/Abyss_of_Dreams Oct 01 '22

I remember hearing the story about Wing Commander on old ass DOS. There was always an error when the game closed, but the devs couldn't figure out what was causing the error or how to fix it. They were running out of time before launch, so a senior developer had the bright idea to change the error message to "Thank you for playing Wing Commander!"

212

u/enkafan Oct 01 '22

To clarify for the younger crowd, they didn't just open the code up and edit the message. It was win emm386, external to their game, so they had to hex edit it out

115

u/tubameister Oct 01 '22

I guess I'm not young anymore.. When I was a kid, I tried to hex edit the registry on my dad's windows PC to make Start say Pete. Because Pete has one less letter than Start, it shifted the registry, and the computer wouldn't fully boot. I was able to ctrl+alt+del back into the registry, undo what I had done, and fully reboot the computer.

→ More replies (2)

7

u/AmArschdieRaeuber Oct 01 '22

Wouldn't that cause other programs to display the wrong message when an error occurs?

→ More replies (1)

627

u/ilreh Oct 01 '22

Obviously a senior dev

141

u/deelyy Oct 01 '22

Should I add: expirienced senior dev.

21

u/[deleted] Oct 01 '22

Chess Enthusiast

→ More replies (2)
→ More replies (3)
→ More replies (1)

147

u/diputra Oct 01 '22

I only know him for his chess club. Now after this post, I can see him in different way...

76

u/ADHthaGreat Oct 01 '22

I only know him from that time he forced me to buy Skyrim again at gun point.

→ More replies (1)

49

u/your_mind_aches Oct 01 '22

Being in the chess club is one of the few things he has provably led about.

Most of the Todd Howard "lies" are either overpromising or taken out of context (like the infamous 16x the detail).

But the chess club thing was proven to be completely untrue, as his yearbooks listed all chess club members and he was never on there.

83

u/drfaustfaustus Oct 01 '22

To be fair, he might have just been in a chess club not attached to his school. There are a lot of those around where I live, and while it's mostly adults there are a surprising amount of kids.

→ More replies (3)

15

u/PrintShinji Oct 01 '22 edited Oct 01 '22

But the chess club thing was proven to be completely untrue, as his yearbooks listed all chess club members and he was never on there.

Please link a source, this is one of my favorite "facts" about this man after all

edit: it was in junior high! https://i.imgur.com/roLpkzW.png

→ More replies (4)
→ More replies (4)

94

u/mewoneplusone1 Oct 01 '22

When you first boot up Morrowind on Xbox that's the longest load, because the game is copying the entire map to the internal HDD Cache. Once you are actually in game, the game is actually mostly playing off the HDD, the only thing it loads from disc are the Music tracks.

→ More replies (7)

90

u/cwal76 Oct 01 '22

No wonder. Morrowind had the absolute worst load time on console ever. I never used the silt travel because it took just as long to load as it did to walk on foot.

41

u/dood45ctte Oct 01 '22

And that’s REALLY saying something because walking anywhere in that game is miserable

Green bar go down

Cliff runner stun lock

→ More replies (2)

157

u/hotstickywaffle Oct 01 '22

I know this isn't the same thing, but it reminded me of a video I just saw. It was about how Naughty Dog was always focused on not having loading screens and how they had tricks like managing how stuff loads off screen. They apparently had a trick in Jak and Daxter where if the player was about to get to a part of the map that hadn't loaded yet, it would literally have your character trip so it had time to finish loading before you got there

79

u/Jesse-Ray Oct 01 '22

Similar to games where you have to go through some long animation of crawling through a gap to reach a new area.

7

u/Aneesh_Bhat Oct 01 '22

Similar case with God of War 2018

→ More replies (2)
→ More replies (6)

21

u/Demonchaser27 Oct 01 '22

Yeah, I'm assuming you've watched their developer story on Crash Bandicoot. The original programmer goes into pretty explicit detail about how they had to manage/load assets on the fly during levels and use "chunks", which is common nowadays, especially in open world games, but was obviously very novel back then.

163

u/DonglingDang Oct 01 '22

It just works

43

u/0xIlmari Oct 01 '22

System reboot is the ultimate garbage collector.

27

u/Narrative_Causality Oct 01 '22

No one is going to mention how Donkey Kong 64 had a game breaking memory leak? The only way they could find to solve it was with the N64's memory expansion pak. That's why all copies of DK64 came with one.

3

u/aridank97 Oct 01 '22

That has been “debunked” from my limited research on google. Who knows tho it could be true

→ More replies (2)
→ More replies (1)

24

u/gagagagaNope Oct 01 '22

I used to code games on the Amiga when I was at school. Did a couple of Atari ST ports where you were short about 10% on CPU speed.

You could do things like using the gaming hardware (Blitter chip) to speed things up (eg screen wipes, scrolling) that would grab you some cycles back, but one of the things I did was kill all of the interrupts to the OS, basically put the thing into stasis. Not strictly legal but the game would become the entire OS at that point, and you'd get a few more cycles back.

You could play the same trick during dev/test if you had enough RAM, and as long as you restored things, you could exit the game and the OS would pick up as if nothing happened with your IDE still open and ready for bug fixes.

21

u/medontplaylol Oct 01 '22

I'm probably butchering the truth here, but this this reminds me of that recent post by AsahiLina who has made a native gpu driver for the M1 for Linux, but it currently has to flush the memory all the time as a hack.

19

u/java_brogrammer Oct 01 '22

Oh, so this is why I had random 5 minute load screens in Morrowind back in the day...

19

u/ImmaZoni Oct 01 '22

In fallout 3 there was no physics for vehicles so to do the train scene at the end of the story, they just made a player with a train as a head and your player in the trains head as it's walking.

Guess it was easier than adding train physics for one cinematic scene

9

u/argv_minus_one Oct 01 '22

Also, there are no normal ladders in the game. They quite simply couldn't make it work. The only ladders merely look like ladders but are implemented as level-exit doors.

→ More replies (1)

27

u/Ozzymand Oct 01 '22

Seeing people talk about memory management issues is so alien to me. I've started learning c++ this month and I've yet to encounter this

43

u/-Redstoneboi- Oct 01 '22

that's cause you learned c++ properly in the modern age

i heard anything before c++11 was a different language

16

u/Ozzymand Oct 01 '22

yeah that tends to pop up a lot. Apparently C++11 solved and changed many things

→ More replies (3)

7

u/toaster2 Oct 01 '22

I think c++ used to be way worse. No smart pointers etc

→ More replies (6)

182

u/4XLlentMeSomeMoney Oct 01 '22

Similarly, what Naughty Dog did with Crash Bandicoot on PS1 is genius and they didn't have to risk the machine's health to it.

80

u/djxfade Oct 01 '22

What did they di?

234

u/4XLlentMeSomeMoney Oct 01 '22

There's a video by one of the former main heads at Naughty Dog on YouTube. It's a long story. In short, they hacked the machine's hardware and used forbidden memory, which should be free for everyone, instead of compromising their vision for the game.

→ More replies (19)
→ More replies (1)

17

u/Lange- Oct 01 '22

Risk the machine health? Are you referring to the reboot?

→ More replies (1)

7

u/notliam Oct 01 '22

A lecturer I had worked on some classic ps1 games, can't remember which game he was talking about maybe Dune, he said they had to use the sound memory for game memory because there wasn't enough. Not a substantiated claim and I have no idea how the ps1 hardware worked but sounds possible enough.

8

u/4XLlentMeSomeMoney Oct 01 '22

As far as I know, there wasn't anything different between the parts of memory used. It was basically one big memory block split into other parts. Therefore, this sounds possible, if there weren't many sound files playing in the game. At the very least, it sounds like a good idea.

→ More replies (4)
→ More replies (1)

10

u/Tsujita_daikokuya Oct 01 '22

Is this why Skyrim would just get slower and slower the deeper I got into the game? Like eventually I just couldn’t play anymore because the game took too long loading.

9

u/argv_minus_one Oct 01 '22

The game has to save the state of every cell that you've visited. The more cells you visit, the more there is to save. Cells do reset after a while, but you visit new cells much faster than old ones reset.

Also, you tend to gather and keep a lot of objects, like items in chests in your house, as the game goes on. All of those have to be saved too.

There's probably more to it as well, but that's off the top of my head.

→ More replies (8)

8

u/VicisSubsisto Oct 01 '22

That explains why the game would crash when I spent too long wandering around outdoors (no loading screens there).

8

u/Halebolt Oct 01 '22

My favorite solution to a memory leak was from the DK64 developers. They could not find the cause of it so Rare came up with the solution to add more RAM. Thus every game came with the n64 expansion pack. I’m sure it was a costly solution by both Nintendo and Rare. Also since it doesn’t solve the issue, it just delays it so instead of the game crashing after 4-5 hours, it’s more like 8-10. They quite literally downloaded more RAM from Nintendo

3

u/[deleted] Oct 01 '22

Hardware has always been sold at a loss. Every console Nintendo has produced has been sold at a loss because the real money is in the game sales. 90% or more of the profits Nintendo sees is from game and licensing revenue. So if adding memory modules meant more copies sold, Nintendo would gladly do it.

→ More replies (1)

7

u/DarthLysergis Oct 01 '22

That looks a LOT like Ben from Viva La Dirt League.

7

u/Warbek_ Oct 01 '22

Oh shit is that why those games always autosave before the loading screen and not after?

6

u/TheHydraulicBat_ Oct 01 '22

This or to have a save if the game doesn't come back from loading.

→ More replies (1)

13

u/RichonAR Oct 01 '22

Reboot can be faster and more reliable than memory cleanup. In xbox we had an API to load a reboot image so games could reboot between levels. On cloud clusters when we detect an error we often reboot the device rather than attempt to root cause and recover.
In some situations, reboot is very efficient.

3

u/msluther Oct 01 '22

Yep. Especially now with web services bits just so easy. I could spend weeks tracking down a slow memory leak or like we could rotate vms/containers/full bare metal reboots every now and then with no observable effect for the user.

→ More replies (1)
→ More replies (2)

6

u/[deleted] Oct 01 '22

When I play Animal Crossing on my Switch, I can’t use the dressing room at the tailor’s while wearing a wand outfit.

I wonder why.

6

u/RedemptionXXIV Oct 01 '22

I was genuinely blown away by this. Such a unique way to solve the problem.

6

u/PoloTew Oct 01 '22

Guys, don't question. It just works.

6

u/CHAOSHACKER Oct 01 '22

That was actually a common technique during those days.

6

u/[deleted] Oct 01 '22

"It just works"

6

u/BarAgent Oct 01 '22

Erlang is designed to crash.

They figure you won’t be able to cleanly deal with all errors, so fuck it, reboot the process. There’s a ton of ’em, it’ll be fine.

6

u/SpinCharm Oct 01 '22

Lol I used this trick back in 1981 when 4K of memory wasn’t enough to runs full program and do a sort. So I’d do the sort, hide the results in the top of memory (reboots didn’t clear memory back then), run the program again, and look in upper memory to see if the result was there and load it in to use.

11

u/BNeutral Oct 01 '22

"So I've added this hack so QA can test the game while we fix-"
"Ship it"

10

u/Shamanixxx Oct 01 '22

It’s a wonder Chrome devs haven’t done this

17

u/rudnam Oct 01 '22

gigachad

5

u/Pepineros Oct 01 '22

Todd Howard has not given a single fuck in his entire life.

5

u/WhiteRugRat Oct 01 '22

As a non programmer who doesn’t really know anything about code, can someone explain this to me?

11

u/deadsy Oct 01 '22

Buggy code loses track of memory that it has allocated. That's a memory leak. We could own up to our problem and crash with an error code saying "out of memory" or we could save our game state somewhere, reset the whole system and get a clean state. Will the user notice? Nope - because the xbox lets us put up an arbitrary screen while we reboot. It'll just look like we are loading. In fact- when we go into the load screen, let's take a look at how much memory we have left, if it falls below a threshold we'll do the is reboot trick and get back our leaked memory. It's garbage collection with a sledge hammer.

5

u/[deleted] Oct 01 '22

deadsy explained it well. To add to that, sometimes there is just not enough development time to track down the leak and do proper QA and testing, so this sledgehammer method is used to get the game to market within the time constraints imposed.

→ More replies (1)

5

u/[deleted] Oct 01 '22

That's up there with the Banjo Tooie Stop n' Swap scheme. https://banjokazooie.fandom.com/wiki/Stop_%27n%27_Swop

5

u/AleksanderSteelhart Oct 01 '22

Holy shit. I never knew this was the reason for such long loads my Xbox copy of Morrowind.

Played SUPER conservative because of the death load screens.

When Oblivion came out I had a PC and it was night and day! Ah, childhood.

5

u/[deleted] Oct 01 '22

Interesting! Back in the day Morrowind was the only Xbox game I had that would sometimes just reboot the console in the middle of the game. I wonder if this “hack” of theirs could be related to the bug.

5

u/Unknownuser29075 Oct 01 '22

Just buy more memory from the skyrim dlc for only 6.99

13

u/kaiju505 Oct 01 '22

It just works

15

u/EverySister Oct 01 '22

So... Im a newbie. I've always heard about memory limitations and I thiiiink I have an idea of what is happening buuuuut... Whats happening? From a gamplay point of view. Too many objects are created and not disposed off? Can someone clear this up? I might have follow up questions.

42

u/FlySafeLoL Oct 01 '22
  1. Create the object.

  2. Cache the link forever but forget where.

  3. Be in a situation where it's faster to code another create of the new object and deliver the feature ASAP

  4. Be a support programmer, after the previous dev left the team, - don't figure out the previous solution and mususe it.

  5. No one has any clue how to fix it or how's it supposed to be used.

  6. Have no time to fix it, like, at all.

  7. Engineer a reboot trick or whatever the hell helps.

14

u/TellTaleTank Oct 01 '22

Short version is things are being created in memory and not being properly cleaned, so over time these leftover fill up the memory until you can't do anything with it.

→ More replies (1)

19

u/lces91468 Oct 01 '22

I didn't get into gaming until I was 25(roughly 5 years ago). Someone care to explain the context?

74

u/Puzzleheaded_Bend749 Oct 01 '22

Basically the game keeps eating more RAM from the xbox console And not freeing unused data if this kept happening the game will be come laggy and will crash because there is no more space in the ram and can't free unused data to make away for new data(NPC, weapons , objects ....etc) this happens cuz of many factors includes bad coding , engine the game were built in is terrible or new technology .

So instead of fixing it the usually painful way , they decided when the game detect high ram usage , the loading screen (entering house or anything else ) makes as cover and restart the console so the memory would be empty and they can fill it again without useless data , and that's why some loading screen takes longer than usual because it basically restarting the system .

36

u/lces91468 Oct 01 '22

Holy hell. That's amazing. I was thinking what does it mean to "reboot the xbox", I thought the context must be some sort of demonstration, that the team pulled off the reboot without the audiences noticing. This is unthinkable for a person only ever played games on PS4 and PC like me, now the words make sense. Thanks for the explaination.

→ More replies (11)

4

u/[deleted] Oct 01 '22

GET OUT OF MY XBOX TODD!!!!!! ITS JUST THE BLACK EDITION NOT THE CLOWN EDITION!!!!!

4

u/Unhelpful_Applause Oct 01 '22

The man’s technical genius equates to hiding the fact that to try to fix a problem you turn it off and on again.

4

u/Minimum-Ad-8056 Oct 01 '22

The og xbox was a beast of a machine for a console. First console that actually surprised me as a PC gamer at thar time

4

u/amwestover Oct 01 '22

I see he came from the PHP school of thought.

No memory? Just die!

4

u/Alarming_Crow_3868 Oct 02 '22

At LucasArts this was done on Gladius for PS/2. It just didn’t have the resources to manage the full game in RAM. It worked, though!

4

u/Apollossecret Oct 02 '22

Theres something about disguising game issues as mechanics thats so much more satisfying than patching out the issues

7

u/SL3D Oct 01 '22

It’s easy to judge Todd for doing something like this but remember, the original Xbox had 64 MB of RAM…

I would not be able to code with that limitation without going insane.

→ More replies (6)

11

u/Strange_Truth_9622 Oct 01 '22

Pffft. Just download more RAM.

8

u/Nonkel_Jef Oct 01 '22

He tried turning it off and on again.

3

u/StupiedSwede Oct 01 '22

Really MS has control over your hardware and can reboot it at will...

3

u/doowi1 Oct 01 '22

Reminds me of this story I heard of about a flight simulator for DOS(?). Whenever the game closed it would give an error message and they couldn't fix it. So, they edited the error message in the OS to say "Thank you for playing our game!" Or something similar.

3

u/WormHack Oct 01 '22

i'm not using rust anymore, i will just ask the user to reboot the computer

3

u/cpuman2000 Oct 01 '22

Reminds me of my first software dev job out of college. They had these services running on BEA Tuxedo that had terrible memory leaks. Their solution was to just have a CRON job that restarted the services every night. 😂

3

u/ArtyIF Oct 01 '22

deus ex invisible war just restarts itself in each loading screen due to a memory leak they couldn't fix in time, and it causes compatibility issues on modern systems

3

u/TriEdgeDTrace Oct 01 '22

Never knew, this is certainly an interesting work around. Old game development had some crazy work arounds.

3

u/[deleted] Oct 01 '22

TIL that the OG XBox had a stealth rebooting feature.

3

u/Kezyma Oct 02 '22

If I remember correctly, one of the early Deus Ex games had a memory leak and instead of trying to find and fix it, they just modified the game to close and relaunch on each loading screen

2

u/proto-shane Oct 01 '22

Ayo it's old jerma

2

u/Hurricane_32 Oct 01 '22

"Thank you for playing Wing Commander!"

2

u/-DonJuan Oct 01 '22

This is amazing. As an end user all I think about is the literal technical game play challenges and designs, environment, interactions ect. The art, the story. But of course there is an entirely different technical challenges being practically faced and solved on basic issues of memory, hardware, literally physical problems being solved in innovated ways

2

u/Redclitting Oct 01 '22

16 TIMES THE DETAILS!!

2

u/icywind90 Oct 01 '22

I have a feeling Windows devs do this during system update. How many reboots do you need to apply updates?

2

u/jfp1992 Oct 01 '22

Playwright has a memory leak issue, when you load a page it just adds to node and python.

Created an issue and instead of fixing it, they just said it was intended and closed the issue. Fml Microsoft.

FYI playwright is a newer better selenium fork of puppeteer

2

u/Additionalpyl0n Oct 01 '22

Cs students when first day

2

u/BoBoBearDev Oct 01 '22

The biggest magic of this is, it loads up exactly where you left off, no loss of progress, it is like beta version of Quick Resume. And they do this by not showing the dashboard. Still one of the most impressive magic I have ever seen.

→ More replies (1)

2

u/[deleted] Oct 01 '22

Crash Bandicoot for the PS1 deleted whole chunks of the standard Sony libraries to save memory.

→ More replies (1)

2

u/[deleted] Oct 01 '22

God …. That choice of wall decor is tacky asf

→ More replies (1)

2

u/anothercar Oct 01 '22

This man should be Tucker Carlson for Halloween, they look like they could be brothers

2

u/Script_Mak3r Oct 01 '22

I mean, it's bad that they needed to do that, but honestly it was a clever hack.

2

u/KeepRedditAnonymous Oct 01 '22

Ha I did this trick in a game I built one time in high school. Showed a loading screen and when you clicked on it the application re-started with the data to load at the same spot you left off.

2

u/Pro_at_being_noob Oct 01 '22

This is literally “did you try turning it off and on” at a software architecture level 🤣

2

u/Sir_Yucko Oct 01 '22

Or you could just unload and load things dynamically... I mean come on it's not that hard or anything...😉

2

u/ReplyHappy Oct 01 '22

Remind me of the game Risen, where no such tricks were used, so the game would take 40 minutes to load, on plusside 80 hours in you could go back to starting location and see the same sword you dropped in the same place, same position 80 hours ago.

→ More replies (2)

2

u/WhiteWhenWrong Oct 01 '22

It just works

2

u/Piggstein Oct 01 '22

Hey, XBox, you’re finally awake

2

u/[deleted] Oct 02 '22

... is how the Engineer chose to tell him to stop bothering his team.

2

u/[deleted] Oct 02 '22

It just works

2

u/Serpenta91 Oct 02 '22

Unfortunately Bethesda's days of innovation are far in the past...