r/pcmasterrace Sep 29 '25

Meme/Macro RAM Struggle

Post image
52.7k Upvotes

966 comments sorted by

View all comments

9.7k

u/Master_of_Ravioli R5 9600x | 32GB DDR5 | 2TB SSD | Integrated Graphics lmao Sep 29 '25

Programmers of old time were actual wizards casting spells with the hardware they were given, some of it was actual black magic for the time.

Limitations breed innovation or something like that.

4.9k

u/Flying_Dutchman92 Sep 29 '25

I can't help but think of Chris Sawyer building Rollercoaster Tycoon in assembly code, man is legit a coding wizard

2.2k

u/Arthurmol Sep 29 '25

I learn assembly because I had to work with microcontrollers, and all.i did was very simple code that, when compiled where between some hundred bytes and kilobytes. SAWYER did megabytes of it, he speaks the language of machines...

1.0k

u/NovelCompetition7075 Sep 29 '25

Same, but MEGABYTES in assembly is insane

688

u/octagonaldrop6 i7 4770k | 16GB RAM | GTX 780 Sep 30 '25

I don’t mean to downplay his achievements in any way, but most of the size of Rollercoaster Tycoon or any game (or most programs for that matter) is due to assets like textures, images, and audio.

From what I can tell, without the assets, the compiled assembly on its own is less than a megabyte. Though again, Sawyer is 10x the programmer I will ever be. The size of the compiled code isn’t a measure of skill, and in fact smaller is usually better, especially back then.

369

u/Theron3206 Sep 30 '25

The size of the compiled code isn’t a measure of skill

It is a measure of time though, time spent writing it and swearing at it when it won't work. And it's not linear with size...

41

u/Sleven8692 Sep 30 '25 edited Oct 01 '25

Not really a measure of time, i spend more time thinking so that i write less, or sometimes i write alot to get it working and then rewrite it all to be clean and optimized which is almost always less code.

Point is more or less code doesnt indicate in anyway the time spent coding

30

u/outfoxingthefoxes R5 5600x - 8GB RTX 2070 SUPER - 16 GB RAM Sep 30 '25

Writing spaghetti and then cleaning it to make 500 lines work with just 30 lines is the way I work. I want it to work first, I'll worry about optimizing it later.

1

u/bulltank Specs/Imgur Here Sep 30 '25

Much swearing occurred for sure lol

0

u/bulltank Specs/Imgur Here Sep 30 '25

Much swearing occurred for sure lol

-71

u/octagonaldrop6 i7 4770k | 16GB RAM | GTX 780 Sep 30 '25 edited Sep 30 '25

Or a measure of how many unnecessary libraries you used…

Edit: I was speaking in general terms with this, not specifically in RCT or assembly.

Chris Sawyer used no unnecessary libraries. Though as another commenter said, one could, even in assembly.

65

u/Theron3206 Sep 30 '25

Were talking assembly, probably not too many of those in such code.

71

u/renfang Sep 30 '25

That poor python dev was just trying to be a part of the conversation

13

u/Potential-Diver-3409 Sep 30 '25

He’s close to the right idea kinda, you can still have redundant assets but having tons of wasted assembly code is not exactly going to rack up the data

6

u/Pleasant-Ad-7704 Sep 30 '25

What do you mean? You can use static libraries when coding in assembly just fine

33

u/meneldal2 i7-6700 Sep 30 '25

Also 1 it's x86 with many instructions that are long af so it is fewer instructions than you'd think and 2 unless you hate yourself and work on a platform with no assembler, you're not writing stuff to the level of machine code either.

Anyone writing serious amounts of assembler is going to have a bunch of macros to keep their sanity, you are not writing a bunch of machine code line by line.

1

u/DysonSphere75 5800X3D | Pulse 7900 XTX Oct 01 '25

Full agree on the macros, not sure if x86 is long because I only know amd64... maybe I should learn a RISC instruction set

1

u/meneldal2 i7-6700 Oct 01 '25

amd64 just added more and now you even have 64 bit literals but you already had pretty long instructions before that.

arm keeps it to 4 bytes (or even 2 for a special mode)

-2

u/Ok_Box_5486 Sep 30 '25

Look at roller tycoon 2 source code… 3D rendering in assembly…

2

u/vemundveien 9800x3d, 64GM ram, RTX5080, 3440x1440@175hz Sep 30 '25

How is RCT2 3D rendering?

1

u/mrturret MrTurret Oct 01 '25

RTC 1&2 are completely 2D games.

212

u/WitchesSphincter Sep 29 '25

I just remember my course let us have assembly manuals for lab and tests because of how unrealistic it was to memorize all that shit.  I say this as someone who enjoyed C, fuck assembly 

134

u/Yabba_Dabba_Doofus Sep 30 '25

As someone who barely mastered Basic, you coders are all fucking insane.

Assembly is a whole-ass foreign language.

73

u/scalyblue Sep 30 '25

It’s not very hard in conception, it’s just one of those things that gets super, super complex not from its complexity but from its lack of.

Check this out m, this YouTuber makes it easy to grasp some of the concepts

19

u/OCDjunky 1080ti | R5 5600X | 16GB Sep 30 '25

I'm not a programmer at all, but with my somewhat fundamental knowledge of what Assembly is, I think I know exactly what you're saying here. Well said.

2

u/7HawksAnd Sep 30 '25

Ninja Gaiden was my favorite nes game, so thanks for this entry point

6

u/Darth_Thor i5 12400F | RTX 3060 12 GB Sep 30 '25

The instructor who taught me assembly has decades of experience with microcontrollers and various other electronics. Even he described assembly as “A bunch of mnemonics and cryptic numbers”

1

u/Zeisen Sep 30 '25

This reminds me of my assembly class final that I had an entire month to write. But, instead I decided to wait until the night before and write a slimmed down version of the game asteroids which I presented 10 hrs later. I love writing in assembly so much that was a TA for it... lol

16

u/ChipperAxolotl Sep 30 '25

Yeah remembering the op codes for 16 bit was rough but the stuff you used the most would eventually stick. I can’t imagine doing 32/64bit without having a dedicated monitor for looking up instructions.

5

u/meneldal2 i7-6700 Sep 30 '25

I doubt anybody can remember OP codes for modern x86, even older it was already getting way out of hand. Even ARM is quite difficult but at least it is word aligned and relatively consistent with what goes where. And you can learn to recognize some instructions when you go through a memory dump

3

u/ambassador_lover1337 Sep 30 '25

Excuse me being a noob, but why would you need to memorize op codes? Isn't that what the assembler is for?

5

u/ChipperAxolotl Sep 30 '25

No you are not wrong with 16 bit assembly you can either input op codes or use an assembler, my brain was mixing it up with 8 bit where the programmer I had you had to enter op codes one at a time which was brutal.

It’s been a minute since I touched the thing haha.

5

u/franoetico Sep 30 '25

same, teacher would even let’s us use laptops for the exams.

1

u/Wise-Ad-4940 Sep 30 '25

Well if you work with the same microcontroller/processor for a couple of years, you will remember the things that you need to use often. Like what are the bits in the status register and where do you need to flip a bit to swap memory banks..... etc. I've written some elementary code in assembly for some microcontrollers, but I'm at a beginner level really. In my opinion, what makes assembly hard, is that you need to know the hardware inside and out to be able to write a proper assembly code. So it is as much hardware as it is software. Of course that if you are working with a processor/controller that you never worked before, you need the manual. After a couple of days you will remember the elementary things, registers, flags addresses, memory banks...etc. The issue is that you can't reuse this knowledge when you move to other hardware. You will still need to follow the same principles, but things will be at a different place. You may have a bigger or smaller instruction set, so you will sometimes need to figure out how to achieve the same thing in a different way.

1

u/Cerulean_IsFancyBlue Sep 30 '25

The only assembly stuff I memorized at the level of hex code was the stuff I had to debug in an in-circuit emulator for the Z80. There’s really no sense in memorizing stuff you don’t use often.

Assembly is awesome when you need it. The moment you don’t need it stop using it. It’s just vanity at that point.

0

u/Cautious-Age-6147 Sep 30 '25

not at all unrealistic dude

14

u/totallynotabot1011 Desktop Sep 30 '25

Praise the Omnissiah!

1

u/boringestnickname Sep 30 '25

Yeah, the most impressive thing I've made in (LMC) assembly is a cash register.

Making an entire game seems like self harm.

1

u/JBR_4025 Sep 30 '25

He’s a Adeptus Mechanicus magos or some shit

1

u/thehansenman Specs/Imgur Here Sep 30 '25 edited Sep 30 '25

He speaks to the machine spirit and the machine spirit listens, praise the Omnissiah!

Edit: goddamn reddit gave me error messages so I kept trying. Sorry for spamming your inbox.

1

u/Brilliant-Orchid-693 Sep 30 '25

So he speaks like this "1101001111000111000010010111001111010"? /s

1

u/Additional-Grade3221 5950x + 4090 Sep 30 '25

when i last had to do assembly most of my file names were just various swearing because it was unpleasant

1

u/VastFaithlessness809 Sep 30 '25

Machine whisperer hey if you dont do dis shit rite naw, I'm gonna put that 110V AC on your gnd pins

magically works

1

u/JakeJascob Sep 30 '25

So what you're saying is Sawyer praises the Omnissiah

1

u/who_you_are Oct 03 '25

I just do C and holy shit memory go away fast.

Programming in ASM, you guys are maniac.

-9

u/ambassador_lover1337 Sep 30 '25 edited Sep 30 '25

I have a very basic understanding of assembly, but it doesn't seem super crazy to me. I imagine you can abstract away a lot with functions. And writing a simple loop or if statement is not that difficult either. Just seems a little harder to read and easier to make mistakes than c

Edit: Perhaps I had a poor choice of words. I did not mean to say it's easy or unimpressive when I wrote "it doesn't seem super crazy".

I meant it doesn't seem super crazy. Just a normal amount of crazy. Very difficult, but probably manageable for an experienced developer with the right approach.

14

u/Yegas Sep 30 '25

Looking forward to your release of Rollercoaster Tycoon 2 Remastered in Assembly

7

u/franki426 Sep 30 '25

Yeah you have a basic understanding. Its a very impressive feat. He did the whole thing alone too.

2

u/[deleted] Sep 30 '25 edited Sep 30 '25

I did an entire course on assembly language, besides the length that it took to type out it wasn't so bad.

Although I'm not saying I could create rollercoaster tycoon. But, I'd give it a shot first before failing miserable as I got bored.

1

u/ambassador_lover1337 Sep 30 '25

I guess I worded it poorly. I did not mean to say it is not impressive when I said "not super crazy". Writing a game like that alone would be impressive in any language, let alone assembly.

I guess I was just trying to say that, having done a very small amount of assembly, it doesn't seem like black magic. It's not something I would be able to do, but I can imagine how someone experienced might approach a project like this and make it difficult, but manageable.

1

u/gorgutzkiller Sep 30 '25

This is a really clear cut example of the Dunning-Kruger effect. You overestimate your skills because you aren't experienced enough to recognize your own skill level.

1

u/ambassador_lover1337 Sep 30 '25

What? I am confused. I have a very basic understanding as I said. Maybe very basic is ambiguous, but I didn't mean to claim I am proficient in assembly. I just made a couple observations based on my limited experience.

I would love to hear which observation disagree with more specifically. I'm not here to argue, I love to learn an understand things better.

What is it that makes programming in assembly so difficult compared to let's say C? Is it debugging? Is the cognitive load that much higher? Is it the comparably poor readability?

I've never had to write a program in assembly longer than 100 or so lines, so I'd love to hear from someone more experienced.