So there are multiple sites&groups that pirate video games especially on PC. I was wondering if there are places on the internet where you find source code for games especially the highly modifiable ones like Half Life 2/Portal and Skyrim. Or groups that crack into the source code of games (or even software in general), not only for PC maybe PS, XBox or mobile too, and share it. I just wanted to see some code samples of games or their engines, maybe I get hooked into video game design. Shout out to Valve for sharing a lot about the creation of Half Life 1

  • X3I@lemmy.x3i.tech
    link
    fedilink
    English
    arrow-up
    75
    ·
    edit-2
    11 months ago

    Well, source code is not sth that you “crack”, you can only reverse engineer it (I think it was done with Doom, also OpenRA) or steal it from the company’s servers. The use for it is also rather niche, so the risk vs gains ratio is not attractive enough to feed dedicated websites. You can also look at fully open source games like 0AD and check out what they did!

    Edit: I stand corrected (thrice); Doom was indeed open-sourced, not reverse engineered. Thanks for pointing out!

    • CaptainBasculin@lemmy.ml
      link
      fedilink
      English
      arrow-up
      41
      ·
      11 months ago

      Doom was open sourced later. An example of a game that got reverse engineered just fine is Super Mario 64

      • datavoid@lemmy.ml
        link
        fedilink
        English
        arrow-up
        12
        arrow-down
        1
        ·
        11 months ago

        Or the time the people who made doom reverse engineered super mario 3 for PC, then turned it into commander keen after Nintendo was unimpressed.

        • scutiger@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          11 months ago

          It wasn’t quite reverse engineered. They found a hacky way to bypass hardware limitations and basically duplicated the game.

          • Goku@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            11 months ago

            Yeah but that was more of a “if we can’t beat 'em, join 'em” thing and I believe some, if not most of the modders don’t even use the official mappings and prefer the cracked version

      • sebinspace@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        11 months ago

        I need this to happen to Gran Turismo 4. Series has gone so far downhill since that entry…

      • Excrubulent@slrpnk.net
        link
        fedilink
        English
        arrow-up
        16
        ·
        edit-2
        11 months ago

        I was once at a talk by someone in that company and he straight up said that open sourcing it was a mistake. I assume because that meant they couldn’t sell us a thousand versions of it like Skyrim.

        No word of whether its ongoing popularity was at all caused by open sourcing it.

        • gaylord_fartmaster@lemmy.world
          link
          fedilink
          English
          arrow-up
          22
          ·
          11 months ago

          There’s no way going open source has done anything but help Doom. I guarantee they’ve made more money from people buying their old games for the WADs to play with source ports and mods than they’ve lost money to things like Freedoom.

          • gaylord_fartmaster@lemmy.world
            link
            fedilink
            English
            arrow-up
            4
            ·
            11 months ago

            The game and the engine are both open source. The game’s assets just aren’t freely available, so you still need an official WAD or an asset replacement pack like Freedoom.

    • mindbleach
      link
      fedilink
      English
      arrow-up
      25
      arrow-down
      1
      ·
      11 months ago

      Machine code tells you what it’s doing. Source code tells you why.

      • Draconic NEO@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        4
        ·
        11 months ago

        Only if they wrote why in it though, plenty of people (unfortunately myself included) fail or forget to add meaningful comments or they let their comments go stale when making changes by forgetting to update them (I do it a lot too), and some people also use horrible function names that don’t make any sense.

        So it only really applies to source code intended to be released where care was made to ensure it would be readable, it might not apply for source code never intended to be public, such as stolen, leaked, or posthumously released. In this case the only real benefit is that it can be recompiled on different architectures provided there isn’t a dependency issue preventing that.

        • lud@lemm.ee
          link
          fedilink
          English
          arrow-up
          1
          ·
          11 months ago

          Source code without comments is still way easier to read than machine code.

          And there are very likely comments anyways.

          Multiple Devs will work on the same code for years and of course they need or at least appreciate comments.

    • Draconic NEO@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 months ago

      But even if you can intuitively understand what the machine code is you’ll still need to convert it by hand back into something more portable, or to the machine code of another platform you might want to run it on. There’s not really an easy automated way to do that, even when playing dirty.

      That’s the hard part, getting it into a different form, such as from x86 to ARM or from 6502 RISC to x86.

  • Sylvartas@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    arrow-down
    2
    ·
    edit-2
    11 months ago

    I mean, if you want to see some games’ source code you don’t have to rely on piracy. As other people have already said, there are open source games, some developers of older games have officially released the source code (notably VVVVVV, doom, and also quake iirc), some devs have released important part of their source code (e g the entire inputs handling code of Celeste).

    Additionally, the vast majority of all Unreal Engine games’ engine code, including huge AAAs like Fortnite, is in Unreal Engine (duh), which is open source source-available.

        • PeachMan@lemmy.world
          link
          fedilink
          English
          arrow-up
          8
          arrow-down
          1
          ·
          11 months ago

          Right, but it’s best to call that “source available” so the pedants don’t crucify you 🙄

        • Draconic NEO@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          2
          ·
          11 months ago

          Yes there is indeed a difference, but for us it makes little to no difference. In the end what matters is that we have it without having to reverse engineer it, which is a slow and laborious process (even when you do it with dirty methods).

      • Sylvartas@lemmy.world
        link
        fedilink
        English
        arrow-up
        6
        arrow-down
        1
        ·
        edit-2
        11 months ago

        I knew I was gonna get this answer but still couldn’t be bothered to check the correct term so that’s on me.

        I think you’re technically right because the EULA specifies that you basically can’t use that code (or a modified version) outside of a licensed UE project, but outside of that it basically is. All the code can be read, the engine and/or its editor and all related tools can be compiled from the source, and you can make pull requests on the official repo.

        IIRC it is not actually open source because you can’t modify and/or repackage it without epic having their say in it (I think one of the licenses tiers is basically you agreeing to pay upfront + royalties for the authorization to modify the engine’s code and ship the packaged version with the project)