Unofficial release of CharasVXA
After over a year I decided that enough is enough. I can't seem to optimize this piece of code, and believe me, I tried. I even tried to write a DLL for it.
The main problem is that I've written it in such a way that the files it generates should be program independent. This means I can't use Marshal.dump to store the data. Well, I can, but that kind of defeats the purpose of this endeavour. Another problem is a bit more complicated to explain without explaining what CharasVXA is.
Short history lesson. Back in 2003 RPG Maker 2000 and RPG Maker 2003 were big, mostly due to piracy, but still. Now there was this community called the Charas Project. Its main draw was the online character generator. Then some guy came along and made Charas.EX, an offline version, which is where I'm heading to the point.
Charas is basically the character generator found in RPG Maker VX Ace, but with a bit more customization options, and an easy way to navigate through the several resources. Charas.EX built on it and added some new interesting stuff, like being able to recolor your stuff, kind of what you can find in Game Character Hub.
I myself have worked on Charas.EX a lot, added a lot of hacks to it, trying to improve it and stuff, but it never really worked out well in the end, and everybody lost interest. Come 2012 when I first got RPG Maker VX Ace. I loved it, and I still do, heck, every now and then I fiddle with it a bit. I never make games with it, but who cares, I'm still having fun with it.
One thing I found though was that the character generator was pretty limited, that, and you couldn't use the stuff in-game dynamically. Well, you can, but I wanted to go the hard way. Instead of just simply splitting the resources and put them in the game, coding a simple character assembly script, I wanted to replicate what Charas.EX did and improve on it.
CharasVXA is basically a character set assembly API. It doesn't actually generate the characters for you or provide with an easy way of generating the characters, but the core is there. Now, here's the problem.
Creating the assets is a pretty tedious job. You have to greyscale the resources, but not only that, you also need to color separate them. And yes, this process can be automated a little, but that's not what the main issue is, that's just something outside of the scope of my script. The main problem is assembling them into resources. You see, to assemble these resources, it needs to read the greyscales and write the data into a table, which not only stores the greyscale value but also the opacity. This process is really slow, especially due to RGSS not being all that fast anyway. If you download the demo I've posted below you can already see this.
The way I solved it is to just thread it all and put a loading screen on top of it, but, as you can see, it's really slow. And loading the data itself isn't fast either. The main reason it's this slow is because it also needs to write the data. Now, loading in the greyscale data is already extensive work, but saving it isn't that fast either. It's a big problem which I tried to solve with DLLs, but so far I decided to just throw my hands up in the air.
So yeah, there you go, here's the third WIP of a script I've been working on for a very long time. Feel free to study it, improve on it and use it. The script was intended to be released as CC0, and it still kind of is even though the script isn't complete. If you do decide to improve on it and release it on any of the sites, you're free to do this. You won't even need to give credits, provided you do actually touch upon the code in a significant way. Not because I need the credits, but it's kind of a dick move to just say, hey, I made this, without altering at least some of the code. Plus, when people find out, and they will find out, they'll ban you into the next generation.
As a bonus, I've also included the source of the DLL I made. Just in case you're interested.