✖ Memory use Vs Processor overhead ? ✖
I realise that we can keep the size of an app down by optimizing the assets the games uses.
So . . I take my 24bit Photoshop images and make them 8 bit PNG images - which can greatly reduce the file size.
So, now I have a smaller overall game size, which loads much quicker on the end user's iPhone/iPad/Android . . . .
Now . . assuming we have no memory issues (let's imagine our app happily loads onto even the older devices as it's only - for example - 5MB) . . . do these smaller 8 bit files have any impact on how the end device performs, I am talking purely about how smoothly the app runs - does it make any difference if the device is throwing 50 x 8 bit images around the screen or if it is throwing 50 x 24 bit images around the screen ?
Cheers in advance for any input / insights !
So . . I take my 24bit Photoshop images and make them 8 bit PNG images - which can greatly reduce the file size.
So, now I have a smaller overall game size, which loads much quicker on the end user's iPhone/iPad/Android . . . .
Now . . assuming we have no memory issues (let's imagine our app happily loads onto even the older devices as it's only - for example - 5MB) . . . do these smaller 8 bit files have any impact on how the end device performs, I am talking purely about how smoothly the app runs - does it make any difference if the device is throwing 50 x 8 bit images around the screen or if it is throwing 50 x 24 bit images around the screen ?
Cheers in advance for any input / insights !
Comments
I think optimising images is good to keep games under 20MB so they can be downloaded over cell phone networks.
But I don't think it makes a difference to game performance. Whether 8bit or 24bit the image will be have the same length and width. So the same number of pixels are being pushed around by the cpu.
I published a mac game the other day which I haven't done before. Feels so much nicer not to have those long loading times!
Cheers for the input, my suspicions pretty much matched what everyone has said here, an 8 bit file will be smaller so will load faster . . . but once in RAM it will take up the same memory as a 24 bit file (as old kipper says, both will likely be held in 16 or 24 bit colour space) and will be no more or less demanding on the processor than a 24 bit file . . . Might do a test.
@old_kipper
"There is a loss on quality of antialiasing on 8 bit with alpha that I think I can see . . . "
If you supply the anti-aliasing area enough colours (or tones) there should be no loss in quality over 24 bit, anti-aliased areas tend to only have 2 or 3 tones, so it shouldn't be difficult to have anti-aliasing as good as 24 bit in an 8 bit file.
I put a load more of the images through imageAlpha. Great tool that one.
@old_kipper @tynan Also keep in mind that if you use retina images and tick resolution independence the auto generated smaller images will be in 24bit irrelevant of what your originals are. At least I'm assuming that based on the file sizes of the auto images which are sometimes bigger than the 8bit retina sized images.
"I think I see it mostly on edges of objects but this might be down to time painting out blue screen spill and rough matting in animation/effects frames and I still get very critical about."
You are talking to an anti-aliasing nazi ! Seriously, I often spend hours moving/lightening/darkening individual pixels on images. Spent at least an hour today trying to improve the anti-asliasing on a 32 x 32 3D cube (no joking)
On green/blue screen spill I matte stuff leaving the spill in and then simply desaturate the blue/green area of the spectrum on the edges of the cutout.
All the stuff in this video (below) I shot against a roll of green paper in my front room.
"I put a load more of the images through imageAlpha. Great tool that one."
Yep, it's fantastic, wish it had a batch feature though.
What are the down-sampled images like, I know Gamesalad itself has pretty awful interpolation within the application (a poor 'nearest neighbour' at best) - I was curious as to how they down sample, hopefully with something decent rather than the game engine itself ??
Anyone got a sample of the an original and a down-sampled image ?
A ton of large (512 x 512) 24 bit images spinning and bouncing around the place drags my poor iPad (1) down to 38 fps - changing the images to 8 bit makes no difference, still 38 fps.
Most of my film and tv work was in the early 90s (I worked at Aardman) before the tools were as neat as they current are unless you went up to high end suites and even those didn't have the power of home systems today.
And on the 38fps... not surprised. Next possible test might be to do a test of anamorphic squash of frames and open them out to un-squashed size within the actor. Think this would reduce memory but as the squash to be useful would have to pull things within the rule of 2 so the squash would be quite harsh and image quality not fab. And I am not sure of the effect on processing speed, but it might be useful in some cases.
Stunning video - fecking impressive - and what songs !!
If you want to see the down-sampling quality open up an ri published app and then https://developer.apple.com/library/ios/#qa/qa1681/_index.html to view the pngs (there is a quicklook plugin available somewhere) The whole Xcode/Apple optimisation process actually increases file size sometimes - especially if you have gone crazy with ImageAlpha or ImageOptim
Really like your video!
Cheers.
I noticed the anamorphic lens flare in some sections and wonder if you did use an anamorphic lens, or is that a post effect?
It's an old late 70s Iscorama anamorphic, uncoated, so all you have to do is have a light anywhere in the frame and the lens flares start - there are also some post flares done in Video Co-pilot's Optical Flares.
"Also I love the time effects and particles linked to the people's movement in the shots. YUM!"
Particles swaying with one of the girls is just glitter thrown up into the air and blown about with a piece of cardboard, hi-tech stuff !!
And on the 38fps... not surprised. Next possible test might be to do a test of anamorphic squash of frames and open them out to un-squashed size within the actor. Think this would reduce memory but as the squash to be useful would have to pull things within the rule of 2 so the squash would be quite harsh and image quality not fab. And I am not sure of the effect on processing speed, but it might be useful in some cases
I thought of the very same thing ! I have an actor (animation) that moves pretty quickly, he's full resolution when still but when moving drops to half-res (in both X and Y) as he's covered in so much motion blur that the drop in res is imperceivable.
"8 bit would lower the image quality/potential though..."
I'd agree that with some images converting to 8 bit might compromise the image quality, but it's surprising what you can get away with, even smooth gradients can covert well to 8 bit.
"All ends up in a 32bit space in the end - but there are a few caveats which effect performance along the way - file type etc."
Good to know ("All ends up in a 32bit space in the end"), cheers for the info. Are not file type all converted to what GS needs when importing, or are you talking about iOS in general ?
"Stunning video"
Cheers !
"If you want to see the down-sampling quality . . . "
Again, cheers for the info . . . so I see 'Pngcrush' is used the do the down sampling and is handled by Xcode and not GameSalad (shows you how much I knew about the process!) which can only be a good thing as I expect 'Pngcrush' uses a high quality sampling algorithm, having not published a resolution independent game I was worried that GS might do some kind of internal game engine down conversion using it's pretty crude nearest neighbour method ! 8-X
We use Riot, because it does a nice side by side. And our image work is done on PC.
http://luci.criosweb.ro/riot/
"If you are doing any sort of alpha, you are gonna get some weird edges with PNG8"
An anti-aliased edge leading into transparency typically has less than 4 or 5 tones, easily within the capabilities of an 8 bit image, in fact it's safe to say that there is no reason why the edges (anti-aliased leading into transparency) on an 8 bit image cannot be identical to a 24 bit image.
"I've never had a lot of luck with that. I tend to get tiny white artifacts on those."
Can you post a (24 bit) image that you have had the white artefact issue with when attempting to convert it to 8 bit ? I will see if I can convert it to 8 bit without the artefacting.
I don't know what tool GS are using for image resizing (downsampling) - could be a bucket and spade...
Confusion is creeping in with the use of the word size... story of my life.
"I don't know what tool GS are using for image resizing (downsampling) - could be a bucket and spade..."
In the actual game engine they seem to be using a mediaeval incantation or some kind, but I suppose it's not reasonable to expect realtime bicubic interpolation at 60 fps on a mobile device.
"Confusion is creeping in with the use of the word size... story of my life."
Lol !