ATL

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
8bitDaemon
Prole
Posts: 5
Joined: Sat Nov 16, 2013 3:32 am

ATL

Post by 8bitDaemon »

Why hello!

I was experimenting with the Advanced Tile Loader in an attempt to set some tiles up for a platformer. I'm not sure exactly what's going on, but the wrong tiles are being rendered to the screen!

I followed the tutorials.. I'm just lost at using these tools right now. I'm fairly close to attempting my own tile engine.

Attached are a screenshot of the Tiled program(how the tiles should appear), a screenshot of my game screen (how the tiles actually appear), and my .love file.

Any suggestions would be welcome!
Attachments
game.love
My .love file
(399.04 KiB) Downloaded 103 times
Actual Game render
Actual Game render
ATLRender.png (1.02 MiB) Viewed 1479 times
Tiled Screenshot
Tiled Screenshot
TIledTestLayout.png (60.89 KiB) Viewed 1479 times
Germanunkol
Party member
Posts: 712
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: ATL

Post by Germanunkol »

The tileset image is a little too large.

It's 1218*386 pixels. This doesn't fit with the 32*32 pixel width. It seems that tiled cuts of the trailing two pixels while the advanced tiled loaded treats those two pixels as an extra tile. Or vice versa. I'm confused. Anyways, that's why you have an offset of one tile each line (easy to see if you place the whole tileset into the level).
1218/32 = 38.0625 ... so you're not hitting the exact tile border with the image border.
38 tiles * 32 pixels = 1216 pixels.

Simply trim two pixels from the right side and bottom side of the image (gimp -> image -> canvas size -> change size -> save) and you're fine!
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
User avatar
8bitDaemon
Prole
Posts: 5
Joined: Sat Nov 16, 2013 3:32 am

Re: ATL

Post by 8bitDaemon »

Germanunkol wrote: It's 1218*386 pixels. This doesn't fit with the 32*32 pixel width. It seems that tiled cuts of the trailing two pixels while the advanced tiled loaded treats those two pixels as an extra tile. Or vice versa. I'm confused. Anyways, that's why you have an offset of one tile each line (easy to see if you place the whole tileset into the level).
1218/32 = 38.0625 ... so you're not hitting the exact tile border with the image border.
38 tiles * 32 pixels = 1216 pixels.
Image

WELL....... I'll be sure to double check my tile set size from here on out.. I've seriously been banging my head into the wall on this one.
Thank you!
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 45 guests