Hi Brent,
After a long time, I finally found the culprit.
It was very hard to find, but the issue is easy to reproduce.
The issue occurs if texture wrapping display.setDefault( “textureWrapX”, “repeat” ) is enabled AND the display object is assigned a non-integer value of X. (or Y if your texture is repeating on the Y axis).
My platform class has a method to generate the platform’s position randomly and I was not rounding it to the closest integer (Lua and its non-existant datatyping…)
I guess that a non-integer value of x/y forces texture re-sampling even though the display object has a declared size exactly the same as the actual image (85 * 87 px). Documentation http://docs.coronalabs.com/api/library/display/newImageRect.html#texture-sampling says texture re-sampling only occurs when the newImageRect is using an image sheet (not the case here) and need to be resized (not the case here). Clearly here, display.setDefault( “textureWrapX”, “repeat” ) should not have any impact on a newImageRect from an image (not image sheet) that is not resized, so I still consider it a minor bug.
Maybe a “Gotcha” section should be added to http://docs.coronalabs.com/api/type/DisplayObject/x.html to mention that x/y must be integers or else glitches may appear. I know when you think about it, it does not make much sense to assign non-integer values for something supposed to be pixels, but I can see a lot of people setting x or y values calculated from a height/width ratio or something, thus assigning non-integer values without even noticing.
Anyway, you were right that there was something wrong with my code, so thank you for that.
endy
EDIT: I’m getting closer, but the above only works if the device has exactly the same resolution defined in config.lua, if I try it on devices with a different resolution and scaling occurs the issue is still there.