Thanks Caleb!
Ok, I understood that the 4px spacing is for one tile only (total 8)
Now I made 64x64 tiles with spacing 4px and no margin. But…
Please, could you check the pic below. Everything seems to work fine but with iPhone5 the tile proportions are weird. Also with iPad and iPad retina.
Caleb_P
February 16, 2015, 8:05pm
42
Hm… That looks weird. What are your scaling options in your config.lua? What’s your screen size in config.lua?
application = {
content = {
width = 640,
height = 960,
scale = “letterBox”,
fps = 30,
audioPlayFrequency = 22050,
imageSuffix = {
["@2x "] = 2,
},
}
}
Caleb_P
February 17, 2015, 12:32pm
44
Do you have an @2x tileset as well as your normal one?
Well, I’ve tried everything Tried with or without @2x-file .
Could you please check attached project. It’s very simple: http://aatosmedia.fi/tmp/dusktest.zip
Don’t know what is the proper way to do this, but what do you think about this:
Draw tileset (tile 64x64): tileset@2x.png (spacing 8px) (for retina)
Reduced tile size to 32x32: tileset.png (spacing 4px)
Made a new Tiled project with tile 32x32 and spacing 4.
Caleb - I really appreciate your help
Caleb_P
February 18, 2015, 12:42pm
46
Ok, I think I’ve figured it out. This is because Dusk tries to auto-scale objects to fit the screen. To disable this, comment out line #146 of Dusk/dusk_core/layer/tilelayer.lua, or set your config scale mode to “none”. I’ll see if I can add a non-manual fix for this to Dusk in the future.
Thanks Caleb! That was the case indeed.
If I set the
map.setCameraFocus(mario) map.setTrackingLevel(0.1)
I can see sometimes blinking lines. I’ve set the spacing (4 px for 32x32 tiles and 8px for @2x tiles) and set the texture filter
display.setDefault("minTextureFilter", "nearest") display.setDefault("magTextureFilter", "nearest")
You once mentioned, that there is also one more thing you can do OR is the problem that I’m using physics?
Caleb_P
February 18, 2015, 1:12pm
48
Is this on device, or on the simulator? The simulator sometimes shows blinking lines, but not usually the device.
As long as you have a fairly recent version of Dusk, have your tiles set to static body type, have spacing, and have the correct texture filter, you should be ok.
Is this on device, or on the simulator? The simulator sometimes shows blinking lines, but not usually the device.
As long as you have a fairly recent version of Dusk, have your tiles set to static body type, have spacing, and have the correct texture filter, you should be ok.
Tested on device and it works perfectly