• mtchristo@lemm.ee
    link
    fedilink
    English
    arrow-up
    5
    ·
    28 days ago

    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.

    • sushibowl@feddit.nl
      link
      fedilink
      English
      arrow-up
      5
      ·
      28 days ago

      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.

      • CrazyLikeGollum@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        edit-2
        28 days ago

        Is there not a way to take assembly and automatically translate it to some higher level language?

        Edit: Post-post thought: I guess that would basically be one step removed from decompilation which, as I understand it, is a tedious and still fairly manual process.

        • sushibowl@feddit.nl
          link
          fedilink
          English
          arrow-up
          0
          ·
          28 days ago

          Your thought is correct. The basic problem is that higher level languages contain a lot of additional information that is lost in the compilation process.

          • Saleh@feddit.org
            link
            fedilink
            English
            arrow-up
            0
            ·
            27 days ago

            But do we need this information then? E.g. shouldn’t it be possible to just write what the assembler is doing as a c++ code?

            E.g. high level languages also support stuff like bitwise operators and so on.

            • themoonisacheese@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              1
              ·
              25 days ago

              Take for example Haskell. It’s a functionnal, typed language. In Haskell, at compile time, the compiler analyzes all the types of all your functions and if they all match, it drops them completely. There is no type information at all left in a compiled Haskell program, because the compiler can know ahead of runtime if it is correct.

            • sushibowl@feddit.nl
              link
              fedilink
              English
              arrow-up
              1
              ·
              27 days ago

              You could, but there isn’t much benefit. The purpose of all that extra information is generally to make the program easier to understand for a human. The computer doesn’t need any of it, that’s why it’s not preserved in compilation. So it is possible to automatically translate assembly to C++, but the resulting program would not be much (if any) easier for a human to understand and work with.

              To give a bad analogy, imagine some driving directions: turn left at 9th street, enter the highway at ramp 36, go right when you’re past the burger king, etc. These are translated into physical control inputs by the driver to actually take the car to its destination. Now we could look at the driver’s physical inputs and turn that back into a written list of instructions: turn the wheel left 70 degrees, turn it right 70 degrees, push the gas for 10 seconds, and so on.

              All the street name references are now gone. There are no abstracted instructions like “enter the highway” or even “take the second left.” It would be quite difficult for a person to look at these instructions and figure out the trip’s destination. Let alone make some alterations to it because there is roadwork along the way and a detour is needed.

              • Saleh@feddit.org
                link
                fedilink
                English
                arrow-up
                0
                ·
                27 days ago

                I get that. But the game is “finished”. there is no need for alterations. translating the assembler code into c++ in this way could serve to quickly get it in a format that is then compileable for other platforms.

                • sushibowl@feddit.nl
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  27 days ago

                  But the game is “finished”. there is no need for alterations.

                  If only that was the case. But there is no chance a game built for windows 95 could run unaltered on an android phone. Things like the rendering systems, input handling, and sound output will need to be adapted to work on a new platform.

        • BigDanishGuy@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          27 days ago

          #include <iostream> // because writing to the console is not included by default.
          int main()
          {
          std::cout << "C++ is simple and fun ... you cretin\n";
          return 0;
          }

          I had a machine language course in uni, parallel with a C++ course. Not a fun semester to be my wife, or a relative of any of my classmates. Best case our brains were in C++ mode, worst case you needed an assembler to understand us.

          And yes I know my code format will piss people off, I don’t care, it’s the way I write when other less informed people don’t force me to conform to their BS “Teh oPeNiNg bracket shouwd bwee on teh sam line ass teh declawation

          Edit: added a \n for the sake of pedantry :)

        • Cethin@lemmy.zip
          link
          fedilink
          English
          arrow-up
          1
          ·
          28 days 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.

    • flashgnash@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      28 days ago

      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

      • lorty@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        27 days ago

        Survivor bias is a thing and part of the reason people are nostalgic for old media.

        • Lennny@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          27 days ago

          For every There Will Be Blood, there exists an Alien vs Predator: Requiem

      • bufalo1973@lemmy.ml
        link
        fedilink
        English
        arrow-up
        0
        ·
        28 days ago

        A fucking calculator needs megabytes to run? And I’m not talking about a full fledged graphic scientific calculator. I’m talking about a basic one.

        • flashgnash@lemm.ee
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          28 days ago

          Gnome calculator uses 103m, it’s loading style sheets for themes, UI libraries that make it look nice and modern, scientific calculator features, keyboard shortcuts, nice graphical settings menu, touch screen and screen reader support etc

          I don’t think in this day and age for all the niceties people are used to that’s unreasonable.

          Also other calculators are available, some are bloated but I’m sure there’s a rust or C one out there somewhere that uses a fraction of that with the bare minimum feature set

        • SynopsisTantilize@lemm.ee
          link
          fedilink
          English
          arrow-up
          0
          ·
          28 days ago

          Seconded. The only reason I have it installed is because my buddy refuses to answer his cell while we play games.

      • Peruvian_Skies@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        0
        ·
        edit-2
        27 days ago

        Old=good is a great mentality specifically when standing the test of time is an important factor. For the most part, the old code that’s still used today is only still used because it’s proven good, whereas it’s a grab bag with newer code. And that’s the cause of the unwarranted nostalgia thay you’re rightfully criticising.

        It’s like with music. “Oh, the X’s were the best decade for music, today’s music is garbage”. No, 90% of everything is crud but unless you’re an enthusiast, once enough time has passed, you’ll only ever be exposed to the 10% that isn’t. 50 years from now nobody is going to be listening to Cardi B.

        • psud@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          24 days ago

          I listen to music on a new music radio station - the good new music really stands out

          Most people just like the (better bits of) stuff they listened to when they were young

          • Peruvian_Skies@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            1
            ·
            24 days ago

            That isn’t the whole picture. I was born in 1988. The sampling of music from the 70’s that I’ve been exposed to is completely different to the sampling of music from the same period that someone born in '58 was exposed to in their lifetime. They got to listen to a bunch of bad stuff (and probably some great stuff) that I don’t even know exists.

  • Codex@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    24 days ago

    I don’t know exactly how much code reuse Sawyer had going back then, but if you’ve ever played Transport Tycoon (or more likely the open source version around today, OpenTTD) then you know that the interface and graphics are extremely similar. So it’s not like he started from scratch each game with nothing but a hot spinning disc and a magnetized needle.

    But yeah, the main reason to put up with all the modern framework bloat is the ever-ephemeral promise of being able to write your thing once and have it ported to run anywhere with minimal to no further effort.

      • addie@feddit.uk
        link
        fedilink
        English
        arrow-up
        2
        ·
        28 days ago

        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.

        • henfredemars@infosec.pub
          link
          fedilink
          English
          arrow-up
          1
          ·
          28 days 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.

  • lugal@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    28 days ago

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

        • ziggurat@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          28 days ago

          Like the classic, inherit a broken code base, and not being allowed by the owner to rewrite it from scratch. So you have to spend more time making each part work without the others working. Also before you are finished the customer says they have something else for you to do

          • jabjoe@feddit.uk
            link
            fedilink
            English
            arrow-up
            1
            ·
            27 days ago

            Programmers love to rewrite things, but it’s often not a good idea, let alone good for a business. Old code can be ugly because it is covered with horrible leasons and compromises. A rewrite can be the right thing, but it’s not to be taken lightly. It needs to be budgeted for, signed off on and carefully planned. The old system needs to stable enough to continue until the new system can replace it.

          • derpgon@programming.dev
            link
            fedilink
            English
            arrow-up
            0
            ·
            27 days ago

            That’s when you start introducing modules that have the least impact on the legacy code base. Messaging is a good place to start, but building a new code next to the existing one and slowly refactoring whenever you got time to spare is at least a bearable way to go about it.

            • drphungky@lemmy.world
              link
              fedilink
              English
              arrow-up
              0
              ·
              27 days ago

              Shhhh you just described iterative development. Careful not to be pro agile, or the developers with no social skills will start attacking you for being a scrum master in disguise!

              • derpgon@programming.dev
                link
                fedilink
                English
                arrow-up
                0
                ·
                27 days ago

                Fuck agile, or scrum, or whatever it is called. I just look at the issues and pick whatever I feel like doing. Kanban for life.

  • MonkeMischief@lemmy.today
    link
    fedilink
    English
    arrow-up
    1
    ·
    28 days ago

    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.

    • dai@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      28 days 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.

  • Wilzax@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    28 days ago

    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.

  • einlander@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    28 days 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

  • mlg@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    26 days ago

    I wanna see someone make a GPU accelerated game in assembly.

    Just throw the Vulkan and DX12 C APIs in the garbage and do it all yourself lol.

    • Capt. Wolf@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      28 days ago

      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.