Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Renofox on Sat 09/03/2013 16:22:04

Title: Recovering graphics from compiled game
Post by: Renofox on Sat 09/03/2013 16:22:04
About ten years ago my HD got corrupted, ruining the game I was working with. However, it turns out the compiled version of the game works, albeit with crashes at certain events.

The game is made with AGS version 2.56b, so the scripts would most likely need to be remade for the current version. Howerver, about 95% of work is in the graphics, so is there a way to reclaim the graphics from the compiled game?
Title: Re: Recovering graphics from compiled game
Post by: Crimson Wizard on Sat 09/03/2013 17:15:59
There are couple of game decompilers made since AGS went open source, one made by me (in a very hacky and speedy way), another made by other guy, which seems more formally proper (the program code is here: https://github.com/rofl0r/agsutils). However, I am still a bit reluctant to distribute the executable in public. There was a discussion about this, and, simply put, people don't like the idea that anyone may just rip off their game data.

IDK if opinion has since changed and community members would agree to host such program in public access.
Anyway, if you send your game to me, I will decompile it and send you back its contents. I've already did this for one guy few months ago.
I won't be able to decompile script though.
Title: Re: Recovering graphics from compiled game
Post by: Renofox on Sat 09/03/2013 22:18:36
Thanks, here's the compiled game: http://www.sendspace.com/file/1rj9l8

Whatever you can save from it, I'll be eternally grateful for it.
Title: Re: Recovering graphics from compiled game
Post by: Crimson Wizard on Sun 10/03/2013 00:18:41
Ok, PMed you the link.

Nice looking game, btw ;).

EDIT: actually, something I forgot to mention in PM. You may try to import the whole game back into editor by opening 'ac2game.dta'. You will need AGS v2.72 first, to make intermediate import (you may get one here: http://agsarchives.com/engine.html). It seems to import sprites too (from 'acsprset.spr'). Game still cannot be run like that, because scripts contain some errors (may be deprecated commands, not sure).
After you imported AND SAVED the game in AGS 2.72, you may then import it in latest AGS 3.21.
Title: Re: Recovering graphics from compiled game
Post by: Renofox on Sun 10/03/2013 14:42:26
Thank you for everything! Not only did I get all the graphics, but the rooms, items and characters too! Now I'll go get a current version of the SCUMM GUI and finish this project!  :-D
Title: Re: Recovering graphics from compiled game
Post by: Slasher on Sun 10/03/2013 16:08:19
Hi Crimson

Quotepeople don't like the idea that anyone may just rip off their game data.

Quite right. But while its possible some people will.

If you could have a 'turn off' option so hackers can't get anything the better.

Of course 'turn on' for your own games  (nod)



Title: Re: Recovering graphics from compiled game
Post by: Crimson Wizard on Sun 10/03/2013 16:34:55
Quote from: slasher on Sun 10/03/2013 16:08:19
If you could have a 'turn off' option so hackers can't get anything the better.
Of course 'turn on' for your own games
Slasher, can you please elaborate your suggestion? What is this "turn off" and "turn on" switch? Turn on/off what?

To make things more clear. The AGS source code is open. The program is open. Everyone can see how it is made. This means that if there's any data encryption, someone may (relatively) easily make a decryption. I don't think any kind of real protection is possible here.
Title: Re: Recovering graphics from compiled game
Post by: Slasher on Sun 10/03/2013 21:31:06
QuoteSlasher, can you please elaborate your suggestion? What is this "turn off" and "turn on" switch? Turn on/off what?

Hypothetically

Simply put: Imagine AGS came with options to turn off illegal access of the data file to a game:- so no one could access it illegally. The idea is that you would turn on an option to 'Lock' Illegal' access to the data files. This would generally be for when uploading a game. Naturally you would unlocked it on your computer.

The 'option' switch could be a setting in Game settings.

Data Lock -----   True/False

Think of it like : Data File not accessible.

It's just food for thought really.




Title: Re: Recovering graphics from compiled game
Post by: Snarky on Sun 10/03/2013 21:54:50
Quote from: slasher on Sun 10/03/2013 21:31:06Simply put: Imagine AGS came with options to turn off illegal access of the data file to a game:- so no one could access it illegally. The idea is that you would turn on an option to 'Lock' Illegal' access to the data files. This would generally be for when uploading a game. Naturally you would unlocked it on your computer.

And imagine you had an app for your phone that would recharge it for you. Every time your battery ran low, you'd just run the app. You'd never have to plug it in again!

Which is to say, sure, sounds nice, but it can't be done.
Title: Re: Recovering graphics from compiled game
Post by: Crimson Wizard on Sun 10/03/2013 22:20:49
Quote from: slasher on Sun 10/03/2013 21:31:06
The 'option' switch could be a setting in Game settings.

Data Lock -----   True/False

Think of it like : Data File not accessible.

It's just food for thought really.
It's not a problem to add a locking feature. It's a problem to hide the "unlocking" program code.
You are making AGS games, so you should know what script looks like. Program code looks similar.
Now imagine you have a password for your data, and you put it in script. That would work, but only so far as you keep your script to yourself. And if you open it to public, everyone will see the password.
AGS engine's source code is open. Which means, that everyone may see what's inside, and how to "unlock" locked data: the algorythms, etc.
Title: Re: Recovering graphics from compiled game
Post by: Snarky on Sun 10/03/2013 22:55:51
Even if the code wasn't open, you'd just be counting on no one bothering to actually hack it. You can't protect the game resources in any really secure fashion when they're contained in and rendered by the game game you're distributing: You're giving people all the pieces and an example of how to put them together. In other words, whatever the game does in order to read the resources, a clever programmer can get it to do to export those same resources.

That's why DRM can always be cracked. Even big publishers who put in a lot of effort to stop people from accessing the games illicitly are only really playing for time: trying to delay the release of hacked versions by a few weeks by adding multiple layers of obfuscations and traps. And it's not really all that effective. That's why they're instead increasingly moving towards games that require a server connection (like SimCity).
Title: Re: Recovering graphics from compiled game
Post by: Slasher on Mon 11/03/2013 06:50:00
Yes, ability to hack seems to be the way it is.

That's probably why people hack and release cheats like: gain all weapons, invincibility and so fourth.

Which is why I would only update my AGS through the official AGS update page.

Oh well.




Title: Re: Recovering graphics from compiled game
Post by: SinSin on Fri 12/04/2013 00:09:15
Mr Crimson would it be possible if you would do mine, its Mike Lechey from the database It would be awesome if you could. I lost it years ago :D

Mike Lechey (http://www.adventuregamestudio.co.uk/site/games/game/1013/)