this post was submitted on 06 Aug 2025
878 points (99.2% liked)

Programmer Humor

25671 readers
2427 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] frezik@lemmy.blahaj.zone 205 points 6 days ago (9 children)

Rollercoaster Tycoon was the last of an era, not a sudden burst of genius.

Before Doom (1993), almost all games were assembly. Doom was a shock to the industry. You could now write a high performance, multiplatform, sophisticated game in a compiled language (C). When I say multiplatform, I don't just mean how it was ported to everything later. It was developed on NextStations first. DOS was the first port. So it proved all of the above immediately on release.

We take for granted that C is performant now, but that wasn't obvious until optimizing compilers got good and someone tried.

Rollercoaster Tycoon (1999) is the last notable title that used ASM. It's impressive in many ways, but it wasn't as much of a standout as it seems now. Six years earlier to its release, that was just how games were done.

It's notable that the only port of Rollercoaster Tycoon was the original Xbox, which was also x86. Nobody wants to rewrite it for anything else.

[–] NocturnalMorning@lemmy.world 56 points 6 days ago (3 children)

You couldn't pay me to write a game in C today. Our expectations of what games have to be are sky high today. You cant get away with the productivity lost writing in c, maybe c++ since its supported by a number of engines. But, im personally not aware of a single engine that uses C. I tried my hand at writing a game without an engine, and it was a hot mess. Writing low level code to make a button with text, no thanks...been there done that, in my game, you could bump into trees and get stuck...not very fun in my opinion, and thats after a few months of writing code.

[–] four@lemmy.zip 22 points 6 days ago (1 children)

Animal Well was written in C without an engine and it was a decent hit (for an indie). Although that's definitely an exception, perhaps very similar to the RollerCoaster Tycoon example

[–] Jumuta@sh.itjust.works 9 points 6 days ago

Wikipedia says cpp

load more comments (2 replies)
[–] Blue_Morpho@lemmy.world 37 points 6 days ago (2 children)

Before Doom (1993), almost all games were assembly.

Carmack wrote Wolfenstein 3d in C. Star Control and Dune 2 were C.

[–] Rai@lemmy.dbzer0.com 15 points 6 days ago (1 children)
[–] Blue_Morpho@lemmy.world 4 points 6 days ago* (last edited 6 days ago)

I used those as examples but I claim that most everything was C by the early 90's. The statement that C compilers got fast which allowed it isn't true. When a new compiler came out it was always a couple of percentage points faster than the old version. Meanwhile hardware was doubling in performance every two years.

C compilers didn't need much optimization because there wasn't much performance that could be optimized into code on the simple CPUs of 1992 when Doom was being written. CPU's weren't the superscalar multi core monsters they are today. A compiler couldn't take advantage of reordering instructions to use multiple adders because there was only one.

[–] frezik@lemmy.blahaj.zone 5 points 6 days ago (1 children)

Those games didn't have the splash that Doom did for this sort of thing.

https://web.archive.org/web/20010105180900/http://www.gamespy.com/legacy/articles/devweek_c.shtm

Mainstream application programmers switched to C in the early 80's. Game developers were slower to switch, because their small teams and focus on performance kept assembly language viable till the following decade. When id Software released DOOM, they surprised much of the industry by having no reliance on assembly code--despite excellent game performance, and by successfully cross-developing the game (in NeXTstep and DOS), then successfully porting it to an astounding variety of platforms.

[–] Ensign_Crab@lemmy.world 4 points 6 days ago

Those games didn’t have the splash that Doom did for this sort of thing.

I would say that Wolf3d would certainly count as proof of concept.

[–] sp3ctr4l@lemmy.dbzer0.com 24 points 6 days ago (1 children)

Just to throw on more factoids:

Wasn't Gabe Newell either the first, or among the first, to port Doom to Win 95?

[–] ChicoSuave@lemmy.world 43 points 6 days ago (1 children)

He was an analyst at Microsoft who was tasked with finding out how many computers ran Windows to determine market share. Part of the question involved asking what other software was installed and the only software used more than Windows was Doom. This made GabeN realize the market potential of games and he left Microsoft shortly afterward.

[–] sp3ctr4l@lemmy.dbzer0.com 19 points 6 days ago* (last edited 6 days ago) (1 children)

See, I've heard that story, that he basically ran ... well, arguably, a worm that did network analysis on what was installed on every computer in the MSFT internal network, realized more people had DOOM installed... than Windows...

... and I have also heard that he actually ported DOOM to... either MS DOS, or Win95... ?

I genuienly do not know which is true, if they're all true, if they're all false... I can't remember the source for each of these, but I know I've heard or read all these semi-close variants from somewhere, over the years.

[–] jqubed@lemmy.world 14 points 6 days ago

Just saw this article recently. Gabe was part of a team trying to convince developers that they would be better off writing their games with more abstracted code/libraries instead of writing their own interfaces (some of which were written by people convinced they were being really efficient but were actually terrible). One thing they did to prove their point was going to id and offering to have Microsoft port Doom to Windows for free. But the experience and seeing the success id was having distributing their own game led Gabe to launch Valve.

[–] jqubed@lemmy.world 12 points 6 days ago

Eventually it sort-of got a rewrite to create RollerCoaster Tycoon Classic, initially for iOS and Android, later for Windows, macOS, and Nintendo Switch. It largely is a rewrite of RollerCoaster Tycoon 2, with the goal of bringing the game to more modern platforms, and the save files for parks and rides are compatible. In this interview with Atari Club, Sawyer says the rewrite was in C++ but even with a team of people still took longer to write in C++ than it took him to write the original in x86 assembly.

If anyone previously paid attention to RCT Classic, it’s been seeing some development work again and is working on Android again. They also made RCT Classic+ on Apple Arcade (basically just the game and all the expansions included) and also updated the regular versions of RCT Classic so they run correctly again (RCT Classic stopped working on macOS when Apple dropped support for 32-bit applications and Atari didn’t release a recompiled game until recently).

load more comments (5 replies)
[–] Mobile@leminal.space 54 points 1 week ago (1 children)
[–] Jessica@discuss.tchncs.de 10 points 6 days ago (1 children)

I will never not upvote an Ahoy video. The guy is a legend in video game documentaries. Check out his Monkey Island video as a follow-up

[–] ProfessorProteus@lemmy.world 7 points 6 days ago (1 children)

Another really good one that I've watched at least 4 times is his Polybius video. He's an incredible documentarian and an equally great researcher.

I'm sure some of the Polybius one was dramatized a little (apart from what was clearly labeled as actors reading the transcripts), but it makes for an unforgettable watch. And the music!!

load more comments (1 replies)
[–] humanspiral@lemmy.ca 45 points 6 days ago* (last edited 6 days ago)

is there a NPM package for assembly? I need to keep access to right pad my strings package.

[–] Kyrgizion@lemmy.world 40 points 1 week ago

Dude got millions for it. Well deserved imho.

[–] MonkderVierte@lemmy.zip 37 points 6 days ago (1 children)
[–] lessthanluigi@lemmy.sdf.org 10 points 6 days ago

Best way to play till this day

[–] henfredemars@infosec.pub 23 points 6 days ago (1 children)

This looks like a screenshot in the background of the C++ OpenRCT version because the resolution is too high and not supported by the original assembly release.

[–] Kazumara@discuss.tchncs.de 5 points 6 days ago* (last edited 6 days ago)

The original goes to 1024 x 786 and has different zoom levels. I've played most of the original parks this year and that does not see to be too high res to me. Give me a sec I'll take a screenshot of mine in a minute.

Edit here it is. It's the GOG version, which launches fullscreen, so the 1024 x 768 are stretched onto the center of my 1920 x 1080 screen.

collapsed inline media

[–] HugeNerd@lemmy.ca 22 points 6 days ago (2 children)

Have you seen the insane complexity of modern CPUs? Ain't no one hand coding that like a 6502 in 1985.

[–] musubibreakfast@lemmy.world 10 points 6 days ago (1 children)

I wonder if there's anyone alive right now who would be capable of such a task.

[–] Blackmist@feddit.uk 9 points 6 days ago

If the hardware was fixed, I don't see why not.

Might not be as fast as the optimisations compilers do these days though.

If you have to support thousands of types of GPU and CPU and everything else, then fuck no.

[–] skuzz@discuss.tchncs.de 5 points 6 days ago (1 children)

Even if one did, say using x86, it would still just be interpreted by the CPU into the CPU's native opcodes, as the legacy instruction sets are interpreted/translated.

load more comments (1 replies)
[–] Klear@lemmy.world 21 points 6 days ago (1 children)

Hello everyone and welcome to another video.

[–] NeatNit@discuss.tchncs.de 15 points 6 days ago

The YouTube algorithm works in mysterious ways.

Because I'm nice, to anyone who doesn't get the reference: https://www.youtube.com/@MarcelVos

[–] yucandu@lemmy.world 20 points 6 days ago (1 children)

Epic Pinball was another game that I recall was written in assembly. When your old 286 struggled to run games at a decent framerate, Epic Pinball would run in a smooth 75fps or whatever you set your CRT monitor to.

[–] ZILtoid1991@lemmy.world 12 points 6 days ago

Epic Pinball, if I recall correctly, also used some ModeX trickery, meaning it had most of the pinball table in VRAM, and then modified the VGA framebuffer pointer for scrolling, then only moving as much data as it was needed (ball, flippers, etc)

[–] jwt@programming.dev 18 points 6 days ago (1 children)

"Try writing it it in assembly"

[–] leftzero@lemmy.dbzer0.com 8 points 6 days ago

I want to get off Mr. Bones' Wild Ride.

[–] neidu3@sh.itjust.works 13 points 1 week ago* (last edited 6 days ago)

Chris Sawyer is an absolute legend

[–] FuglyDuck@lemmy.world 9 points 1 week ago

Also know as “how to keep a coder busy”

[–] ch00f@lemmy.world 6 points 1 week ago (1 children)

Can you imagine making this game in assembly for MacOS over the last 20 years?

load more comments (1 replies)
[–] SpaceNoodle@lemmy.world 5 points 6 days ago

This but unironically

[–] DonutsRMeh@lemmy.world 5 points 6 days ago (5 children)

I've never written a single line of code in assembly, and I'm now curious

[–] peoplebeproblems@midwest.social 9 points 6 days ago (2 children)

Really? It was required when I was in college. We did MIPS, x86, and PIC.

I like it because there's no mysterious things happening to your bits. Every line is an instruction executed. You control the machine. It's power. It gives you power over the machines.

[–] DonutsRMeh@lemmy.world 9 points 6 days ago (4 children)

I went to college for Microbiology and became a programmer on my own after, so nope, never written a single line in assembly and never thought of checking it out either. Just never really crossed my mind. I might start messing with it soon.

I... Don't recommend it. Rust if anything.

It's a neat party trick? Helps you understand how a processor works? But for anything modern, it's way more work than it's worth.

[–] Redkey@programming.dev 3 points 6 days ago

Go for it, if it's to satisfy your own curiosity, but there's virtually no practical use for it these days. I had a personal interest in it at uni, and a project involving coding in assembly for an imaginary processor was a small part of one optional CS course. Over the years I've dabbled with asm for 32-bit Intel PCs and various retro consoles; at the moment I'm writing something for the Atari 2600.

In the past, assembly was useful for squeezing performance out of low-powered and embedded systems, but now that "embedded" includes SoCs with clock speeds in the hundreds of MHz and several megabytes of RAM, and optimizing compilers have improved greatly, the tiny potential performance gain (and you have to be very good at it before you'll be able to match or do better than most optimizing compilers) is almost always outweighed by the overhead of hand-writing and maintaining assembly language.

load more comments (2 replies)
[–] expr@programming.dev 5 points 6 days ago

That wasn't required in my CS program, though instead we had to design our own instruction set and assembler. Obviously it was an approximation, though.

[–] mdhughes@lemmy.sdf.org 4 points 6 days ago

Get an 8-bit computer emulator, and learn 6502 or Z-80 assembly.

Usborne machine-code-for-beginners or any book by Rodnay Zaks.

It gets deeper from there, and modern CPUs are kind of awful to hand-hack assembly on, but you'll at least learn how the computer really works!

[–] Mobile@leminal.space 4 points 6 days ago (1 children)

A little late to this comment but there are some assembly videogames out! They are puzzles and gives you the gist of how assembly works.

I really enjoyed TIS-100. I just never got around to beating it.

load more comments (1 replies)
load more comments (2 replies)

TTD and RCT are still amazing.

load more comments
view more: next ›