Live data from Hacker News

The 1987 game “The Last Ninja” was 40 kilobytes

twitter.com

71–80 of 199 posts

Re: The 1987 game “The Last Ninja” was 40 kilobytes

#71
post #32

Earlier quoted context omitted.

Sure, if you don’t count safety features like memory management, crash handling, automatic bounds checks and encryption cyphers; as anything useful. I do completely agree that there is a lot of waste in modern software. But equally there is also a lot more that has to be included in modern software that wasn’t ever a concern in the 80s. Networking stacks, safety checks, encryption stacks, etc all contribute massively…

Yes, but this doesn't prevent you from being mindful and selecting the right tools with smaller memory footprint while providing the features you need. Go's "GC disadvantage" is turned on its head by developing "Zero Allocation" libraries which run blazingly fast with fixed memory footprints. Similarly, rolling your own high performance/efficient code where it matters can save tremendous amounts of memory where it ma…

That first one was discussed on HN before, as its source code was also released: https://news.ycombinator.com/item?id=11848097

Re: The 1987 game “The Last Ninja” was 40 kilobytes

#72
post #68
post #62

Earlier quoted context omitted.

> all contribute massively to software “bloat”. Could you point to an example where those gigs were really "massively" due crash handling and bounds checks etc?

Most software doesn’t consume multiple gigabytes of memory outside of games and web browsers. And it should be obvious why games and web browsers do.

Unfortunately "most software" might be a web browser these days.

Re: The 1987 game “The Last Ninja” was 40 kilobytes

#73
A multi-level generative dungeon-crawler in 10 lines of code:

https://bunsen.itch.io/the-snake-temple-by-rax

We lost something in the bloat, folks. Its time to turn around and take another look at the past - or at least re-adjust the rearview mirror to actually look at the road and not ones makeup ..

Re: The 1987 game “The Last Ninja” was 40 kilobytes

#74
post #6

I was looking at a production service we run that was using a few GBs of memory. When I add up all the actual data needed in a naive compact representation I end up with a few MBs. So much waste. That's before thinking of clever ways to compress, or de-duplicate or rearrange that data. Back in the day getting the 16KB expansion pack for my 1KB RAM ZX81 was a big deal. And I also wrote code for PIC microcontrollers th…

The BASIC 10Liner competition wants you to know that there is a growing movement of hackers who recognize the bloat and see, with crystal clarity, where things kind of went wrong ...

https://basic10liner.com/

".. and time and again it leads to amazingly elegant, clever, and sometimes delightfully crazy solutions. Over the past 14 editions, more than 1,000 BASIC 10Liners have been created — each one a small experiment, a puzzle, or a piece of digital creativity .."

Re: The 1987 game “The Last Ninja” was 40 kilobytes

#75
post #32

Earlier quoted context omitted.

Sure, if you don’t count safety features like memory management, crash handling, automatic bounds checks and encryption cyphers; as anything useful. I do completely agree that there is a lot of waste in modern software. But equally there is also a lot more that has to be included in modern software that wasn’t ever a concern in the 80s. Networking stacks, safety checks, encryption stacks, etc all contribute massively…

Yes, but this doesn't prevent you from being mindful and selecting the right tools with smaller memory footprint while providing the features you need. Go's "GC disadvantage" is turned on its head by developing "Zero Allocation" libraries which run blazingly fast with fixed memory footprints. Similarly, rolling your own high performance/efficient code where it matters can save tremendous amounts of memory where it ma…

Programming these days, in some realms, is a lot like shopping for food - some people just take the box off the shelf, don't bother with reading the ingredients, throw it in with some heat and fluid and serve it up as a 3-star meal.

Others carefully select the ingredients, construct the parts they don't already have, spend the time to get the temperatures and oxygenation aligned, and then sit down to a humble meal for one.

Not many programmers, these days, do code-reading like baddies, as they should.

However, kids, the more you do it the better you get at it, so there is simply no excuse for shipping someone elses bloat.

Do you know how many blunt pointers are lined up underneath your BigFatFancyFeature, holding it up?

Re: The 1987 game “The Last Ninja” was 40 kilobytes

#76
Some comments here sound like the ones I hear from car "enthusiasts" praising old engines for being simple to run and easy to fix, then complaining about modern engines being too complicated and how we should return to the "good old days", all that without taking into account the decades of progress since then.

Want to prove a point? Give me Skyrim in 64k of ram. Go ahead! I dare you!

Re: The 1987 game “The Last Ninja” was 40 kilobytes

#77
post #55
post #43

Earlier quoted context omitted.

Back the day people had BASIC and some machines had Forth and it was like print "Hello world" or ." Hello world " / .( Hello world ) for Forth. By comparison, giving how they optimized the games for 8 and 16 bit machines I should have been able to compile Cataclysm DDA:BN under my potato netbook and yet it needs GIGABYTES of RAM to compile, it crazy that you need damn swap for something it required far less RAM 15 ye…

BASIC was slow in the 80s. Games for the C64 (and similar machines) were written in machine code. > By comparison, giving how they optimized the games for 8 and 16 bit machines I should have been able to compile Cataclysm DDA:BN under my potato netbook and yet it needs GIGABYTES of RAM to compile, it crazy that you need damn swap for something it required far less RAM 15 years ago for the same features. That’s not cr…

Compare Limbo+Tk under Inferno with current C#/Java. Or C++ against Plan9C.

We have impressive CPU's running really crappy software.

Remember Claude Code asking 66GB for a damn CLI AI agent for something NetBSD under a Vax (real or physical) from 1978 could do with NCurses in miliseconds every time you spawn Nethack or any other NCurses tool/game.

On speed, Forth for the ACE was faster than Basic running under the ZX80. So, it wasn't about using a text-parsed language. Forth was fast, but people was not ready for neither RPN nor to manage the stack, people tought in an algebraic way.

But that was an 'obsolete' mindset, because once you hit HS you were supposed to split 'big problems into smaller tasks (equations). In order to implement a 2nd degree equation solver in Forth you wouldn't juggle with the stack; you created discrete functions (words) for the discrimination part and so on.

In the end you just managed two stack items per step.

If Forth won instead of Basic, instead of allowing spaghetti code as a normal procedure we would be pretty much asking to decompose code into small functions as the right thing to do from the start.

Re: The 1987 game “The Last Ninja” was 40 kilobytes

#78
post #2

I remember this game, the way it drew itself on each screen, the nice graphics. Growing up with games on Atari, Commodore, Amstrad, and Spectrum, was a lot of fun. By comparison, COD Modern Warfare 3 is 6,000,000 times larger at 240GB. Imagine telling that to someone in 1987.

Hardware sprite accelerators, the first GPUs. I swear there's something visceral you learn by programming that sort of system where you can literally see what it's doing, in the order it's doing it, which you just can't get any other way.

Re: The 1987 game “The Last Ninja” was 40 kilobytes

#79
> isometric on the C64 with such an amazing level of detail - simply gorgeous

Or a convincing representation of that. A lot of old tricks mean that the games are doing less than you think that they are, and are better understood when you stop thinking “how do they do that” and “how are they convincing my brain that is what they are doing”.

Look at how little RAM the original Elite ran in on a BBC Model B, with some swapping of code on disk⁰. 32KB, less the 7.75KB taken by the game's custom screen mode² and a little more reserved for other things¹. I saw breathy reviews at the time and have seen similar nostalgic reviews more recently talking about “8 whole galaxies!” when the game could easily have had far more than that and was at one point going to. They cut it down not for technical reasons but because having more didn't feel usefully more fun and might actually put people off. The galaxies were created by a clever little procedural generator so adding more would have only added a couple of bytes (to hold the seed and maybe other params for the generator) each.

Another great example of not quite doing what it looks like the game is doing is the apparently live-drawn 3D view in the game Sentinel on a number of 8-bit platforms.

--------

[0] There were two blocks of code that were swapped in as you entered or self a space station: one for while docked and one for while in-flight. Also the ship blueprints were not all in memory at the same time, and a different set was loaded as you jumped from one system to another.

[1] the CPU call stack (technically up to a quarter K tough the game code only needed less than half of that), scratch-space on page-zero mostly used for game variables but some of which was used by things like the disk controller ROM and sound generator, etc.

[2] Normal screen modes close to that consumed 10KB. Screen memory consumption on the BBC Master Enhanced version was doubled as it was tweaked to use double the bit depths (4ppb for the control panel and 2bbp for the exterior, instead of 2bbp and 1ppb respectively).

Post reply on HN