Two years ago (GitHub tells me) I wanted to try to replace the 3D models in the JRPG game series Trails in the Sky with higher poly models. It is an old 2.5D game with 3D maps and 2D character sprites. I have managed to reverse engineer (black box) the format and the next step is to try to modify the files and try them in the game.
However the problem is that the games pack everything into archive files using custom compression and the extraction program is not open source. The only good news is that they are not encrypted. I have very little experience with compression and certainly not the skills to reverse engineer compression algorithms.
But over the last 2-3 months I have managed to create a working decompressor by digging up obscure implementations found by digging in old forum threads, by working a little on it sometimes while taking the train to work. (This includes moon programming languages and a hilarious dead end with a custom scripting language that in the end called a custom function defined in C++, but the C++ implementation just executed a hex dump of what I assume is a part of the original game executable.)
So my goal for this Devember project is to learn how these algorithms work (which I have a good grasp on already), document or at least describe them in a more understandable format than undocumented code, and to implement a compression algorithm for the two methods the game uses. (Yes, two methods, I was quite disappointed when I learned my initial implementation only worked on half the files.)
My ambition level is quite low as my main project this Christmas is to 3D print the character models from the newer 3D games and getting better at Blender (because those models where really not usable for 3D printing, but that is an entire different story). Oh, and I picked up an resin printer at black Friday, so it will be interesting to see if that is going to end up as a disaster or not.
Btw, I know that a remake of those games has been considered, so the original goal of the project might no longer be as relevant (but let’s see how the remake turns out), but I think this is a good opportunity to learn some more about compression and I’m close enough that I think I should at least try to get some 3D models into the game before calling quits.
(Actually, double checking this, I’m not actually sure if there are concreate plans for making a remake.)
All code will be pushed to my existing repository linked above.