Long and lovely: In this scenario, I have a tile set composed of 32x32 tiles in a 192x128 image. I generate 24 squads from this as such:
Code: Select all
local tile_id = 0
for x=0, 5 do -- tileset is currently 6x4
for y=0, 3 do
tile_id = tile_id + 1
global.tiles.bunker_gray[tile_id] = love.graphics.newQuad(x*global.tilesize, y*global.tilesize, global.tilesize, global.tilesize, global.tilesetwidth, global.tilesetheight)
end
end
I then render these quads via spritebatching as such:
Code: Select all
for x=1, xMax do
for y=1, yMax do
if map_data[z][x][y]['tiletype'] then
global.spritebatch.bunker_gray:addq( global.tiles.bunker_gray[ map_data[z][x][y]['tiletype'] ], x*global.tilesize, y*global.tilesize)
end
end
end
love.graphics.draw(global.spritebatch.bunker_gray,0,0)
I can reliably reproduce this when I try to scale. I tried some weird ways around it, like telling it to draw only 31 pixels in, et cetera, but to no avail.
Suggestions? Or is this just the way it is with SDL scaling? If the latter, I suppose I can always make my tiles 64x64 to begin with and just not scale, but I was really hoping to have nifty zoom features.