Resolution Independence with Tiled Objects

StuartYStuartY Member Posts: 134
edited November -1 in Working with GS (Mac)
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

Comments

  • DizkoDizko Member Posts: 498
    You want to use 72 dpi all the way across even for your high res images. This is some wacky requirement of GS, if you don't use 72 dpi, your images will look blurry on the devices.

    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.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    With RI on GameSalad will use the full sized image you import and display it at whatever size you set your actor to. You need to make your art twice the size of the actor you are putting it in and all actor dimensions need to even. And tiling should works fine but I imagine you will still want to test it out to make sure it all lines up right.

    ___________________________________________________________________________________
    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
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Nope, tiling doesn't work with RI images at the moment... It's something that has always been a problem :( Sucks bigtime!

    Ace
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    mynameisace said:
    Nope, tiling doesn't work with RI images at the moment... It's something that has always been a problem :( Sucks bigtime!

    Ace

    Interesting I have never really done a tiled project but whats the issue. The only problem I have ever noticed is when you tile large images for a scrolling background but otherwise only when the tiled images are moving is there an issue.

    good to know I guess.
  • Rob2Rob2 Member Posts: 2,402
    Its just a GSC desktop and Web preview problem, check with the viewer or an adhoc/dev build and tiling is good to go ;)
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Even better to know @Rob2 :) I'd just had no luck with tiling in the previews so never tried ad-hoc-ing

    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
  • StuartYStuartY Member Posts: 134
    Thanks guys. Hmmm... I'm beginning to think tiling isn't worth bothering with and I should just go with independent actors. Problem there is that you'd then need hundreds of these identical blocks to compose a level, and even though they're unmovable set dressing I have a sneaking suspicion that they might slow the game down. I'll know for sure when my iphone actually arrives on Wednesday - but even then, it's an iphone 4, so no way to tell if it would grind to a halt on the 3G.

    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.
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Definite no-no, GS just accepts 72dpi.

    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
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    StuartY said:
    Thanks guys. Hmmm... I'm beginning to think tiling isn't worth bothering with and I should just go with independent actors. Problem there is that you'd then need hundreds of these identical blocks to compose a level, and even though they're unmovable set dressing I have a sneaking suspicion that they might slow the game down. I'll know for sure when my iphone actually arrives on Wednesday - but even then, it's an iphone 4, so no way to tell if it would grind to a halt on the 3G.

    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.

    You are way over thinking it man. GS display's that art at the size you setup the actors. it couldn't care less what size the art you place in that actor is. If your actor is 64x64 it will still be displayed at 64x64 weather you put a 10x10 image or a 1000x1000 image.

    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
  • DizkoDizko Member Posts: 498
    Rob2 said:
    Its just a GSC desktop and Web preview problem, check with the viewer or an adhoc/dev build and tiling is good to go ;)

    Strangely enough I had the opposite problem. Looked fine in preview but once it was on the phone the tiling would get offset set and tile incorrectly.
  • StuartYStuartY Member Posts: 134
    Okay, balancing out everything people have said, I've decided not to worry about hi-res tiles for now, leave them lo-res, and make the rest of the graphics hi-res. They're all anti-aliased anyway, so I imagine the discrepancy won't look too horrific on a tiny screen.

    Thanks once again!
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    No, all graphics need to be 72 dpi. There's no need for higher unless you're using it for print media anyway.

    Ace
Sign In or Register to comment.