Ragatron is now Open Source!


  • Patron

    I’m releasing it in to the wild because I simply do not have time to work on it.

    So what are you waiting for? Go get the code!
    https://github.com/dannagle/ragatron


  • Patron

    Hey Dan!

    I’m interested in how do you unpack/repack the .exe.

    Do you have any idea if that’s possible on Node?


  • Patron

    @Josue said:

    I’m interested in how do you unpack/repack the .exe.

    The .exe is simply a binary concatenation of app.nw (which in itself is just a renamed zip file of all the game code and media) and the node-webkit executable. I just split the binary in to two files. I calculated the correct split location ahead of time and hard-coded it in to the app (inside globals.h). Finding the correct split location is not difficult. I searched the exe until I found the correct PKZIP header. It was easier to just hard-code the byte location (since I only needed to find it once) than to write code to do it.

    The actual unpacking is handled by the QuaZIP library. The Qt SDK (the C++ toolkit I used to write Ragatron) does not have built-in zip support, so I bundled QuaZIP. Here is the extract files line:

    JlCompress::extractFiles(unpackAppNW, zipFileList, unpackDir);
    

    and the rejoin…

    JlCompress::compressDir(fileName, WizardsLizard.packPath);
    

    Note that the Mac version of AWL and Lava Blade is packed a little differently. The app.nw is not binary joined. I was in the middle of adding Mac support when I decided to open source this tool. I don’t know when (or if) I will ever get around to finishing the Mac support.

    Do you have any idea if that’s possible on Node?

    I don’t see why not. Node can be used for general purpose programming. I’m pretty sure Node has zip libraries. If I am wrong and it doesn’t have zip libraries, you could always bundle an external one and use a system call.


  • Patron

    Thanks for the help Dan! I’ve successfully extracted both the Windows and Linux binaries. Now onto finding a way to do that in Node…

    I was thinking about making a little tool that exposed all the components on the game so you could edit entities/create new entities and stuff. Let’s see how it goes…

    P.S: Oh, BTW, the offset for the 64-bit Linux binary of version 2.1.1 is 0x4AC5728


Log in to reply