Reverse Engineering a Classic Video Game (BioForge)

Sdílet
Vložit
  • čas přidán 21. 07. 2024
  • Reverse engineering can be a great tool to learn something new. Pulling apart the code of more advanced developers is the way most of us learn to code in the first place. But what if you don’t have the original source code? Challenge accepted!
    In this session, you will learn basic tools and techniques to reverse engineer a piece of software using a worked example. It will be a nostalgic trip, as we break down my favourite mid-90s MS-DOS game - BioForge (by Origin Systems) - and piece it back together again in C#. We’ll combine computer science fundamentals, curiosity, and a hex editor to learn about file structures, compression, graphics, audio and more. We’ll also cover debugging skills and ideas to make your own software more resistant to reverse engineering.
    OpenBioforge is an open-source recreation of the BioForge game engine which I am actively developing. Check out more information and updates at:
    openbioforge.com
    x.com/openbioforge
    mastodon.gamedev.place/@openb...
    This is a re-recording of my NDC Oslo 2020 talk and is an updated version of my NDC Sydney 2019 talk of the same name.
    0:00 Project background
    2:36 BioForge overview
    7:13 Getting started
    14:46 Fonts
    34:26 Sounds and music
    43:20 Cameras
    50:49 Scripts
    53:12 Putting it all together
  • Hry

Komentáře • 117

  • @VintageTechNerd
    @VintageTechNerd Před 7 měsíci +4

    Bioforge was amazing. I saved many months worth of mowing lawns to get my copy as a teen

    • @timcomport
      @timcomport  Před 7 měsíci

      💯 I remember waiting for it to release after playing the demo felt like an eternity! 🙂

  • @DanteLovecraft
    @DanteLovecraft Před 2 měsíci +4

    I just discovered this project. Thanks for the effort, I'm looking forward to compiling the code and seeing this amazing video game on my Linux operating system.

  • @costascostas1760
    @costascostas1760 Před 9 měsíci +3

    I am no coder, and I only found this cause I was looking for a Bioforge remake, but I really loved your presentation! Really nice to see how much brain effort goes behind the whole process, makes one appreciate your efforts even more!

    • @timcomport
      @timcomport  Před 9 měsíci +2

      Thanks for your kind words @costascostas1760! 😊A modern BioForge remake would be amazing. In the meantime, I'm continuing to 'forge' ahead on the original engine recreation and posting updates at x.com/openbioforge if you're interested.

  • @J95Sim
    @J95Sim Před 10 měsíci +3

    BioForge was the first computer game I ever played. The 16 - bit graphics were atmospheric, and at times utterly terrifying. The scene with the dinosaur falling into the lava was staggeringly cinematic. And then the music was on another level. Sincerely can't believe that It doesn't seem to get much attention as a classic release - so excited to see a modern developer taking it on!

    • @timcomport
      @timcomport  Před 10 měsíci

      BioForge is definitely a classic! Thanks for sharing @J95Sim 🙂

  • @hank9267
    @hank9267 Před 6 měsíci +4

    This is so cool! This game use to terrify me when I was a kid. But as an adult dev, I can truly appreciate the tech advances and systems they developed and incorporated. I'm curious if reverse engineering allows modification, just as swapping out the .cam files for higher resolution images and etc.

    • @timcomport
      @timcomport  Před 6 měsíci +2

      Agree 💯! 🙂 Many talented individuals behind BioForge. I’m keen to share more once OpenBioForge development isn’t consuming all of my spare time. There are many opportunities for modding. For example, OpenBioForge transpiles the BioForge scripts using C# as an intermediate language. This enables many possibilities, as BioForge is heavily script-based. Also, check out some of my experiments with upscaling in the OpenBioForge socials on X or Mastodon.

  • @chronokoks
    @chronokoks Před 2 lety +8

    Nice, I think fun would be to reverse-engineer Ecstatica :) The custom rendering engine used for static backgrounds (which won't be part of reverse-engineering) had some breakthrough features at that time - it's the first I believe renderer that used a sort of specific (not a part of a greater path-tracing/radiosity) or etc but its own specific ambient-occlusion mechanism.

    • @Pridetoons
      @Pridetoons Před rokem +3

      Wow I was just looking at this Video to see how hard it would be to Reverse-Engineer Ecstatica. 😅

  • @VoidloniXaarii
    @VoidloniXaarii Před 7 měsíci +5

    Thank u so much for this wonderful analysis

    • @timcomport
      @timcomport  Před 7 měsíci +2

      Thanks @VoidloniXaarii 😊

  • @MrTheSaxon
    @MrTheSaxon Před 8 měsíci +4

    Awesome video! As someone who is currently working on an program to render and replace Super Smash Bros. Melee characters in the .iso file, it's so cool to see how you reverse engineered some of these things! There's something special about discovering the intricate details of your favorite game, and I could tell you really love this game based on your smiles and reactions. Best of luck on the rest of the engine!

    • @timcomport
      @timcomport  Před 8 měsíci +1

      Thanks @MrTheSaxon ! Good luck with the Super Smash Bros. Melee characters! 😊

  • @khatdubell
    @khatdubell Před 6 měsíci +5

    I hear this guy programs by capturing individual electrons one at a time to represent a 1 bit.

  • @VoidloniXaarii
    @VoidloniXaarii Před 7 měsíci +4

    Thank you so much! This game blew my mind.. so so so much

    • @timcomport
      @timcomport  Před 7 měsíci +2

      Thanks for watching and commenting @VoidloniXaarii! 🙂

  • @michaelalbertsen6396
    @michaelalbertsen6396 Před rokem +3

    One of my favorite games from back in the day :)

  • @striderwhite5197
    @striderwhite5197 Před rokem +2

    I never thought trying to make sense of a font file format could be so interesting, nice work!

  • @crazydescent
    @crazydescent Před rokem +1

    Awesome to see this deep-dive into one of my favorite games from the dos era

    • @timcomport
      @timcomport  Před rokem

      Happy to hear from another BioForge fan, Thanks @crazydescent!

  • @jimmy21584
    @jimmy21584 Před 4 měsíci +2

    When I first saw this game, I remember not realising that I was playing a game for about a minute, because the graphics were so good. In hindsight, it was probably helped by the cutscenes and game being done through the same system. But stunning graphics for the time, for sure.

    • @timcomport
      @timcomport  Před 4 měsíci +1

      Love the nostalgia! 🙂 BioForge's graphics were groundbreaking for blending cutscenes and gameplay so seamlessly. It's amazing how immersive it felt at the time.

    • @Adam-fl9uc
      @Adam-fl9uc Před 3 měsíci +1

      haha exactly people had the same experiences when they played alone in the dark 1

  • @blaedmon
    @blaedmon Před 2 měsíci +2

    This is one of the first PC games I ever played as a kid, and pretty much solidified me as a PC gamer till this day. The nostalgia is melancholy, but an AI remaster would bring this back into todays gamers - I'd imagine a massive amount of work would be needed tho ;) Fantastic job!

  • @Dr._S_Brule
    @Dr._S_Brule Před rokem +3

    This video should have a lot more views!

  • @hashinger
    @hashinger Před 2 lety +4

    Hi Tim.
    This is a great job. Once upon a time, 14 years ago, we talked about Bioforge. I still made a video, but everything stopped. And of course, version b1.14 has not disappeared from the Internet, in which the editor and debugger of the game is built. I still do not understand how this version leaked and Origin. There is a video of Bioforge Plus on CZcams. What a pity that the source code of this game will never be released. I'm waiting for the second part.

    • @timcomport
      @timcomport  Před 2 lety +2

      I remember! So much nostalgia, awesome! 😀 I'm having great fun working on this again after so many years. It's all coming together, and I'm looking forward to sharing it with all the BioForge fans. Keep in touch 👍

    • @jackal3311
      @jackal3311 Před rokem

      thanks :D

  • @lordmuaddib
    @lordmuaddib Před rokem

    amazing stuff, everyone always boosts the reverse engeneering of executables, but in a way, the understanding of custom assets is even more challenging.
    compilers' workings are understood and if you have the correct way to read it.. it can be relatively easy and automated, of course the challenge there is more to render it readable and usable to work on later. for assets you really have to dig in and have luck in finding patters similar to data types of the era. so kudos, keep em coming!

    • @timcomport
      @timcomport  Před rokem

      Spot on, thanks for your comment lordmuaddib!

  • @Nobbie248
    @Nobbie248 Před rokem +2

    This is incredible. Probably the most interesting topic rn for me trying to find more videos like this

    • @timcomport
      @timcomport  Před rokem +1

      Glad you enjoyed!

    • @tutoriais5266
      @tutoriais5266 Před rokem +1

      @@timcomport Man, why did you stop posting videos???????? Please comeback

    • @timcomport
      @timcomport  Před rokem +1

      @@tutoriais5266 Still busy and posting progress updates to the Twitter account @OpenBioForge. I should post them here as shorts too.

  • @MarcsVlogVids
    @MarcsVlogVids Před rokem +2

    I have this game.
    It came out before Resident Evil 1 , and had similar game mechanics, 3rd person, rendered backgrounds, and fixed camera angles.
    Other games that did something similar are Dino Crisis, Final Fantasy 7, Resident Evil 2 and 3, Onimusha, Alone in the Dark, Fatal Frame, Siberia, and Until Dawn

    • @timcomport
      @timcomport  Před rokem

      Nice! Thanks for watching Marc 🙂

  • @kanishk7267
    @kanishk7267 Před rokem +2

    Inspiring and brilliant work.

  • @lethal_guitar
    @lethal_guitar Před rokem +1

    Really enjoyed this presentation, and great work on the RE effort! I actually spent some time looking into the game's file formats myself a while ago, but didn't get very far. It's a great game, and very deserving of getting the RE engine treatment 🙂 Keep up the great work! Looking forward to see more of your project in the future!

    • @timcomport
      @timcomport  Před rokem +1

      Nice. Thanks for watching and commenting! 🙂

    • @tahargermanni6205
      @tahargermanni6205 Před rokem

      @@timcomport Hi Tim , could you please help me to bypass the registry of the app that the manufacturer of this software is not existing anymore

  • @Bobygon95
    @Bobygon95 Před 4 měsíci +1

    Look like lots fun back in the day I miss that video games was classic and simple. BTW cool cover art

    • @timcomport
      @timcomport  Před 4 měsíci +1

      The cover art is awesome 👍

  • @evildiesel1709
    @evildiesel1709 Před 10 měsíci +2

    Thanks so much for this video. I can't wait to watch it...but I thought I should play a bit of the game before I spoil it. I will hold my hands up, I never heard of it until today and I was a huge DOS gamer in the past. Well as big as I could have been with no money and no internet! Looking forward to it and other videos that you might be doing too.

    • @timcomport
      @timcomport  Před 10 měsíci

      Thanks for the comment @evildiesel1709! It would be interesting to play BioForge for the first time through a modern lens. As a kid, the biggest draw for me was the sense of accomplishment upon solving each "puzzle" (similar to an escape room). I had no access to solutions/walkthroughs, so I remember getting 'stuck' for multiple play sessions. I will continue to post progress updates for OpenBioForge at x.com/openbioforge.

    • @evildiesel1709
      @evildiesel1709 Před 10 měsíci +1

      @@timcomport I know exactly what you mean. I have played Terraria to death these days. Am so jealous of people playing it for the first time😄. I'll definitely keep an eye on openbioforge

  • @redrum3r
    @redrum3r Před 9 měsíci +1

    It's a strange aside, but one part of Bioforge that is often unremembered is how great the writing was in the official strategy guide. It's all from the perspective of a researcher that uploaded themselves into a planet sized computer then transfers into your brain. A quick search finds a full copy in the internet archive, as a kid I may have spent more time reading that book then playing the game!

    • @timcomport
      @timcomport  Před 9 měsíci

      💯 The lore of BioForge has great depth. The strategy guide is happily in my collection: x.com/openbioforge/status/1662682043812302853 🙂

  • @maxfrischdev
    @maxfrischdev Před 8 měsíci +2

    It was fascinating to watch you do magic!
    I am able to code using python, I can create simple games with pygame without any tutorial or other resources, aside from occasional light "googling", but that almost looked like deciphering chinese symbols to me 😂😅
    Really really great calm way of describing the "what" and "why"!

    • @timcomport
      @timcomport  Před 8 měsíci

      Thank you for your kind words @CrypticX1! 🙂

  • @Isaiah-iu6rx
    @Isaiah-iu6rx Před 9 měsíci +2

    this video is great. im currently doing a video of me learning to reverse engineer. i'm just getting started on Pocket Tanks by Blitwise!

    • @timcomport
      @timcomport  Před 9 měsíci +1

      Thanks for the feedback @Isaiah-iu6rx! Best of luck with the video / project. I’ll keep an eye out for it.

  • @Thrakus
    @Thrakus Před rokem +2

    we need a remake

  • @noahsomeone1105
    @noahsomeone1105 Před rokem +1

    Excellent video, thanks for your help. Could you make a similar video but this time for a kind of old game called Dishonored? It's one of my favourites and would really like to see a tutorial of sort.

    • @timcomport
      @timcomport  Před rokem

      Thanks Noah, I would love to, but all of my spare time is going into OpenBioForge right now.

  • @jackal3311
    @jackal3311 Před 11 měsíci +2

    this is great thanks

  • @StevenHokins
    @StevenHokins Před rokem +1

    Awesome!

  • @chenyiyanginfo
    @chenyiyanginfo Před rokem +1

    Great work, sir! You revived my childhood memories. Could you make a reverse engineering of Dino Crisis series when you are available?

    • @timcomport
      @timcomport  Před rokem +1

      Thanks Yiyang! I still have some way to go on BioForge so I haven't given much thought to future projects yet.

    • @chenyiyanginfo
      @chenyiyanginfo Před rokem +1

      @@timcomport Good luck! I even imagined exporting the models from old games to make a local VR game in cellphone. But original assets in art are of a large quantity, and it's a problem for me to get the original assets in AI using inverse engineering... Best regards!

  • @LiamsMusic78
    @LiamsMusic78 Před rokem +1

    16:01 important reversing hint

  • @Mobay18
    @Mobay18 Před rokem +2

    Wow impressive work. I wonder what copy of Bioforge you have, because the main menu music sounds like a lesser bit rate version than the one I used to play.

    • @timcomport
      @timcomport  Před rokem

      Thanks for the feedback 🙂 The BioForge music is MIDI, and here I have used the default Windows gm.dls sound font which doesn’t have good fidelity. I’ve since started using a much nicer open-source sound font (this will also be configurable so you can BYO sound font).

  • @Narblo
    @Narblo Před rokem +1

    I am trying to make sense of a binary format that seems to store material properties and model information (vertices, uv, normals, etc) but cant figure it out. PURE(2008) is the game

    • @timcomport
      @timcomport  Před rokem

      Sounds like a fun project! I hope you are able to keep chipping away at it Narblo, good luck!

  • @FlamespeedyAMV
    @FlamespeedyAMV Před rokem +1

    Wish someone could do this for Toy Story 2 ps1/pc game

  • @pvt.skyden8200
    @pvt.skyden8200 Před 4 měsíci +1

    how can i learn more about hex and reverse engineering? computer science books?

    • @timcomport
      @timcomport  Před 4 měsíci +1

      IMHO it is important to have a solid understanding of the fundamentals, which computer science books, courses, and videos can provide. Depending on the type and age of the software you are targeting there are also many great communities and blogs that can prove invaluable.

  • @dclxviclan
    @dclxviclan Před rokem +1

    Awes0me

  • @LukeAvedon
    @LukeAvedon Před 7 měsíci +2

    WOW - I'm only going to use a hex dump and a calculator! wow wow wow

  • @Adam-fl9uc
    @Adam-fl9uc Před 3 měsíci +2

    I wonder if anyone can use the AI to upscale this game to full hd or 4k today as this would be a great game to work a remaster with improved combat

    • @timcomport
      @timcomport  Před 3 měsíci +2

      Working on it 🙂 Updates can be found on the OpenBioForge socials (X - x.com/openbioforge and Mastodon - mastodon.gamedev.place/@openbioforge). Check out some of the AI upscaling experiments in this post x.com/openbioforge/status/1733683337829700078 (although my main focus right now is completing the engine).

    • @SirChristian100
      @SirChristian100 Před 2 měsíci +1

      @@timcomport Godspeed to you!!

  • @gredagerda8443
    @gredagerda8443 Před 6 měsíci +2

    bro figured it out just using the hex dump. my clown ass still using IDA 😭 😭

    • @timcomport
      @timcomport  Před 6 měsíci

      Hey @gredagerda8443! 😂 IDA is great - can't deny that! Thanks for commenting 🙂 👍

  • @gnrtx-36969
    @gnrtx-36969 Před rokem +1

    Is it possible like port a game from pc to PS3/ps4? Idk anything about reverse engineering

    • @timcomport
      @timcomport  Před rokem +1

      I am developing OpenBioForge so it can be easily ported to other platforms, but Windows will come first. Thanks for watching! 🙂

    • @gnrtx-36969
      @gnrtx-36969 Před rokem

      @@timcomport is it also gonna run well like most of the games on pc supports direct x which is not present on PlayStation?

    • @timcomport
      @timcomport  Před rokem

      @@gnrtx-36969 There are no exotic dependencies, just FMOD and OpenGL (with simple abstractions), so it should be possible to port to any platform.

    • @gnrtx-36969
      @gnrtx-36969 Před rokem

      @@timcomport interesting

  • @dmbfm
    @dmbfm Před 8 měsíci

    Any updates on this project?

    • @timcomport
      @timcomport  Před 8 měsíci +1

      Coincidentally I just posted another update! See x.com/openbioforge or @openbioforge@mastodon.gamedev.place. I hope to get around to uploading something more long-form to CZcams in the future.

    • @dmbfm
      @dmbfm Před 8 měsíci +1

      Awesome! It's looking pretty good! @@timcomport

    • @MistereXMachina
      @MistereXMachina Před 7 měsíci +1

      @@timcomport I'm a complete beginner in programming, which is to say nothing of decompiling/reverse engineering. I'm trying to decompile a PS1-era game, and this has been nothing short of illuminating. I realize that this is a multi-decade journey for me, and I'm taking it slowly, but consistently, and I could sit and learn from you explaining navigating hex for hours, seriously. If you're able, I would even consider streaming, because this is solid gold and extremely hard to find anywhere else online. I'm learning MIPS ASM for the PS1 hardware, and I'd like to make a program to extract all the models/animations/sprites/audio from the game, and potentially even create the source code from ASM/C to C++ to use in something like unreal engine or something like that. The more education and information, the better! Thank you for this, instant sub!

    • @timcomport
      @timcomport  Před 7 měsíci +1

      Thanks @@MistereXMachina, great to hear! All the best with your project, it sounds like fun! 🙂

  • @nangld
    @nangld Před rokem

    ChatGPT can actually produce C99 code out of the raw x86 bytecode, without even touching the disassembly stage. That works because byte code instructions are linear. It can also refactor output from HexRays and Ghidra, recovering variable names.

    • @easyerthanyouthink
      @easyerthanyouthink Před rokem +1

      thats amazing, but i still like using my brain, but maybe some day in future i will try

    • @verminology9999
      @verminology9999 Před 11 měsíci

      Could you expand on what you mean here? Sounds cool.

  • @chronokoks
    @chronokoks Před 2 lety

    6:12 - Alone in the Dark (1992) had texture mapped skinned characters before Bioforge. You have to look closely but there are some textures visible with the flat shaded characters.

    • @timcomport
      @timcomport  Před 2 lety

      Key to the “synthetic actors” in BioForge was quaternion-based skeletal animation and live-actor motion capture.

    • @chronokoks
      @chronokoks Před 2 lety

      @@timcomport that's not how it's stated in the video.

    • @timcomport
      @timcomport  Před 2 lety +1

      ​@@chronokoks Yes, in hindsight, I was a little cavalier with the term "synthetic actors" in reference to S.A.L.S.A. (System for Animating Life-like Synthetic Actors). The first fully 3D texture-mapped characters (incl. damage) with interchangeable skeletons, animations, etc; this topic deserves an hour alone. If you're interested, I highly recommend this gem czcams.com/video/0MguK3PtjFA/video.html and this Arcade Attack interview with Starr Long has some great insights czcams.com/video/TFJ3M7iweSc/video.html Thanks for your feedback 🙂

    • @parkerplatt7201
      @parkerplatt7201 Před 2 lety +1

      Actually, Alone in the Dark (1992) does not use textures in the same way you might expect it to. If you use a hex editor and open up the model files from the games PAK files, you will find that there is no data that references UV coordinates. Rather, polygons are referred to by a specific index, which makes it render the way it does according to the game's engine, such as: colored, translucent, dithered, and gradient styles. Frederick Raynal (a French video game designer and ultimately the "godfather" of the survival horror genre) wrote the tools required to make AITD possible at the time. Fred hosted a GDC back in 2012 where he talked about this.
      Check out the following URL: czcams.com/video/c2lgEyNaop4/video.html
      He described his "textures" as "materials with a little bit of variety". The polygons that did use dithering and gradients were more like camera-to-screen-space conversions to give the illusion of UV mapped polygons. There's a Unity project you can find online that allows you to open the rooms and models and even link your DOS game to it.
      Also check out the following URL: github.com/tigrouind/AITD-roomviewer
      The reason I bring this up is that it allows you to view the source code for it. If you look at where the models are being loaded, they don't really have UVs - Unity (just like in the original game itself) gives the illusion of UV mapped polygons. I also know this from personal experience because I've wrote my own model exporter for the game in Blender Python, and the "textures" are referred to by polygon indices - not UV coordinates... Just thought I'd mention that.

    • @maximisatwat
      @maximisatwat Před rokem

      No textures in Alone in the Dark. It used shaders very occasionally that gave an impression of 'grain' like on doors, but that isn't texture mapping. They weren't 3D textures.
      System shock was a 3d texture mapped game before most others, even Quake. Bioforge was not ahead of those, 3d texture mapping alerady existed, but they were first in the fixed-camera puzzle genre to use texture mapping 3D. The motion capture and texture mapping and cinema-like feel all combine were what set it apart. Resident Evil had similar components later.

  • @Entertainment-jv8xw
    @Entertainment-jv8xw Před 6 měsíci +2

    I reversed engineered my softwear now I am in prision

  • @TheRealOAFs
    @TheRealOAFs Před rokem

    Could you do this to Toy Story 2 Pc version

    • @timcomport
      @timcomport  Před rokem +1

      My focus right now is OpenBioForge, but thanks for watching! 😊

  • @Kenbomp
    @Kenbomp Před rokem

    010 editor ida pro , texture atlas,

  • @maximisatwat
    @maximisatwat Před rokem +1

    Okay, but this is literally about all the stuff you least want to see.
    The bit everyone wants to see is the 3D models and their animations

    • @timcomport
      @timcomport  Před rokem

      Thanks for the comment Tim 🙂 I hope to record some more content without the constraints of a 1 hour conference talk in the future.

  • @batuhanbatuhan4131
    @batuhanbatuhan4131 Před rokem +2

    Does God whisper these things to you like prophets receive revelations? I mean not only you but all the people who just plays and fiddles with these things with perfect ease and they reverse software like it is nothing. You see some change in data pattern and then you decipher the address value of that change at the beginning of the data which you also miraculously know is encoded little endian. It really fascinates me how some people grab these subjects from just anywhere and slaughter it while I desperately search for the monster's head to behead it. Where to even begin. It makes no sense but your kind do it. Just like that.

    • @timcomport
      @timcomport  Před rokem +6

      Thanks for the comment Bathuhan! I have had similar feedback from others along the lines of "you make it look too easy". Rest assured, what you see here is just a snapshot of hundreds of hours of research and study. So, no miracles here, just a healthy obsession and lots of time.

  • @sleazel
    @sleazel Před 2 měsíci +2

    Please fix the combat. Or at least auto aim.

    • @timcomport
      @timcomport  Před 2 měsíci +1

      Combat could definitely be better. I will look at what can be done whilst staying true to the original.

  • @superfuckedupgod
    @superfuckedupgod Před 10 měsíci

    Thanks for showing that not to doing reverse engineering 😂

  • @guitarboss69420
    @guitarboss69420 Před rokem +1

    Real talk, can chatgpt reverse engineer software for you

    • @timcomport
      @timcomport  Před rokem +1

      I do use ChatGPT to help explore ideas. It’s like another tool in the toolbox! 👍