What is the best way to put 1200x800 background in a game?

cbtcbt Member Posts: 644
edited November -1 in Working with GS (Mac)
Hi everybody,

So, I'm working on my TOTB3 game and I've never worked with scene size bigger than 1024 pixels.

As you know GS won't let bigger images than that. So, I've divided my 1200x800 image into 6 equal parts, each part 800x800 (400x400 with RI in the game). And placed them to the scene.

In preview mode, it's all okay but, in GS Viewer there are "gaps" between each image. I know this has been asked before but I couldn't find any solutions on my research.

So, what is the best way to do this guys?

Comments

  • old_kipperold_kipper Member Posts: 1,420
    Overlap your images a couple of pixels and wish for the snap to grid fairy.

    Kipper

    Edit Tsb strikes again but didn't mention the snap to grid fairy like me :P
  • cbtcbt Member Posts: 644
    I was afraid you guys were gonna say that! :D

    Thanks guys..
  • PoseMotionPoseMotion Member Posts: 51
    Images should be power of 2 like, 8, 16, 32, 64, 128, 256, 512, 1024, and so forth. Else you are forcing the graphics card to fill the gaps which takes more time. So a 800x800 image is actually running 1024x1024 by adding a invisible 224 border on two sides. That's a waste of memory.

    Your 1200x800 is an odd resolution. Why are you using that? Stick with something more common to a monitors resolution.
  • PoseMotionPoseMotion Member Posts: 51
    If you absolutely needed a 1200x800 resolution, you would be best off creating a 1024x768 background and cutting it up like this...

    512x512, 512x512 (top of image)
    256x256, 256x256, 256x256, 256x256 (bottom of image)

    Then stretching it to fit the 1200x800 resolution. (i'm not quite sure what display uses that resolution) And it being a background, it might give it a slight blur effect, being that it's stretch. But that isn't bad since it would give it a slight out of focus look.

    If you keep to the power of 2, your games will run much smoother and use less memory. And of course there are a lot of other things that help then run fast. Such as using coordinates for collision instead of pixel collision. But I don't even know if GameSalad has options like that as I'm not too familiar with it yet.

    Hope that helps.
  • wouterwouter Member Posts: 174
    about image optimizing: (what flashpulse said)
  • PoseMotionPoseMotion Member Posts: 51
    wouter said:
    about image optimizing: (what flashpulse said)

    That video is incorrect. When you watch it, he basically says a 30x66 image will be seen as 32x128. That is not a power of 2 image. It will be seen as a 128x128 image by the graphics card.

    Now you could have a 128x128 image, that lets say, had two images in it. And if one of the images was 32x128, you would clip it (code wise, not in a image editor) and that would mean the remaining image would be 96x128.

    You use to see this all the time in older games. And there was a reason for. They couldn't handle anything except for power of 2 images. So the artist would sometimes combine multiple images in a 256x256 image. Then clip them (code wise) at run time.

    Then at some point, graphic card companies (Nvidia, ATI) allowed the cards to except non-power of 2 images, even though they would be padded and seen as power of 2. But this waste memory and is slower.

    It is best to stick to the power of 2 images, 8x8, 32x32, 64x64, 128x128, 256x256... because graphic cards see squares that are made of 2 triangles put together. Anyone who does 3D modeling knows this.

    Just think if you keep using non-power of 2 images throughout your game, you have a highly un-optimized game wasting resources.

    Stick with the power of 2. Your game will thank you. ;)
  • cbtcbt Member Posts: 644
    Wow flashpulse, thank you. Really.

    I totally forgot about this.. Furthermore, I was previously applying the technique on the video..

    And 1200x800 just seemed right size for the scene. But, no need to stick with it. I'll take your advice on that too and make it something more "friendly" :)

    Thanks again!
  • PoseMotionPoseMotion Member Posts: 51
    cbt said:
    Wow flashpulse, thank you. Really.

    I totally forgot about this.. Furthermore, I was previously applying the technique on the video..

    And 1200x800 just seemed right size for the scene. But, no need to stick with it. I'll take your advice on that too and make it something more "friendly" :)

    Thanks again!

    No problem! ;)
  • PhoticsPhotics Member Posts: 4,172
    cbt said:
    Wow flashpulse, thank you. Really.

    I totally forgot about this.. Furthermore, I was previously applying the technique on the video..

    And 1200x800 just seemed right size for the scene. But, no need to stick with it. I'll take your advice on that too and make it something more "friendly" :)

    Thanks again!

    Yeah, Flashpluse has the right idea. I find that I have less problems with seams when I'm using background images with powers of 2

    In BOT, on retina displays, the backgrounds are larger than the 1024x1024 image restriction. It's actually four 1024x1024 images. I don't use overlap because it's not a moving actor and it's powers of two.

    By accident, I made one of the images 1023 instead of 1024... and even though there wasn't transparency on the edge, that's how GameSalad/iOS treated it. So if you're cutting up actors into odd shapes, you can easily get problems with seams.
  • PoseMotionPoseMotion Member Posts: 51
    Photics said:
    Yeah, Flashpluse has the right idea. I find that I have less problems with seams when I'm using background images with powers of 2

    In BOT, on retina displays, the backgrounds are larger than the 1024x1024 image restriction. It's actually four 1024x1024 images. I don't use overlap because it's not a moving actor and it's powers of two.

    By accident, I made one of the images 1023 instead of 1024... and even though there wasn't transparency on the edge, that's how GameSalad/iOS treated it. So if you're cutting up actors into odd shapes, you can easily get problems with seams.

    Very nice work on your BOT game! ;)
Sign In or Register to comment.