I noticed some odd behavior while working with LARGE icons. Large, as in, 512 x 416 pixel icons. I was prototyping a combat system that made use of these large images as sprites. The project includes 175 512 x 416 frames, and a smaller set of images that comprise an enemy's animations. Altogether the .rsc is 434KB. However, when the prototype is ran and just the enemy and player sprites are added to the screen the memory usage jumps to 80MB, and then to 275MB when equipment overlays are added. I find this strange when the resource is just half a megabyte and the game runs at over a quarter-gigabyte. It makes me wonder if there isn't something wonky going on. This is also accompanied by a CPU spike, which I suspect is caused by the loading of the images when they are about to be used.
Now, I'm not sure if this is caused by the techniques involved in the prototype. The combat animations are displayed as /image's. The equipment (equip-right, equip-left, etc., verbs if you try the demo below) are image overlays that are added to the player image.
I've uploaded the prototype demo: Prototype.zip
No icon procs are used during the demo.
Numbered Steps to Reproduce Problem:
Use a bunch of really large icons in your game and watch the memory usage sky-rocket.
Code Snippet (if applicable) to Reproduce Problem:
// Just Demonstrating how simple the code is when displaying the images. I'm not doing anything complex here.
Expected Results: A 434KB resource might blimp up to a megabyte or two one would think.
Actual Results: A 434KB resource blimps up to 275MB.
Does the problem occur:
Every time? Or how often? Everytime.
In other games? ProShogun tried to help by demonstrating a different technique to no avail. His version can be found here.
In other user accounts? Yes.
On other computers? Yes.
When does the problem NOT occur?
To my experience, it always occurs with large images.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
This is a newer project, as it uses the larger icon capabilities of BYOND. The earliest version I've tried it with is 461.1054, the version installed on this machine.
Workarounds: None, yet.
Finally, we've been discussing this on the Efencea blog. Which can be found here if you think you might extract something I forgot to mention from the first portion of the blog and the comments.