Live data from Hacker News

The 1987 game “The Last Ninja” was 40 kilobytes

twitter.com

141–150 of 199 posts

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

#141
post #94

Earlier quoted context omitted.

I’m on my phone so cannot run it, but you cannot generate data and not store it somewhere. It’s going to consume either system resources (RAM/storage) or video resources (VRAM). If your point is that it uses gigabytes of VRAM instead of system memory, then I think that is an extremely weak argument for how modern software doesn’t need much memory because all you’re doing is shifting that cost from one stack of silico…

All demos I have shared with you are designed to run on resource constrained systems. Using all the resources available on the system is a big no no from the start. Instead, as you guessed, these demos generate assets on the fly and stream to the respective devices. You cite inefficiencies. I tell they run at more than 60 FPS on these constrained systems. Remember, these are early 2000s systems. They are not that pow…

> You cite inefficiencies.

That’s not what I said. I said you’re trading memory footprint for CPU footprint.

This is the correct way to design a demo but absolutely the wrong way to design a desktop application.

They are marvels, I agree. But, and as I said before, there’s no such things as a free lunch. at risk of stating the obvious; If there wasn’t a trade off to be made then all software would be written that way already.

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

#142

I never figured out how they did the turtle graphics in this game. The C64 didn't have whole screen bitmaps, you could either use sprites or user defined character sets, neither of which made this straightforward. And the loading screens were also amazing, particularly for tape loading.

You might be thinking of another system (like the NES, perhaps), because the C64 has 160x100 and 320x200 bitmap modes.

Even on NES a lot of games use CHR-RAM so arbitrary bitmaps are at least possible, though only a small part of the screen is unique without some rarely used mapper hardware. Zelda and Metroid mostly just use this to compress the graphics in ROM, Qix is a simple example with line drawing, Elite is an extreme one.

I made a demo of the Mystify screensaver using the typical 8KB CHR-RAM. Even with a lot of compromises it has pretty large borders to avoid running out of unique tiles. https://youtube.com/watch?v=1_MymcLeew8

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

#143
post #121

Earlier quoted context omitted.

They were different but both came in-ROM and with similar storage options (cassette/floppy). On Pascal, Delphi was used for tons of RAD software in the 90's, both for the enterprise and for home users with zillions of shareware (and shovelware). And Lazarus/FPC+SQLITE3 today is not bad at all. On Lisp... it was used on niche places such as game engines, Emacs -Org Mode today it's a beast-, a whole GNU supported GNU d…

I’m very aware of Lazarus, Delphi and Emacs. But they’re exceptions rather than industry norms. And thus pointing them out misses the point I was making when, ironically, I was pointing out how you’re missing the original point of this discussion.

My point was about performance. Yes, Basic vs Forth was the worst choice back in the day, and you could say low level stuff was done under assembler.

Fine. But the correct choice for 'low level' stuff it's C++ and I state that most of the C++ compilers have huge compiling times for software (GCC), or much better but they still eat ram like crazy (clang) and except for few software, the performance boost compared to Go doesn't look as huge for mosts tasks except for Chromium/Electron and QT.

For what software it's doing a 90% of the time, Go + a nice toolkit UI would be enough to cover most tasks while having a safe language to use. Even for bloated propietary IM clones such as Discord and Slack.

Because, ironically, most of the optimized C++ code is to run bloated runtimes like Electron tossing out any C++ gives to you, because most Electron software it's implementing half an OS with every application.

With KDE and QT at least you are sharing code, even by using Flatpak, which somehow deduplicates stuff a little bit. With Electron you are running separate, isolated silos with no awareness of each other. You are basically running several 'desktop environments' at once.

You can say, hey, Go statically builds everything, there's no gain on shared libraries then... until you find the Go compiler can still do a better job using less RAM than average than tons of stuff.

With Electron often you are shipping the whole debugging environment with yourself. Loaded, and running graphical software with far less performance than the 'bloated' KDE3 software back in the day doing bells and wistles under a Kopete chat window under an AMD Athlon. QT3 tools felt snappy. Seeing Electron based software everywhere has the appeal of running everything GUI based under TCL/Tk under a Pentium modulo video decoders and the like. It will crawl against pure Win32/XLib under a Pentium 90 if everything it's a TK window with debugging options enabled.

So, these are our current times. You got an i7 with 16GB of RAM and barely got any improvement with modern 'apps' over an i3 with 2GB of RAM and native software.

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

#144
post #132
post #41

Earlier quoted context omitted.

> 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 matters. The savings there would be negligible (in modern terms) but the development cost would be significantly increased. > Of course more features an…

> The savings there would be negligible (in modern terms) A word of praise for Go: it is pretty performant, while using very little memory. I inherited a few Django apps, and each thread just grows to 1GB. Running something like celery quickly eats up all memory and start thrashing. My Go replacements idle at around 20MB, and are a lot faster. It really works.

I’ve written a $SHELL and a terminal emulator in Go. It has its haters on HN but I personally rather like the language.

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

#145
post #7

Apparently this person is referring to the available ram on a Commodore 64. The media (data) on disk or tape was much more than that.

Not much more. It all fits on a single side of a 1541 floppy. Even considering compression it couldn't be more than a couple hundred kilobytes. https://csdb.dk/release/?id=99145

> Not much more. It all fits on a single side of a 1541 floppy.

It could still be much more depending on how much data fits on a single side of a 1541 floppy.

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

#146
post #136

Earlier quoted context omitted.

It's redirecting to homeputerium.de and seems to have nothing to do with what they're referring to.

Yall can't spend more than 5 seconds looking at the UI before giving up? One of the only UI components on the homepage is a list of years you can click to see the entries.

The tragic result of attention span atrophy and deskilling.

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

#147
post #143

Earlier quoted context omitted.

I’m very aware of Lazarus, Delphi and Emacs. But they’re exceptions rather than industry norms. And thus pointing them out misses the point I was making when, ironically, I was pointing out how you’re missing the original point of this discussion.

My point was about performance. Yes, Basic vs Forth was the worst choice back in the day, and you could say low level stuff was done under assembler. Fine. But the correct choice for 'low level' stuff it's C++ and I state that most of the C++ compilers have huge compiling times for software (GCC), or much better but they still eat ram like crazy (clang) and except for few software, the performance boost compared to G…

You’re talking about compiler footprint and runtime footprint in the same conversation but they’re entirely different processes (obviously) and I don’t think it makes any sense to compare the two.

C++ is vastly more performant than Go. I love Go as a language but let’s not get ourselves carried away here about Gos performance.

It also makes no sense no sense to talk about Electron as C++. The problem with Electron isn’t that it was written in C++, it’s that it’s ostensibly an entire operating system running inside a virtual machine executing JIT code.

You talked about using Go for UI stuff, but have you actually tried? I’ve written a terminal emulator in Go and performance UI was a big problem. Almost everything requires either CGO (thus causing portability problems) or uses of tricks like WASM or dynamic calls that introduced huge performance overheads. This was something I benchmarked in SDL so have first hand experience.

Then you have issues that GUI operations need to be owned by the OS thread, this causes issues writing idiomatic Go that calls GUI widgets.

And then you have a crap load of edge cases for memory leaks where Go’s GC will clear pointers but any allocations happening outside of Go will need to be manually deallocated.

In the end I threw out all the SDL code. It was slow to develop, hard to make pretty, and hard to maintain. It worked well but it was just far too limiting. So switched to Wails, which basically displays a WebKit (on MacOS) window so it’s lower footprint than Electron, allows you to write native Go code, but super easy to build UIs with. I hate myself for doing this but it was by far the best option available, depressingly.

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

#148
post #142

Earlier quoted context omitted.

You might be thinking of another system (like the NES, perhaps), because the C64 has 160x100 and 320x200 bitmap modes.

Even on NES a lot of games use CHR-RAM so arbitrary bitmaps are at least possible, though only a small part of the screen is unique without some rarely used mapper hardware. Zelda and Metroid mostly just use this to compress the graphics in ROM, Qix is a simple example with line drawing, Elite is an extreme one. I made a demo of the Mystify screensaver using the typical 8KB CHR-RAM. Even with a lot of compromises it…

Elite is my go-to example for madness in a tile-based grapgics system. Watching the CHR-RAM in an emulator while Elite is running is mesmerizing.

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

#150

I never figured out how they did the turtle graphics in this game. The C64 didn't have whole screen bitmaps, you could either use sprites or user defined character sets, neither of which made this straightforward. And the loading screens were also amazing, particularly for tape loading.

As others have said, the C64 does have bitmap modes, though it's understandable not being aware of it as they weren't that commonly used for games since it was often easier to use user defined character sets as tilesets if you had repetition.
Post reply on HN