Reverse Engineering a Classic Video Game (BioForge)
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
Bioforge was amazing. I saved many months worth of mowing lawns to get my copy as a teen
💯 I remember waiting for it to release after playing the demo felt like an eternity! 🙂
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.
Thanks @DanteLovecraft!
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!
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.
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!
BioForge is definitely a classic! Thanks for sharing @J95Sim 🙂
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.
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.
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.
Wow I was just looking at this Video to see how hard it would be to Reverse-Engineer Ecstatica. 😅
Thank u so much for this wonderful analysis
Thanks @VoidloniXaarii 😊
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!
Thanks @MrTheSaxon ! Good luck with the Super Smash Bros. Melee characters! 😊
I hear this guy programs by capturing individual electrons one at a time to represent a 1 bit.
😂
Thank you so much! This game blew my mind.. so so so much
Thanks for watching and commenting @VoidloniXaarii! 🙂
One of my favorite games from back in the day :)
I never thought trying to make sense of a font file format could be so interesting, nice work!
Thanks for the feedback 🙂
Awesome to see this deep-dive into one of my favorite games from the dos era
Happy to hear from another BioForge fan, Thanks @crazydescent!
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.
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.
haha exactly people had the same experiences when they played alone in the dark 1
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!
Thanks @blaedmon!
This video should have a lot more views!
Thank-you Dr. S Brule! 😊
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.
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 👍
thanks :D
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!
Spot on, thanks for your comment lordmuaddib!
This is incredible. Probably the most interesting topic rn for me trying to find more videos like this
Glad you enjoyed!
@@timcomport Man, why did you stop posting videos???????? Please comeback
@@tutoriais5266 Still busy and posting progress updates to the Twitter account @OpenBioForge. I should post them here as shorts too.
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
Nice! Thanks for watching Marc 🙂
Inspiring and brilliant work.
Thanks kanishk7267! 🙂
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!
Nice. Thanks for watching and commenting! 🙂
@@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
Look like lots fun back in the day I miss that video games was classic and simple. BTW cool cover art
The cover art is awesome 👍
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.
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.
@@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
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!
💯 The lore of BioForge has great depth. The strategy guide is happily in my collection: x.com/openbioforge/status/1662682043812302853 🙂
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"!
Thank you for your kind words @CrypticX1! 🙂
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!
Thanks for the feedback @Isaiah-iu6rx! Best of luck with the video / project. I’ll keep an eye out for it.
we need a remake
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.
Thanks Noah, I would love to, but all of my spare time is going into OpenBioForge right now.
this is great thanks
Thanks @jackal3311 🙂
Awesome!
Thanks Steve!
Great work, sir! You revived my childhood memories. Could you make a reverse engineering of Dino Crisis series when you are available?
Thanks Yiyang! I still have some way to go on BioForge so I haven't given much thought to future projects yet.
@@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!
16:01 important reversing hint
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.
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).
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
Sounds like a fun project! I hope you are able to keep chipping away at it Narblo, good luck!
Wish someone could do this for Toy Story 2 ps1/pc game
how can i learn more about hex and reverse engineering? computer science books?
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.
Awes0me
WOW - I'm only going to use a hex dump and a calculator! wow wow wow
Thanks @LukeAvedon!
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
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).
@@timcomport Godspeed to you!!
bro figured it out just using the hex dump. my clown ass still using IDA 😭 😭
Hey @gredagerda8443! 😂 IDA is great - can't deny that! Thanks for commenting 🙂 👍
Is it possible like port a game from pc to PS3/ps4? Idk anything about reverse engineering
I am developing OpenBioForge so it can be easily ported to other platforms, but Windows will come first. Thanks for watching! 🙂
@@timcomport is it also gonna run well like most of the games on pc supports direct x which is not present on PlayStation?
@@gnrtx-36969 There are no exotic dependencies, just FMOD and OpenGL (with simple abstractions), so it should be possible to port to any platform.
@@timcomport interesting
Any updates on this project?
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.
Awesome! It's looking pretty good! @@timcomport
@@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!
Thanks @@MistereXMachina, great to hear! All the best with your project, it sounds like fun! 🙂
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.
thats amazing, but i still like using my brain, but maybe some day in future i will try
Could you expand on what you mean here? Sounds cool.
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.
Key to the “synthetic actors” in BioForge was quaternion-based skeletal animation and live-actor motion capture.
@@timcomport that's not how it's stated in the video.
@@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 🙂
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.
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.
I reversed engineered my softwear now I am in prision
Could you do this to Toy Story 2 Pc version
My focus right now is OpenBioForge, but thanks for watching! 😊
010 editor ida pro , texture atlas,
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
Thanks for the comment Tim 🙂 I hope to record some more content without the constraints of a 1 hour conference talk in the future.
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.
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.
Please fix the combat. Or at least auto aim.
Combat could definitely be better. I will look at what can be done whilst staying true to the original.
Thanks for showing that not to doing reverse engineering 😂
Real talk, can chatgpt reverse engineer software for you
I do use ChatGPT to help explore ideas. It’s like another tool in the toolbox! 👍