|Nov 15, 2009, 08:52 PM||#1|
image cache - large png images
first time poster.
I have a problem that seems very common to a lot of people but I can't seem to find or decipher an answer anywhere.
The game I'm making has 3 rather large sprites on screen (230 high) x various widths.
Each sprite has 3 1024x1024 character sheets where the frames of animations are taken from.
I've experimented with PVR's but at that size they are absolutely horrible so I want to keep PNG's.
From other information I believe that the device can handle 3 1024x1024 pngs in memory without memory wanrnings.
My problem is I end up with 9 as if I don't use imagenamed then the time it takes to load the sheet from disk is unacceptable
I have created a NSMutableDictionary to store the data from the png image sheets into, but here lies my problem.
How do I add uncompressed png data to the NSMutableDictionary without using imagenamed? If I add it in uncompressed (imagewithcontents of file) then there is still a massive loading time when I get the image from the cache.
I need to somehow store it uncompressed in the NSMutableDictionary-
Assign it to the image of the sprite (sprites are UIImageViews) so that it doesn't get stored as it does if I use imageNamed.
Completely free the png from texture memeory if I need to change the sheet the sprite is grabbing the frames from. (not from my NSMutableDictionary cache)
thanks in advance -
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Using PNG images||irishgrizzly||Web Design and Development||3||Jul 5, 2010 06:45 PM|
|Saving images in Photoshop as .pngs - Question on formatting||christall109||Design and Graphics||5||Jan 2, 2010 06:37 AM|
|Loading png images...||Soulstorm||iPhone/iPad Programming||2||May 25, 2009 05:29 AM|
|PNG images look awful in IE 7 but look fine on all Mac Browsers||MacDonaldsd||Web Design and Development||13||Apr 12, 2008 04:13 PM|
All times are GMT -5. The time now is 04:22 AM.