I recently posted my android game in "Games and Creations". In there, user darkfrei posted a problem with the game. I tried to reproduce it on my side, but unfortunately I don't own many devices, and everything works fine on PC, my and my friends devices, android emulators on multiple android versions and screen sizes. I know that on bluestacks it's fine, and only tried android studio's x86 images using liko-love, because official android love release doesn't support x86, and emulated arm images are so slow that adb times out trying to install the app. Because I couldn't reproduce it, I decided to put it aside and hoped that it's a one-off with this particular device (darkfrei said it's Lenovo yoga tab 3 10).
Unfortunately, I recently got informed by another person, that he has this same exact problem. He provided me with a screenshot (attached to the post) very similar to darkfrei's. He says he uses Cloudfone Excite Prime with android 5.1. Because I'm kinda out of options, I'm asking for your help.
I have a theory that it has something to do with older android versions, because both problematic devices are a bit old. As I said I couldn't reproduce it on x86 emulators of those older versions, but I guess it's no surprise that the problem only occurs on physical/arm devices.
It seems very strange to me that the everything else besides the level itself renders correctly. The only thing that seems to be unique to the tile rendering is the usage of quads. Here is my related code:
First, I take the tilemap image and cut it into adequate quads (quadMargin is used to avoid tile bleeding):
Code: Select all
for i = 0, tileset.tilecount - 1 do
local x = (i % tileset.columns) * tileset.tilewidth
local y = math.floor(i / tileset.columns) * tileset.tileheight
quads[i + 1] = love.graphics.newQuad(x + quadMargin, y + quadMargin,
tileset.tilewidth - quadMargin - quadMargin,
tileset.tileheight - quadMargin - quadMargin, tilemap:getDimensions())
end
Code: Select all
for j = 0, self.height - 1 do
local y = j * self.tileHeight
for i = 1, self.width do
local x = (i - 1) * self.tileWidth
local tile = layer[(j * self.width) + i]
if tile > 0 then
love.graphics.draw(self.tilemap, self.quads[tile], x, y, 0, 1.035)
end
end
end
Is there anyone who experienced similar problems on android? Or do you maybe see something I'm doing wrong that could be architecture/device/platform-dependent?
Sorry for the wall of text. If you ploughed through and read it all - thank you already. I'll be grateful for any sort of help, because the only alternative for me is to cut out older android support (5.1 at least).