top 50 comments

sorted by: hot top controversial new old
[–] 179 points 2 years ago (1 child)

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

/ducks

  • source
  • hideshow 2 child comments
  • [–] 43 points 2 years ago (2 children)

    Back in the day we wrote everything in asm

  • source
  • parent
  • hideshow 3 child comments
  • [–] 54 points 2 years ago (1 child)

    Writing in ASM is not too bad provided that there's no operating system getting in the way. If you're on some old 8-bit microcomputer where you're free to read directly from the input buffers and write directly to the screen framebuffer, or if you're doing embedded where it's all memory-mapped IO anyway, then great. Very easy, makes a lot of sense. For games, that era basically ended with DOS, and VGA-compatible cards that you could just write bits to and have them appear on screen.

    Now, you have to display things on the screen by telling the graphics driver to do it, and so a lot of your assembly is just going to be arranging all of your data according to your platform's C calling convention and then making syscalls, plus other tedious-but-essential requirements like making sure the stack is aligned whenever you make a jump. You might as well write macros to do that since you'll be doing it a lot, and if you've written macros to do it then you might as well be using C instead, since most of C's keywords and syntax map very closely to the ASM that would be generated by macros.

    A shame - you do learn a lot by having to tell the computer exactly what you want it to do - but I couldn't recommend it for any non-trivial task any more. Maybe a wee bit of assembly here-and-there when you've some very specific data alignment or timing-sensitive requirement.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 20 points 2 years ago

    I like ASM because it can be delightfully simple, but it’s just not very productive especially in light of today’s tooling. In practice, I use it only when nothing else will do, such as for operating system task schedulers or hardware control. It’s nice to have the opportunity every once in a while to work on an embedded system with no OS but not something I get the chance to do very often.

    On one large ASM project I worked (an RTOS) it’s exactly as you described. You end up developing your own version of everything a C compiler could have done for you for free.

  • source
  • parent
  • load more comments (1 reply)
  • [–] 169 points 2 years ago (4 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.

  • source
  • hideshow 7 child comments
  • [–] 67 points 2 years ago (12 children)

    Fun quote from an interview with Chris Sawyer:

    Latterly the machine code came back to haunt us when the decision was made to re-launch the original game on mobile platforms as RollerCoaster Tycoon Classic a few years ago, and it took several years and a small team of programmers to re-write the entire game in C++. It actually took a lot longer to re-write the game in C++ than it took me to write the original machine code version 20 years earlier.

  • source
  • parent
  • hideshow 13 child comments
  • [–] 17 points 2 years ago (5 children)
  • [–] 17 points 2 years ago

    It's probably not because it's sucks. It's because they're trying to perfectly replicate an existing target. They have to read the assembly, digest it, then create the identical solution in C++. If they were just creating a new game, it likely would be much faster.

  • source
  • parent
  • load more comments (4 replies)
  • load more comments (11 replies)
  • [–] 31 points 2 years ago* (22 children)

    I don't think old=good is a good mentality though, lot of people seem to have it

    All the old software I know and use is exceptionally good, however I've heard about and chosen to use it because it's survived the test of time (also because it's still actively maintained and has had thousands of bug fixes over the years)

    Vscode and obsidian are pretty good and they're electron, discord's alright, pretty sure steam uses some kind of web wrapper as well.

    Real issue is electron is very accessible to inexperienced developers and easy to do badly, but I imagine people back in the old Unix days got an equal amount of shit bloated software

  • source
  • parent
  • hideshow 23 child comments
  • load more comments (21 replies)
  • [–] 26 points 2 years ago (1 child)

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

  • source
  • parent
  • hideshow 2 child comments
  • [–] 43 points 2 years ago (1 child)

    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!

  • source
  • parent
  • hideshow 2 child comments
  • load more comments (1 reply)
    [–] 157 points 2 years ago (1 child)

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

  • source
  • hideshow 2 child comments
  • [+] 60 points 2 years ago* (last edited 2 years ago) (5 children)
  • load more comments (3 replies)
  • [–] 145 points 2 years ago (2 children)
    • 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

  • source
  • hideshow 3 child comments
  • [–] 16 points 2 years ago (2 children)

    I dabbled with making a fairly complex program for a microcontroller the other day and quickly hit the stack limit for a simple object.

    It wasn't so much that it was a large object, but to provide flexibility I was amazed how fast I filled the memory.

    I've done heaps with memory managed languages in the past but shit as soon as I had to think about what I was doing under the hood everything got hard af.

    So serious question - does anyone have any good resources for a competent programmer, but with no clue whatsoever how to manage memory in a microcontroller space and avoid fragmentation etc?

    I got it to work but I'm sure I did shit job and want to be better at it.

  • source
  • parent
  • hideshow 2 child comments
  • load more comments (2 replies)
  • load more comments (1 reply)
    [+] 140 points 2 years ago (3 children)
  • [–] 47 points 2 years ago (8 children)

    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)

  • source
  • parent
  • hideshow 8 child comments
  • load more comments (8 replies)
  • load more comments (1 reply)
    [–] 130 points 2 years ago (1 child)

    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.

  • source
  • hideshow 2 child comments
  • [–] 91 points 2 years ago (1 child)

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

  • source
  • hideshow 2 child comments
  • [–] 50 points 2 years ago (1 child)
  • [–] 29 points 2 years ago* (last edited 2 years ago) (2 children)

    I’m a developer, I don’t just continue doing things for years if it doesn’t make sense.

    (If I’m the one making the decisions)

  • source
  • parent
  • hideshow 4 child comments
  • [–] 68 points 2 years ago (7 children)

    try writing it it in Assembly

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

  • source
  • hideshow 9 child comments
  • load more comments (5 replies)
    [–] 59 points 2 years ago (2 children)

    I want to get off Mr. Bones' Wild Ride

  • source
  • hideshow 2 child comments
  • load more comments (2 replies)
    [–] 50 points 2 years ago (9 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

  • source
  • hideshow 11 child comments
  • load more comments (7 replies)
    [–] 38 points 2 years ago (1 child)

    I mean, I'm pretty sure it would be a good learning experience so I would really not regret it.

  • source
  • hideshow 2 child comments
  • [–] 31 points 2 years ago (8 children)

    I tried decades ago. Grew up learning BASIC and then C, how hard could it be? For a 12 year old with no formal teacher and only books to go off of, it turns out, very. I've learned a lot of coding languages on my own since, but I still can't make heads or tales of assembly.

  • source
  • parent
  • hideshow 9 child comments
  • load more comments (7 replies)
  • [–] 28 points 2 years ago

    Shifts bit to the left

    Um what am I doing

    Shifts bit to the right

    program crashes

  • source
  • [–] 25 points 2 years ago (1 child)

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

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

  • source
  • hideshow 1 child comment
  • load more comments (1 reply)
    [–] 25 points 2 years ago (1 child)

    petah please what's this mean

  • source
  • hideshow 2 child comments
  • [–] 69 points 2 years 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.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 23 points 2 years ago* (4 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.

  • source
  • parent
  • hideshow 4 child comments
  • load more comments (4 replies)
  • [–] 19 points 2 years ago (1 child)
  • [–] 15 points 2 years ago (1 child)

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

  • source
  • hideshow 1 child comment
  • load more comments (1 reply)
    load more comments
    view more: next ›