I’ve built my game for android and am running it on my Nexus S and I’m noticing an odd issue around tiles from a loaded tilemap (especially when the screen is moving).
I’ve attached a screenshot (it won’t let me add more files?) that shows the issue on the left and right side. Though I’ve certainly seen more issues (though it is a little hard to get a good screenshot).
This issue does not occur when I target Mac OS and build for that. Any tips are appreciated! Let me know if I should provide more information or try to get a better screenshot.
No responses, maybe a different approach would be better ;)…
I assume someone has successfully used CCTMXTiledMap on an android device and didn’t have VERY noticeable alignment issues (or other odd graphical issues)when the screen moved around. If that someone is you, what picture type did you use? Did you build it using Texture Packer? If so, what options did you select? What android API version were you targeting (I left it as 8 which is what it was set at in the proj.android folder)?
EDIT Though this feels like its on the right track (visually very similar)? Any suggestions on what I could pass to setTexParameters() to see if it would help? I’ll go investigate how to use this in the mean time :).
After playing around with it I realized that it was borrowing a pixel from the tile next to it. I’m guessing it was trying to draw the tile on a spot that slightly larger than the tile size so it went to its neighbor. I could probably avoid having that issue by better laying out my sprite sheets in the future though having it stretch (which is what that flag sounds like it does) solves the issue well enough for me.
@ C.J. Kimberlin
I fixed the similar issue with that code. What type of projection are you using? If you are using kCCDirectorProjection3D , try setting it to kCCDirectorProjection2D
In your AppDelegate.cpp in function applicationDidFinishLaunching() put the below code