We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, I am using Processing in an Android game. The renderer is P2D (at least for my phone) and I add the following line to the setup():
The game is 2D but I make some artificial depth effects... In some cases, I have to breakdown a image into two, because I want to place another object in between. My current strategy is to have two images of the same size, one is photoshoped to remove the left half part (leaving alpha transparency) and the other to remove the right half part.
That way, I don't have to make any calculation and the position of the left image is exactly the position of the right image, since they have the same size. They overlap perfectly if I don't scale them.
But when I do scale them directly using something like:
image(x, y, width*scale, height*scale)
Then, there is a grey line showing the border between the top image (the one that I draw last) and its supposedly transparent half. As if while scaling the image, it created a gradient of colors around my image, rather than keeping the borders intact...
How can I prevent that?
I tried removing a little less than half the images, so that I am sure there is no gap, but it just translated the problem to another part of the image...
You can see the bug for real in my app, on the google store: https://play.google.com/store/apps/details?id=net.yohanfarouz.friedchicken If you look at the farm panel, you'll notice that the white chicken seems cut in two parts.
PS: it's not an attempt the advertise it, it's just simpler/faster than making printscreens