Karai17
Party member
Posts: 909
Joined: Sun Sep 02, 2012 10:46 pm

I don't think there is an "easy" way, but I may be wrong. What are you trying to do, specifically?
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
markgo
Party member
Posts: 189
Joined: Sat Jan 05, 2013 12:21 am
Location: USA

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.
Karai17
Party member
Posts: 909
Joined: Sun Sep 02, 2012 10:46 pm

That would probably be one of the better ways to go about it.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé
BurnsMan
Prole
Posts: 1
Joined: Tue Jun 04, 2013 9:18 pm

Could you make a YouTube Tutorial on how to use the Loader to make a 2D Platformer?
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Platform game programming tutorial
markgo
Party member
Posts: 189
Joined: Sat Jan 05, 2013 12:21 am
Location: USA

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

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

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
Last edited by markgo on Wed Dec 04, 2013 3:59 pm, edited 5 times in total.
Daniel Eakins
Citizen
Posts: 99
Joined: Thu Jul 18, 2013 9:14 pm
Location: France

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.

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.
markgo
Party member
Posts: 189
Joined: Sat Jan 05, 2013 12:21 am
Location: USA

@Daniel Eakins

It's currently WIP, but when it gets more stable, I'll whip up a demo and docs.
Daniel Eakins
Citizen
Posts: 99
Joined: Thu Jul 18, 2013 9:14 pm
Location: France

markgo wrote:@Daniel Eakins

It's currently WIP, but when it gets more stable, I'll whip up a demo and docs.
Thanks!
pacman
Citizen
Posts: 81
Joined: Thu Mar 14, 2013 4:10 pm

Ugh I have problem with reworked ATL for 0.9.
Everything was fine with 0.8

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?

### Who is online

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