Problem with Pixels lining up.
In my game, I have certain actors that change their X and Y position based on the position of the actor to their immediate left when. It works about 90% of the time but the other 10% the actor's Y position ends up being 1 pixel off. I know its only 1 pixel but it really makes the game look poorly done when it does that. Due to how my game works, I can't overlap the actors Y by 1 pixel as I do with my X coordinates (which solved the problem with the X coordinates). I believe the GS engine is simply miscalculating or misapplying the Y coordinates by 1 pixel about 1 out of every ten times. Any idea on how to solve this problem. I do have about .5 seconds before everything shows up so my thought was to run a timed check on each result and if it does not equal what it should have the rule run again. But if GS engine is truly miscalculating or misapplying the results it would theoretically have the same issue with the recalculation (but less noticeable b/c would only be about 1 out of 100 (10x10) error rate. Any other potential solutions?
Comments
FYI ... all my images are divisible by 2 so I know that is not the problem. It appears GS is literally reducing for example a 512 pixel image to 511 and leaving a 1 pixel alpha. Or something like that. Of course if my images were the exact same size 512 and 512 they had no problem lining up but when one is bigger than the other I would get the 1 pixel issue (e.g., 512 and 256). This is a big deal for things like slopes and hills.