Eromancer
Sex Demon
- Joined
- Jul 27, 2014
- Messages
- 289
- Reputation score
- 42
Re: Malise and the Machine (New RPG!)
Good call on the sprite effects-- I felt like I was forgetting something. I guess it doesn't matter though if RPG Maker treats it all as RGBA. But yeah, what makes the sheet so big is the multiple poses (multiple rows). I made a version with fewer frames that would work fine for this release and still look good. The file size is only 6.05 MB after compression (3.6 MB for the one with fewer frames).
I think the answer here is modifying the animation script to be less generic, and I can hardcode the poses for each enemy and save a lot of pixel area by eliminating the blank rows from the PNGs. I also may make exceptions and pre-cache big sprites like this before battles. There's a small load time, but at least it's during the transition.
File format is irrelevant - game will still treat it and display as RGBA.
Don't know if and how you changed this, but in vanilla, battle effects (blink, flash, etc.) are applied to sprite, so if you include part of background in boss graphic, effect will also be applied to this part. Besides, it doesn't matter if boss is not using whole part of the screen (right/left with full height or top/bottom with full width) as overlapping area will still be used by both graphics.
Let's say for the sake of argument that limit is in fact 1,5GB, this bitmap alone uses over 20% of available memory, and you still need shitload of memory for other graphics - tilesets, spritesheets, tilemap, transitions, backgrounds, battler sprites, etc. Don't know how long it takes to load such monstrosity (354MB... fuck...), but I wouldn't cache something that big, unless it's used very (and I mean VERY) often - if it loads in 1-2 seconds, displaying simple "please wait" message before boss battle should suffice and nobody would hold it against you - at least that's my opinion.
Inconsistency may be related to ruby garbage collection, which cleans unreferenced objects at fixed(?) periods of time. During change between scenes using lots of graphics, there's a chance that objects disposed/cleaned in previous scene were not yet garbage collected and they still use lots of memory. You can manually call garbage collection method - This will probably cause lag, but at least it will minimize chance of "Failed to load bitmap" crash.
Hope this helps.
EDIT:
It's still bothering me - 1024x768 RGBA bitmap uses around 3MB of memory, with 16 frames that's ~48MB... so how big is this boss spritesheet, that it uses 354MB?
Good call on the sprite effects-- I felt like I was forgetting something. I guess it doesn't matter though if RPG Maker treats it all as RGBA. But yeah, what makes the sheet so big is the multiple poses (multiple rows). I made a version with fewer frames that would work fine for this release and still look good. The file size is only 6.05 MB after compression (3.6 MB for the one with fewer frames).
I think the answer here is modifying the animation script to be less generic, and I can hardcode the poses for each enemy and save a lot of pixel area by eliminating the blank rows from the PNGs. I also may make exceptions and pre-cache big sprites like this before battles. There's a small load time, but at least it's during the transition.