Kovak / CBL_SECRET_PROTOTYPE_RUNNING_GAME

0 stars 0 forks source link

Factor out all File IO from Background, Midground, and Foreground classes #19

Closed sbrother closed 11 years ago

sbrother commented 11 years ago

This will be easiest if we just read all the art assets into one big ass atlas that is read on program init, and then anywhere in the code where there is currently file IO, replace it with asset_atlas.get(texture_name)

Kovak commented 11 years ago

The maximum safe atlas size is 1024 x 1024 as some of the older devices may have that as the hard limit for the graphics card. Most devices can handle 2048 x 2048 but to be save 1024 x 1024 is probably what we should stick with. However, this is the correct idea!

sbrother commented 11 years ago

OK, in that case we should have a ArtAssets class with a get method that determines what the right atlas to query is. The ArtAssets class will basically just be a container for a few atlases.