Looks great. One thing ive noticed, although it could just be in the screen shots, is that the 2 bottom left buttons (red and black x2) are looking a little warped.
Ive seen this happen before if either the buttons are not snapped to a pixel, as in x=20. The other thing that can cause this is if the width / height of the image is an odd number. If you try it with even numbers it will probably lose the error
Matt [import]uid: 5354 topic_id: 1611 reply_id: 4734[/import]
Thanks for noticed.
I’ve checked the .lua code about the position where those tow buttons placed.
This tow buttons are snapped to a pixel indeed.
btnRed = ui.newButton{
x = 58,
y = 292
}
bounceTable:insert( btnRed )
btnBlack = ui.newButton{
x = 58,
y = 233
}
Maybe the Corona has the same image rendering result as Flash player if the image does not have one pixel extend…? [import]uid: 5377 topic_id: 1611 reply_id: 4737[/import]
I thought the same thing originally, like it was rendering like Flash 4, which always messed up images. I used to set them to 99.99% scale and that sorted it out usually. Like it was forcing flash to actually process the image properly.
As for your problem, I remember discussing it back in April with the boys at Ansca. I think the easy solution in your case it to either add or subtract 0.5 from the X values.
Its to do with how objects are positioned within opengl I believe. If you position an object from its centre and it is not an even width then the centre of the object is not on a pixels edge but its in the centre of an actual pixel so when this is rendered back its drawing each pixel of the image over 2 pixels of the display, half in each. This doesn’t look too bad except for at the edge of an object where it gets noticeable.
It’s right! my bounce buttons are in size 77x41.
I added 0.5 from the x value for those buttons, it works!
Thank you very much!!!
And thank you for the clearly explanation too.
I will aware this problem in my next corona project. =)