reverse-engineering klik

SpindleyQ's picture

"Clickteam Extractor", by ValleyBell

Stumbled across this old forum post from 2011 where someone named "ValleyBell" posted a tool called "ClickTeam Extractor" for extracting resources from ClickTeam games that seems much more advanced than my KNPUtils. Includes source code and file format documentation! Given that it's hosted as a MediaFire link from 2011 it's a miracle that it's still online, so I'm mirroring it here.

SpindleyQ's picture

KNPUtil v1.0

OK, it's about time I released this stuff!

KNPUtil is a collection of 3 utilities for fiddling with Klik & Play games:

  1. knpextract: a tool for extracting resources from Klik & Play games
  2. knpgen: a tool for generating random "screenshots" from resources extracted from Klik & Play games
  3. knpmangle: a tool for generating new Klik & Play games from old Klik & Play games by messing with their resources

KNPExtract and KNPGen have been released before. This release brings much improved image loading times to both tools, as well as support for 16-bit images. KNPExtract also now can generate animated GIFs from animations, extract sounds and music, and provide meaningful filenames to everything it extracts.

Detailed usage instructions are in the readme. The tools are all designed to do something cool if you drag Klik & Play games onto the EXEs from Windows, but KNPMangle especially rewards a deeper understanding of its commandline options.

If you're getting error messages when you try to run the EXE, you may need to install the Visual C++ 2008 Runtime from Microsoft.


SpindleyQ's picture

KNPGen v0.1

Announcing KNPGen -- a tool for randomly generating Klik & Play screenshots!

It works like this: First, you need to generate the cache of KNP images to use, so drag a directory full of IMG files onto KNPGen.exe. Once the cache exists, you can just run KNPGen.exe on its own to generate new screenshots using that library. If you run KNPGen.exe on its own without a cache, it will scan the current directory, so you can plunk it in with a Klik & Play game to remix it.


SpindleyQ's picture

Reverse-engineering Klik & Play .GAM files

I'm close! I've been plugging away at it for a couple of hours every other evening or so. Every time I poke at it, I get a little bit closer to cracking what I need to know, which is really pretty cool.

(To be clear: What I have is still far, far away from a full understanding of the file format that would be required to, say, write them, or put together some sort of KlikVM. But I am one structure away from pulling out proper animation data, which feels really awesome.)

SpindleyQ's picture

KNPExtract v0.1

Yes, it's finally here! A tool to extract graphics directly from Klik & Play .img files! Source code is included.

I'm still working on cracking the .gam format, which is a lot tougher, but will allow me to extract the graphics in the proper order, and automatically group the images by object / animation / direction.

SpindleyQ's picture

Reverse-engineering Klik & Play .IMG files

Inspired by qrleon's painstaking hand-capture of some of Klik & Play's most glorious sprites, I decided to look into how hard it would be to crack the Klik & Play file format.

As it turns out, it wasn't really that hard at all! Reverse engineering is kind of fun. And I discovered 010 Editor in the process, which is all kinds of badass.

I'm pretty sure I now have enough information to batch extract raw bitmap data, if I just knew exactly what KNP's colour palette was. I think the simplest way to find out is just to take a screen grab of the sprite editor and slurp up the colours from that.

The on-screen colour palette maps onto colour indexes like so:

0 16 32 ... 240
1 17 33 ... 241
2 18 34 ... 242
... ... ... ... ...
15 31 48 ... 255

except for one cute trick. The first colour, 0, doesn't actually map to 0, it maps to some other black elsewhere in the palette (207, IIRC). 0 is the transparent colour.

I'm not sure yet if there's any way to tell, just given the .img file, which images correspond to which objects, animations, etc. I'm guessing that there probably isn't, which is unfortunate, as .gam files are a lot more complicated. (There's all kinds of friggin' garbage data in them.)

I've attached the 010 Binary Template that I whipped up while I was figuring out the Klik & Play .img file format, to help future generations of people who want to reverse-engineer the Klik & Play file format. I also loaded that last sentence up with keywords so that Klik & Play hackers might find this page via Google.

Syndicate content