What is the best way to put 1200x800 background in a game?
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?
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
Kipper
Edit Tsb strikes again but didn't mention the snap to grid fairy like me :P
Thanks guys..
Your 1200x800 is an odd resolution. Why are you using that? Stick with something more common to a monitors resolution.
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.
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.
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!
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.