Resolution Independence with Tiled Objects
![StuartY](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
First of all, Hi! I'm Stu, nice to meet you all. I've just got GameSalad and I'm already feverishly working on my first game. I've lurked around the forums for a while, and every question I've wanted to ask (up till now) has already been answered by a very supportive community of devs. Hopefully, as I get more experienced, I'll be able to answer a few more questions of my own.
Flattery over, it's question time. In my game, I've got some basic "block" style tiled objects. These represent the platforms in the game, although to fudge the rather imprecise collision detection, the platforms are separate, hidden objects.
Anyway, in GS size these blocks are set at 64*64. I want my game to use hi-res images on iPhone 4, so I've saved the graphics as 128*128 png files, with a resolution of 144dpi. Imported into GS creator, these look correct, and the tiling works perfectly, so that using just one actor I can make a whole strip or square of these blocks; convenient for level design and efficient in terms of processing/memory overhead.
What I need to know is, when somebody runs the game on iPhone 4, will they see high resolution (144*144) blocks that take up 64*64 in terms of "gamespace"? Or will the engine decide to do something weird, like make the blocks appear bigger/smaller/stretched? It would also be interesting to know whether this will add a *4 to the filesize of the graphics on iPhone 3, or is the engine smart enough to leave out info it doesn't need?
Cheers
Flattery over, it's question time. In my game, I've got some basic "block" style tiled objects. These represent the platforms in the game, although to fudge the rather imprecise collision detection, the platforms are separate, hidden objects.
Anyway, in GS size these blocks are set at 64*64. I want my game to use hi-res images on iPhone 4, so I've saved the graphics as 128*128 png files, with a resolution of 144dpi. Imported into GS creator, these look correct, and the tiling works perfectly, so that using just one actor I can make a whole strip or square of these blocks; convenient for level design and efficient in terms of processing/memory overhead.
What I need to know is, when somebody runs the game on iPhone 4, will they see high resolution (144*144) blocks that take up 64*64 in terms of "gamespace"? Or will the engine decide to do something weird, like make the blocks appear bigger/smaller/stretched? It would also be interesting to know whether this will add a *4 to the filesize of the graphics on iPhone 3, or is the engine smart enough to leave out info it doesn't need?
Cheers
Comments
To answer your question, what GS does with the images is for the iPhone 4 it uses the full res. For the older gen devices, it automatically sizes the images down by 50%. So for example if you use a 128x128 image, on iPhone you'll get the 128x128 on the 3G you'll get 64x64.
Your game space is based on the smaller format 480x320 even with res independence on (iPhone4 is 960x640)
What that means is you want to create the images at least twice the size of your actor. So if you have an actor that's 64x64 you'll want to make its image 128x128.
Also, I don't think tiling works properly with res independence turned on, you're going to definitely want to get the GS device viewer up and running asap. You'll identify issues very quickly, what you see in the normal preview isn't always what you get on the device. It would even be useful to run on a simulator vs the GS preview.
___________________________________________________________________________________
Project Help from Tenrdrmer Click Here
GS BubbleBall Template HERE!!
Stacks Level Selection Template HERE!!
Expanding Option Menu Template HERE!!
Tenrdrmer's Menu # 3 HERE!!
Menu #4 - Level Banners HERE!!
AppSolute Entertainment on Facebook
AppSolute Entertainment on iTunes
Ace
good to know I guess.
I use a LOT of tiling to save memory and have been on my latest iPad project so is great to know for when I port it over to iPhone.
Ace
As for what you say Rob2, how would you actually go about making it work? If I use a 72dpi 128*128 image and size the tiled object so it's 128*128, how would the program even "know" that it's meant to show it as four 64*64 blocks? The only way I could see to do this was by changing the dpi, but folks say that's a no-no.
Tiling is definitely worth bothering with; it is a HUGE help with resources on the device, something which we are always trying to achieve. I even do this with background gradients, I'll make an image that is 8x1024 (iPad height) and tile it horizontally instead of a huge 768x1024 image.
Just make one 64x64 image and check the tile horizontally and vertically and make the actor 128x128.
Will probably show up wrong when you click preview, but will be fine once you device test it on your phone.
Ace
What you need to do is decide what even numbered size you want your actor to be and then make your artwork double that size in 72DPI. Thats it
Thanks once again!
Ace