To cut down on filesize (so I don't have 7+ slightly recolored versions of each animation) I'd like to include recoloring somehow. But as we all know that's very laggy. However, what I'm recoloring is simple enough that it should be plausible, by one of two ways I can think of.
One, http://www.rmxp.org/forums/index.php?topic=39324.0
This seems to give access to creating methods and such that work directly with bitmaps in C, so it should be nice and fast, right? If so, this would be best. If anyone knows how to edit bitmaps in C and could explain the basics, or link to something explaining it, I could probably work it out from there.
Of course if I go this method, I'd also like to create a dll or whatever out of the end result C file so the player doesn't mess with it. ._.
Two, since all of my animations are 16 colors and only 5-8 should need changed, I think I could have a secondary project process all of the images and create arrays of all their pixels that are the colors I want to change.
ie an outer hash contains one array per image file, and then each of those arrays has one for each color. Colors are indexed, and the array for each color contains the x,y locations of every pixel of that color.
This gets rid of the whole get_pixel part in game, so I'm just setting pixels. Still slow, but it should be much faster, at least enough so that I could change the colors over a few frames and make it not noticeable (the recoloring would take place on about 2 bitmaps at the start of the battle scene)
However, I'd need to save the information I get about each image so that it could be recalled during gameplay. So I'd need to know how to create a file (encrypted rxdata or something, right?) and then open it again, process it and get arrays/hashes out of it later.
Any help would be greatly appreciated. :D
(RMXP btw)
One, http://www.rmxp.org/forums/index.php?topic=39324.0
This seems to give access to creating methods and such that work directly with bitmaps in C, so it should be nice and fast, right? If so, this would be best. If anyone knows how to edit bitmaps in C and could explain the basics, or link to something explaining it, I could probably work it out from there.
Of course if I go this method, I'd also like to create a dll or whatever out of the end result C file so the player doesn't mess with it. ._.
Two, since all of my animations are 16 colors and only 5-8 should need changed, I think I could have a secondary project process all of the images and create arrays of all their pixels that are the colors I want to change.
ie an outer hash contains one array per image file, and then each of those arrays has one for each color. Colors are indexed, and the array for each color contains the x,y locations of every pixel of that color.
This gets rid of the whole get_pixel part in game, so I'm just setting pixels. Still slow, but it should be much faster, at least enough so that I could change the colors over a few frames and make it not noticeable (the recoloring would take place on about 2 bitmaps at the start of the battle scene)
However, I'd need to save the information I get about each image so that it could be recalled during gameplay. So I'd need to know how to create a file (encrypted rxdata or something, right?) and then open it again, process it and get arrays/hashes out of it later.
Any help would be greatly appreciated. :D
(RMXP btw)