garrettgsb / sooper-maria-sisters

They can do it if they try~
MIT License
0 stars 0 forks source link

Image bank for mobs #30

Closed garrettgsb closed 6 years ago

garrettgsb commented 6 years ago

We noticed that there can be tremendous performance issues with sprites the way we've been doing them. Each instance of an Obj loads a new image, even if that image has already been loaded. That means that our "page" might have 1000 images in memory, for a medium sized level. Yikes.

So the plan is: Make an image bank, where each sprite we need is loaded only once. Then, any Obj can reference the image bank for the image it needs.

garrettgsb commented 6 years ago

@mprads Did #31 resolve this? If so, we can close.