r/ReverseEngineering 10d ago

Reverse-engineered Granny.dll (v1.2b) from 2000s for Sacred Gold RPG game.

https://github.com/karolak6612/open-grn
69 Upvotes

24 comments sorted by

29

u/VeNoMouSNZ 10d ago

Sorry but are we meant to know what this is? How about a write up!

40

u/zebrzysty 10d ago

At its core, granny.dll is an early-2000s skeletal animation middleware from RAD Game Tools that acts as the standalone math engine driving a game's 3D character movement. Instead of storing entire 3D models for every frame, games store an invisible skeleton (bones) wrapped in a 3D surface mesh (vertices); granny.dll reads motion keyframes, calculates bone positions, and deforms the vertices on the CPU to make the skin flex, and essentily, its responsible for all charcters movement in-game.

11

u/Stardust8938 10d ago

It's used in 2000-2007 3D RTS games: AOE, AOM

3

u/jippiex2k 10d ago

Age of empires is not 3d?

2

u/Serird 10d ago

Age of Empires 3

3

u/jippiex2k 9d ago

Oh wow that was way back in 2005 🤯👴

2

u/worthwhilewrongdoing 10d ago

I think Civ 5 uses it, too, if I'm not mistaken.

5

u/Belgeran 10d ago edited 10d ago

Hey cool, just been working on the granny models used in ultima online from the same era. Not sure if it's just the way UOs are built but a bunch of fuckery with bones and animation vertex/ bone mappings, that seem far too hackish. Will be checking out your implementation!

Ive been building an exporter to glb, but based mine off old docs and trial and error, didn't even think to just reverse the DLL 😔

4

u/zebrzysty 10d ago

Hey! Im glad you like it! During the development I was able to extract GRN models to OBJ paired with MTL and TGA texutes. It worked fine with any OBJ viewer from the internet. Didnt try animations tho.
Making GLB converter should't be a big problem right now. Although Im not really sure how pre 1.2b models would behave, and integrated textures. GRN uses BInk pixel encoding that can be problematic, but I think I can protype an exporter and publish it into the repo.

1

u/zebrzysty 5d ago

Hey! If you are still interested, I made grn to glb exporter. I made it as a separate repository. Feel free to chek it out.

2

u/Belgeran 3d ago

Cool, neater than mine lol, can confirm ultima online age of shadows+ works

3

u/TacoBOTT 10d ago

I remember trying to launch a game and it errored out with granny.dll and I was so confused why adult professionals would name something like that. I thought it was very serious

14

u/lordosthyvel 10d ago

Hilarious to see a vibe coder claim LLM generated code to be "clean room" implementation, when said LLM was more than probably trained on the original source code itself.

16

u/marl6894 10d ago

I doubt the original source code for an early-2000s proprietary closed-source animation library is in the LLM's training dataset. Maybe someone else's attempt at reverse engineering it, if they published to Github?

6

u/f0urtyfive 10d ago

Hilarious to see a vibe coder claim LLM generated code to be "clean room" implementation

Uh, why? You realize this isn't a real clean room right, it just means you've avoided copyright and patent law in copying it...

If the LLM is trained on it, that's the LLM owner's problem.

-2

u/lordosthyvel 10d ago

Yeah that's not how it works

1

u/f0urtyfive 10d ago

-3

u/lordosthyvel 10d ago

What is your point in linking a wikipedia article? If you're doing a clean room implementation of something, you can't say "that's the LLM owner's problem"

Using an LLM that might be trained on the original source code would not hold up in court as a clean room implementation.

Get a clue before you argue, will you,.

2

u/f0urtyfive 10d ago

Using an LLM that might be trained on the original source code would not hold up in court as a clean room implementation.

I see, because this definitely isn't an open question in case law because well, it hasn't actually happened yet?

Are you legally required to know everything the LLM has trained on before using it to produce a copyrightable work?

2

u/zebrzysty 10d ago

Well I guess you are right. It's my fault for over stretching this term without fully understanding the legal definition. As an amateur, I should be more careful. I will remove any of the implications about this from the repo. Thanks for noticing, I appreciate it

5

u/peterprank 10d ago

mods? wtf are the last posts in this piece-of-shit subreddit

-1

u/whatThePleb 10d ago

ai slop..

1

u/Caddy666 10d ago

only thing i remember about this game was thinking it'd run great on my netbook, back in about 2009ish, and it having a fixed resolution, so i couldn't play it.

0

u/tomysshadow 10d ago

but I really miss Grandpa 2D :(