Discord
Login
Community
DARK THEME

Small gaps between sprite parts

I am using screen.drawSpritePart to draw various tiles from a single file. I am not using maps for this because I need to be able to create this programmatically, and as far as I can tell maps are not currently dynamic.

However, I've noticed that when displaying multiple tiles, there are slight gaps in-between them. I have checked their positions, and they all differ by exactly 16 (each tile is 16x16), so I am not sure what is causing these gaps.

Regarding the gaps, that's definitely one for @gilles. Actually he released an update related to a similar issue, he will be so happy, LOL. (Details on Discord)
Regarding the maps, what 'dynamic' functions do you need?
You can create your own maps and get/set tiles from the program. See Documentation -> API Cheatsheet

### Maps #### Create Map map = new Map( width_in_tiles, height_in_tiles, tile_pixel_width, tile_pixel_height ) #### Map functions map.get( x, y ) map.set( x, y , "sprite" ) map.set( x, y , "tilemap:4,6" ) // sub-tile from spritesheet

Live Long and Tinker

Oh, I was unaware of the map constructor! That'll definitely be the best solution for what I'm doing, then.

Regarding the gaps between sprite parts, is that an issue I should report somewhere?

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community