Page 24 of 27

Re: Advanced Tiled Loader - Updated to 0.12.1!

Posted: Wed May 22, 2013 6:07 pm
by Karai17
I don't think there is an "easy" way, but I may be wrong. What are you trying to do, specifically?

Re: Advanced Tiled Loader - Updated to 0.12.1!

Posted: Wed May 22, 2013 6:17 pm
by markgo
NiliusJulius wrote:
NiliusJulius wrote:So I have been testing several things with ATL. I found ATL today and I must say I like it a lot.

What I would like to know however is the following:
Is it possible to see if a tile has an object 'on top' of it?

For example, I have a tile layer and I want to know from that specific tile if a polygon is covering that tile.
Is there an easy way to do this?
Could anyone help with this?
One way I can think of is to get the bounding box of the polygon. Then get the range of tiles covered by the bounding box and do: tile = tilelayer(x,y) to get the tiles under the object.

Re: Advanced Tiled Loader - Updated to 0.12.1!

Posted: Wed May 22, 2013 6:20 pm
by Karai17
That would probably be one of the better ways to go about it.

Re: Advanced Tiled Loader - Updated to 0.12.1!

Posted: Thu Jun 06, 2013 3:28 pm
by BurnsMan
Could you make a YouTube Tutorial on how to use the Loader to make a 2D Platformer?

Re: Advanced Tiled Loader - Updated to 0.12.1!

Posted: Thu Jun 06, 2013 7:15 pm
by micha
If you are okay with reading, then read this tutorial:
Platform game programming tutorial
It uses Advanced Tiled Loader.

Re: Advanced Tiled Loader - Updated to 0.12.1!

Posted: Thu Aug 01, 2013 2:55 pm
by markgo
Not to hijack Kadoba's thunder, but I made a fork of this. It's a rewrite, but the internal table structures are mostly the same as before. I dropped things which made the code complex such as view culling and drawing individual tiles (Every tilelayer uses spritebatches now). Saving is not supported currently.

* See branch v0.2 for ability to limit draw range
https://github.com/markandgo/Advanced-Tiled-Loader

EDIT: You can now save maps
EDIT2: Added basic support for staggered orientation
EDIT3: Added demo

EDIT4: (2013/12/4) Stable release! No docs yet sorry. Demo included in repository.

Things that are new:
- Ellipses actually look like ellipses instead of boxes
- Class module to make it easier to extend classes
- Improved draw range control
- Staggered map support

Re: Advanced Tiled Loader - Updated to 0.12.1!

Posted: Mon Aug 12, 2013 10:40 am
by Daniel Eakins
markgo wrote:Not to hijack Kadoba's thunder, but I made a fork of this. It's a rewrite, but the internal table structures are mostly the same as before. I dropped things which made the code complex such as view culling and drawing individual tiles (Every tilelayer uses spritebatches now). Saving is not supported currently.

https://github.com/markandgo/Advanced-Tiled-Loader

EDIT: You can now save maps
EDIT2: Added basic support for staggered orientation
Are the function names different? Without documentation this is pretty much unusable for many users.

Re: Advanced Tiled Loader - Updated to 0.12.1!

Posted: Mon Aug 12, 2013 1:14 pm
by markgo
@Daniel Eakins

It's currently WIP, but when it gets more stable, I'll whip up a demo and docs.

Re: Advanced Tiled Loader - Updated to 0.12.1!

Posted: Mon Aug 12, 2013 4:38 pm
by Daniel Eakins
markgo wrote:@Daniel Eakins

It's currently WIP, but when it gets more stable, I'll whip up a demo and docs.
Thanks!

Re: Advanced Tiled Loader - Updated to 0.12.1!

Posted: Wed Dec 18, 2013 8:36 pm
by pacman
Ugh I have problem with reworked ATL for 0.9.
Everything was fine with 0.8

AdvTiledLoader/Map.lua:188: attempt to call field 'tileData' (a nil value)

from using this code

Code: Select all

function isColliding(map, x, y)
	local tileX, tileY = math.floor(x / map.tileWidth), math.floor(y / map.tileHeight)
	local tile = map("walls", tileX, tileY)

	return not(tile == nil)
end
From Map.lua

Code: Select all

function Map:__call(layerName, x, y)
	return self.tileLayers.tileData(x,y)
end
I have no idea what could go wrong.
Any ideas?