Live data from Hacker News

A RAM Edition of Dirty Coding Tricks

gamasutra.com

1–10 of 76 posts

Re: A RAM Edition of Dirty Coding Tricks

#2
Problem solving within a constrained system. It’s fun stuff and I always find it amazing how adversity and particularly time pressure can bring out the ingenuousness in people.

I guess wartime inventions are possibly an extreme example (google Hobart’s Funnies some time for some good clean ingenuity), but shipping console games to a deadline seems to have a similar effect.

Re: A RAM Edition of Dirty Coding Tricks

#3

  When finishing a level, the game would reboot the console
  and restart itself with a command-line argument
  (the name of the level to start) ... into the next level. 
  Voila, the perfect(?) way to clear all memory between 
  levels.
OH MY

At 22 years old, this is one of those moments where I'm in awe of the strange issues and workarounds that existed merely ~5-10 years ago which I'll probably never have to deal with. Very funny!

Re: A RAM Edition of Dirty Coding Tricks

#4
post #3

When finishing a level, the game would reboot the console and restart itself with a command-line argument (the name of the level to start) ... into the next level. Voila, the perfect(?) way to clear all memory between levels. OH MY At 22 years old, this is one of those moments where I'm in awe of the strange issues and workarounds that existed merely ~5-10 years ago which I'll probably never have to deal with. Very f…

Maybe never had to physically blow air on a video game to make it work either, ha.

Re: A RAM Edition of Dirty Coding Tricks

#5
Makes me wonder why Rust isn't popular with game devs. Wouldn't Rust's borrow checker and resource management at compilation time make most of the described memory reclaiming issues obsolete?

Re: A RAM Edition of Dirty Coding Tricks

#6
post #5

Makes me wonder why Rust isn't popular with game devs. Wouldn't Rust's borrow checker and resource management at compilation time make most of the described memory reclaiming issues obsolete?

These stories are from games made in the late 90s to early 2000s. Rust didn't exist then.

Re: A RAM Edition of Dirty Coding Tricks

#7
post #5

Makes me wonder why Rust isn't popular with game devs. Wouldn't Rust's borrow checker and resource management at compilation time make most of the described memory reclaiming issues obsolete?

These stories are from games made in the late 90s to early 2000s. Rust didn't exist then.

Yes, obviously. Yet, I'd assume space/memory problems persist today to - games are always pushing the PC hardware envelope.

Re: A RAM Edition of Dirty Coding Tricks

#8
"When finishing a level, the game would reboot the console and restart itself with a command-line argument(the name of the level to start) ... into the next level. Voila, the perfect(?) way to clear all memory between levels."

Well, that's basically how most websites work, lol

Re: A RAM Edition of Dirty Coding Tricks

#9
post #5

Makes me wonder why Rust isn't popular with game devs. Wouldn't Rust's borrow checker and resource management at compilation time make most of the described memory reclaiming issues obsolete?

You can't do resource management at compile-time for games that have 50gb of assets. Also, Rust may help with accidental memory leaks, but you still have to deal with things like heap fragmentation.

Re: A RAM Edition of Dirty Coding Tricks

#10
Whenever I think, "Thank goodness the limited memory days are behind us", it pops up again and again. Sure, you can buy a new iMac Pro with 128GB of RAM(!!) and smartphones regularly have 8GB available, but the increasingly popular IOT devices and smart consumer hardware (like streaming media boxes, etc.) try to limit the BOM cost and thus limit memory as much as possible. Tiny memory leaks become an issue, or random crashes from wonky media codec implementations, etc.

I think the skills (and hacks) that used to be useful only to game developers and OEMs are now going to be needed by a much wider audience of devs.

Post reply on HN