Problem with placing actors?
hi, i am trying to place 13 actors horizontal and 7 vertical. my actor is 32x32 , so my first actor is on x=56 y=102, so i want my second actor next to each other, so my next actor is at x=88 and y=102, now this actor look ok, but my third is on x=120 and y=102 but his actor is a little speared from actor 2. don't if my actor is 32 width, i should i add 32 extra to my second actor?, so if first actor stars at x=56, then the following actors would be at 88,120,152,184,216,248,280,312,344,376,408,440 all this is for x position
for y position first actor is at y=102, so the following actor on top should be 134,166,198,230,262. but after finish this there are spaces between actors, some with more spaces than others. i try reducing 1 pixel width on some but i can't get it right., pretty much a good example will be placing actors to form a chess game board, how i align them right?
for y position first actor is at y=102, so the following actor on top should be 134,166,198,230,262. but after finish this there are spaces between actors, some with more spaces than others. i try reducing 1 pixel width on some but i can't get it right., pretty much a good example will be placing actors to form a chess game board, how i align them right?
Comments
It appears that I need to change something about the image to fix it (tiled, different size?). I put this on the back burner to solve later but maybe I will try to fix it when I get home tonite.
-Thomas
Yes I did make the image in Photoshop and saved it out as a .png
IS there something else I need to do?
Puzzling.
I had a 80x80 image that I re-sized to 40W x 64H in Photoshop. Then I applied that 40x64 image to all of the 20x32 actors in the grid. Despite the correct spacing of the actors, there are non-uniform gaps observed with the 40x64 images applied. It is not terrible looking, but it bugs me just because I want it to be perfect. I had bigger fish to fry until I saw this thread here.
Should I start from scratch in PS with a 40x64 canvas? Seems a good thing to try.
@guilleface - Sorry for the threadjacking.
Also you may want to see how it looks on the device because sometimes on the GS preview may looks not exactly like on the real thing.
@MarkOnTheIron - I figured it might just be a GS viewer error and that maybe on the device it will be OK. But it is interesting that others are seeing the same issue. Anyone know if it is resolved once the build is played on the device?
I came home and made a quick image in Photoshop.
Image size 40W x 64H
Flattened the layers
saved it out as png
Applied it to my 20W x 32H actors
The spacing now appears to be perfect. So I guess either resizing or not flattening the image in Photoshop was causing some sort of wonkiness. Perhaps the resizing was no good in my first try because I changed the aspect ratio from 80 x 80 to 40 x 64.
In any case, it seems to be working now. Thanks for the help!
Yeti/inmonjones
Did you make up your image in Photoshop ? - Check !
Did you work at a larger size and then resize the image down to the final smaller tile size ? - Check !
When you resized the image in Photoshop was in layer/s? - Check !
These three together will always give you this problem.
When you resize something in Photoshop - it must interpolate/resample all the pixels in the image.
So . . . whereas a pixel in the centre of the image can sample all those pixels around it, the pixels at the edges effectively have half their pixels missing (the 'missing' pixels are off the page / 'invisible' / non-existent).
So the best Photoshop can do is to interpolate/resample using transparency in lieu of actual real colour values - and when half your sample is transparent then the result will show that.
The result is that if you resample something (with the caveat of the file being a 'layer' rather than a 'background') you will find that the edge pixels will (must) have some level of transparency. Usually you wouldn't notice this on a 'normal' sized image (things for web or print - for example) - but get down to tiny icon sized things and a pixel becomes important - and you only compound this problem by putting two of these troubled images alongside each other, effectively doubling the 1 pixel wide artefact to 2 pixels wide.
The solution is easy enough -in Photoshop - once you've resized your image down to it's final size, flatten it, cut and paste the whole image on top of itself a few times (so you have a few identical layers) flatten all those duplicate layers into one and the transparent edges are gone.
I may go back and see if earlier GS versions have this problem - I am sure this would have been noticed before.
Ace
http://dl.dropbox.com/u/46439975/photo-3.PNG
http://dl.dropbox.com/u/46439975/photo-2.PNG
Ace