this post was submitted on 17 Oct 2024
831 points (98.9% liked)

RetroGaming

19335 readers
1195 users here now

Vintage gaming community.

Rules:

  1. Be kind.
  2. No spam or soliciting for money.
  3. No racism or other bigotry allowed.
  4. Obviously nothing illegal.

If you see these please report them.

founded 1 year ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 10 points 1 hour ago (1 children)

If you’ve written 500k lines of code you were surely pretty confident about your decision.

[–] [email protected] 3 points 10 minutes ago

You sweet summer child...

[–] [email protected] 64 points 8 hours ago (1 children)

Roller coaster Tycoon is one of a lifetime game.

Now everything is electron or react shit. Gone are the times of downloading fully featured software under 10mb.

[–] [email protected] 13 points 7 hours ago (1 children)

But the modern OpenRCT, written in an actual language, is better in every way.

[–] [email protected] 18 points 5 hours ago

Probably not as optimized though.

RCT could run on a toaster from the 90's (ok, maybe early 2000's) and looked amazing for the time.

OpenRCT can run on a toaster from the 2010's and looks great because of the timeless art style of the original.

It's still an incredible feat, though!

[–] [email protected] 73 points 9 hours ago
  • Programming was never meant to be abstract so far from the hardware.
  • 640k is enough ram for everybody.
  • The come with names like rust, typescript, go, and python. Names thought up by imbeciles.
  • Dev environments, environmental variables, build and make scripts, and macros, from the minds of the utter deranged.

They have played us for fools

[–] [email protected] 38 points 8 hours ago (3 children)

try writing it it in Assembly

Small error, game crashes and takes whole PC with it burning a hole in the ground.

[–] [email protected] 20 points 8 hours ago

Just don't make any errors. Not one.

[–] [email protected] 9 points 7 hours ago

It dis-assembled the computer!

[–] [email protected] 6 points 8 hours ago

Back into the fiery pit of hell, where it belongs!

[–] [email protected] 20 points 8 hours ago (1 children)

petah please what's this mean

[–] [email protected] 46 points 8 hours ago (2 children)

The game Roller Coaster Tycoon was famously hand written in raw CPU instructions (called assembly language). It’s only one step removed from writing literal ones and zeros. Normally computers are programmed using a human-friendly language which is then “compiled” into CPU instructions so that the humans don’t have to deal with the tedium and complication of writing CPU instructions.

[–] [email protected] 5 points 41 minutes ago* (last edited 40 minutes ago) (1 children)

To further emphasize this, I had an assembly course in university. During my first lab, the instructor told us to add a comment explaining what every line of assembly code did, because if we didn't, we would forget what we wrote.

I listened to his advice, but one day I was in a rush, so I didn't leave comments. I swear, I looked away from the computer for like 2 minutes, looked back, and had no idea what I wrote. I basically had to redo my work.

It is not that much better than reading 1s and 0s. In fact in that course, we spent a lot of time converting 1s and 0s (by hand) to assembly and back. Got pretty good at it, would never even think of writing a game. I would literally rather create my own compiler and programming language than write a game in assembly.

[–] [email protected] 3 points 22 minutes ago (1 children)

I'm probably completely insane and deranged, but I actually like assembly. With decent reverse engineering software like Ghidra, it's not terribly difficult to understand the intent and operation of isolated functions.

Mnemonics for the amd64 AVX extensions can go the fuck right off a bridge, though. VCVTTPS2UQQ might as well be my hands rolling across a keyboard, not a truncated conversation from packed single precision floats into packed unsigned quadword integers.

[–] [email protected] 1 points 2 minutes ago

I had a course in uni that taught us assembler on z/os. My advisor told me most students fail the course on the first try because it was so tough and my Prof for that course said if any of us managed to get at least a B in the course, he'd write us a rec letter for graduate school. That course was the most difficult and most fun I've ever had. I learned how to properly use registers to store my values for calculations, I learned how to use subroutines. Earned myself that B and went on to take the follow up course which was COBOL. You're not crazy, I yearn to go back to doing low level programming, I'm mostly doing ruby for my job but I think my heart never left assembler hahaha

[–] [email protected] 16 points 7 hours ago (2 children)
[–] [email protected] 1 points 15 minutes ago

To send the point home even more, this is how in python you make a line of text display:

print("Hello World")

This is the same thing, in assembly (According to a blog I found. I can't read this. I am not build better.)

  org  0x100        ; .com files always start 256 bytes into the segment

    ; int 21h is going to want...

    mov  dx, msg      ; the address of or message in dx
    mov  ah, 9        ; ah=9 - "print string" sub-function
    int  0x21         ; call dos services

    mov  ah, 0x4c     ; "terminate program" sub-function
    int  0x21         ; call dos services

    msg  db 'Hello, World!', 0x0d, 0x0a, '$'   ; $-terminated message

But python turns that cute little line up top, into that mess at the bottom.

I like python. Python is cute. Anyone can read python.

[–] [email protected] 3 points 5 hours ago

Glory to you... abd your hoooouse!

[–] [email protected] 87 points 10 hours ago (1 children)

I love Roller Coaster Tycoon. It's absolutely crazy how he managed to write a game in a way many wouldn't even attempt even in those days, but it's not just a technical feat, it's a creative masterpiece that's still an absolute blast to play.

It still blows my mind how smoothly it gives the illusion of 3D and physics, yet it can run on almost anything.

OpenRCT brings a lot of quality of life and is often the recommended way to play today, but the original RCT will always deserve a spot on any "Best Games of All Time" list.

[–] [email protected] 5 points 7 hours ago

It was even ported to the original Xbox. I remember the total games file size being incredibly small - compared to most other titles on that system.

[–] [email protected] 92 points 11 hours ago (3 children)

Your game will actually likely be more efficient if written in C. The gcc compiler has become ridiculously optimized and probably knows more tricks than you do.

[–] [email protected] 14 points 8 hours ago (1 children)

Yep but not if you write sloppy C code. Gotta keep those nuts and bolts tight!

[–] [email protected] 12 points 4 hours ago (1 children)

If you're writing sloppy C code your assembly code probably won't work either

[–] [email protected] 3 points 1 hour ago

Except everyone writing C is writing sloppy C. It's like driving a car, there's always a non-zero chance of an accident.

Even worse, in C the compiler is just waiting for you to trip up so it can do something weird. Think the risk of UB is overblown? I found this article from Raymond Chen enlightening: https://devblogs.microsoft.com/oldnewthing/20140627-00/?p=633

[–] [email protected] 28 points 10 hours ago

Especially these days. Current-gen x86 architecture has all kinds of insane optimizations and special instruction sets that the Pentium I never had (e.g. SSE). You really do need a higher-level compiler at your back to make the most of it these days. And even then, there are cases where you have to resort to inline ASM or processor-specific intrinsics to optimize to the level that Roller Coaster Tycoon is/was. (original system specs)

load more comments (1 replies)
[–] [email protected] 109 points 12 hours ago (1 children)

I don't know if everyone gets the reference: RollerCoaster Tycoon is in fact writing mostly in assembly to use the hardware more efficiently

[–] [email protected] 51 points 11 hours ago (3 children)

It also makes it really portable which is a big part of why all the ports to modern systems are so close to the original. Obligatory OpenRCT2 shoutout.

[–] [email protected] 2 points 1 hour ago* (last edited 1 hour ago)

OpenRCT2 ditched assembly tho. They wrote it entirely in C++.

[–] [email protected] 20 points 7 hours ago* (last edited 7 hours ago) (1 children)

Writing it in assembly would make it pretty much the opposite of portable (not accounting for emulation), since you are directly giving instructions to a specific hardware and OS.

[–] [email protected] -1 points 3 hours ago (1 children)

Not necessarily, unless you’re working on something like an OS you’re not usually directly accessing/working on the hardware. As long as you can connect the asm up to your os/driver abstraction layer and the os to hardware apis work the game should be functional. Not to mention RCT targets the x86 assembler architecture which was one of the most popular at the time

[–] [email protected] 1 points 15 minutes ago

That's no less true than games written in C, or otherwise with few dependencies. Doom is way more portable than RCT precisely because it's written in C instead of assembly.

[–] [email protected] 17 points 10 hours ago (2 children)

Started playing openrct2 multiplayer with a friend yesterday. Some of the best fun I've had.

[–] [email protected] 5 points 6 hours ago (1 children)

My friend and I created MONORAIL LAND

[–] [email protected] 1 points 3 hours ago* (last edited 3 hours ago)

Does it have a scientist Batman?

[–] [email protected] 9 points 9 hours ago

Damn this post. This is really going to f up my weekend plans.

[–] [email protected] 50 points 11 hours ago (2 children)

I want to get off Mr. Bones' Wild Ride

[–] [email protected] 4 points 6 hours ago

I was looking for this comment. Brings back so many good memories of the early internet.

[–] [email protected] 8 points 8 hours ago

The ride never ends!

[–] [email protected] 123 points 13 hours ago (4 children)

To be fair, assembly lines of code are fairly short.

/ducks

load more comments (4 replies)
[–] [email protected] 24 points 11 hours ago (1 children)

They call me the Programmer and I speak to the metal,

Now check out this app, that really shows off my mettle!

load more comments (1 replies)
[–] [email protected] 47 points 13 hours ago (8 children)

Step 1: Begin writing in Assembly

Step 2: Write C

Step 3: Use C to write C#

Step 4: Implement Unity

Step 5: Write your game

Step 6: ???

Step 7: Profit

[–] [email protected] 25 points 11 hours ago

Step 6 extort developers

[–] [email protected] 27 points 11 hours ago
load more comments (6 replies)
[–] [email protected] 14 points 10 hours ago (1 children)

Not Assembly, but HROT was written in Pascal by one person and runs buttery smooth.

load more comments (1 replies)
load more comments
view more: next ›