[null, {"document_url": "https://getsatisfaction.com/demibooks/topics/memory_management_pt_2_the_same_with_less", "unformatted_src": "https://drp60gfj3y9kn.cloudfront.net/assets/sprite_screen-e4ae3f34f9f27e80a63a55045c5d1015.png", "src": "https://drp60gfj3y9kn.cloudfront.net/assets/sprite_screen-e4ae3f34f9f27e80a63a55045c5d1015.png", "formatted_filename": "sprite screen e ae f f f e a a c d"}, null, null, null, null, null, null, {"document_url": "https://getsatisfaction.com/demibooks/topics/memory_management_pt_2_the_same_with_less", "unformatted_src": "https://s3.amazonaws.com/satisfaction-production/s3_images/649621/the_original_inline.png", "src": "https://s3.amazonaws.com/satisfaction-production/s3_images/649621/the_original_inline.png", "formatted_filename": "the original inline"}, null, {"document_url": "https://getsatisfaction.com/demibooks/topics/memory_management_pt_2_the_same_with_less", "unformatted_src": "https://s3.amazonaws.com/satisfaction-production/s3_images/649623/full_canvas_inline.png", "src": "https://s3.amazonaws.com/satisfaction-production/s3_images/649623/full_canvas_inline.png", "formatted_filename": "full canvas inline"}, null, {"document_url": "https://getsatisfaction.com/demibooks/topics/memory_management_pt_2_the_same_with_less", "unformatted_src": "https://s3.amazonaws.com/satisfaction-production/s3_images/649625/in4_inline.png", "src": "https://s3.amazonaws.com/satisfaction-production/s3_images/649625/in4_inline.png", "formatted_filename": "in inline"}, null, {"document_url": "https://getsatisfaction.com/demibooks/topics/memory_management_pt_2_the_same_with_less", "unformatted_src": "https://s3.amazonaws.com/satisfaction-production/s3_images/649637/flags_inline.png", "src": "https://s3.amazonaws.com/satisfaction-production/s3_images/649637/flags_inline.png", "formatted_filename": "flags inline"}, null, {"document_url": "https://getsatisfaction.com/demibooks/topics/memory_management_pt_2_the_same_with_less", "unformatted_src": "https://s3.amazonaws.com/satisfaction-production/s3_images/649639/flags_boxed_inline.png", "src": "https://s3.amazonaws.com/satisfaction-production/s3_images/649639/flags_boxed_inline.png", "formatted_filename": "flags boxed inline"}, null, null, null]
Loading Profile... Posted and Create a new topic

About this Idea

Official Representatives
 Add a product + Facebook, or email. Memory Management Pt 2 - The same with less.
Edit Subject

To understand this post you will need to have read part 1, if not do so now, http://getsatisfaction.com/demibooks/...

So here is my masterpiece, a painting from my trip to the alps. Its 320x160, so to get the iPad to display this I need to visit its canvas store and buy some canvas, now as we all know from the first post, canvas most be in powers of 2. So the smallest canvas the ipad has that holds my master piece is 512x256 which looks like this. Which is a waste. Look at all the black that can’t be used for anything else.... Canvas is very limited at the iPad’s canvas store.
The smart painter will see that you can put canvas pieces next to each other and paint on each part. So if I get a 256x128 and a 64x128 and 256x32 and a 64x32 can then fit the picture on perfectly and save all the wasted space like so. Now while mine fits perfectly, even if it didn’t it would really reduce the wasted space.
What does this mean in RAM terms.
512x256 = 512KB
256x128 = 128KB
64x128 = 32KB
256x32 = 32KB
64x32 = 8KB
Total = 200KB
Less than half the RAM same image, looks no different.

Now you can’t do this is you want to rotate the image or put it on physics because currently we don’t have a system to bolt these together. But if you want to move the objects around on behaviours then you just move all the pieces and nobody will ever know.
Odd shapes gives you even better saving for example these flags, that nicely fit in a 512x512 Lots of wasted space though, lets box’em up. So the RAM
512x512 = 1024KB ( 1MB)
128x32 = 16KB
128x128 x 4 = 64KB * 4 = 256KB
64x64 = 16KB
Total 288KB
That is a saving of 72% for the exact same image.

The Background page
Each page has a background image, its plain white, it is a fullscreen texture and uses 4MB, now if you use or don’t use it, it is 4MB, SO USE IT, fill it with as much stuff as you can. If it doesn’t move, rotate, scale and nothing needs to slide behind it, put it in the background image. Everything you put into the texture for the back of the page is FREE.

If you want to make something happen when you press an item , like play a sound, that doesn’t not cause the item to move. Then put the item in the background texture. Then make a 8x8 texture that is fully transparent/alpha and use the Frame to make it as big as you need. This way you get the same behaviour for 256 Bytes! And you can use that same texture everywhere in the book and size it to what you need it to be, nobody will notice it being stretched as you can’t see any of it.
2 people like
this idea +1