How does Qiso render the map on the screen edges

I’m experiencing a different behavior between the map rendering in the simulator and on my Android phone.

If you look at the bottom of the screen, the map is cropped horizontally on my mobile but not on the simulator.

I wonder if this has to do with my config.lua and if so, how can I achieve the same behavior as I get in the simulator?

Simulator:

Samsung S8:

--config.lua application = {     content = {         width = 1080,         height = 1920,          scale = "letterbox",         fps = 30,     } }

Hmm. That’s definitely not supposed to happen! Leave it with me - we have an S8 to test on so I should be able to replicate.

Sorry, I’ve not been able to replicate this on an S8 using portrait orientation and the same 1080x1920 letterbox config as you. For me, it’s working properly.

Looking at your screenshot again, I’m wondering if it’s actually your tilemap that’s not quite right. If you’re using a spritesheet of say… 256x1024 px sprites and your actual tiles are 256x128 px in size, then Qiso basically sets the origin of those 256x1024 sprites to be 128x960, i.e. 64px from the bottom of the sprite (the middle of the 128px tall tile). Therefore if you’re drawing the tile graphic at the top of that sprite area instead of at the bottom, it’ll render higher up than it’s supposed to.

The easiest way to tell if your sprites are correct is probably to load a world of only 1 tile, and then qiso.goTo() that tile to centre the camera on it. The tile should appear exactly in the centre of the screen both horizontally and vertically.

I’ve done the test you mentioned and the tile is pretty much centered (I used qiso.goTo(1,1) )

In my case, my tile is 128x72 and I only have this tile in the tileset (for now). Does that mean that the origin will be set at 128x36 ? Do I need to expand the image vertically so it is 128x144?

Nope, your sprite can be any height that you like. Qiso uses the width to figure out the vertical origin. For 128px wide sprites the tiles centre will always be 32px from the bottom of your canvas, giving you infinite vertical space to add height extending upwards from the tile base.

Your crosshair in that screenshot is actually exactly where it should be, meaning your sprite is correct after all. Those grass blades extend upwards into that infinite space, so they’re supposed to be above the crosshair as you’ve found. The actual diamond of the tile looks to be perfectly in the middle of the screen, so we’re good there.

Unfortunately this does mean that my previous response was wrong. It’s not your tileset, so I’m not sure what it could be now!

Would you mind sending me your project to have a look at please? I think you have my email already, assuming you don’t want to attach publicly.

Project sent by email. We’ll post the conclusion here once we have figured out what the issue is.

To update anybody following this thread - we did indeed find a bug with the off-screen culling and have now resolved. I’ve just pushed an updated build live so the Corona build servers should pick this up within an hour or so.

The issue only affected games displayed in portrait mode and running on devices of certain screen resolutions, but if you’re using Qiso within an already released game that’s built to be played in portrait, please do compile a new build to pick up the fix. Sorry for any inconvenience there!

And I can confirm that the problem is fix when re-building the app :slight_smile: