Advanced Tiled Loader - No longer maintained
Re: Advanced Tiled Loader - Updated to 0.11.2!
If you want to draw everything regardless of where the camera is you can set map.viewW and map.viewH to math.huge.
Re: Advanced Tiled Loader - Updated to 0.11.2!
Hi,
First of thanks for this. Looks great and I would like to use it. I'm having an issue though.
When I launch the app, it shows the map and then directly starts fading out and I only see this:
This is my code:
Does anyone maybe know why this happens?
edit: This seemed to be an issue with getColor() and being handled in IRC. Not an issue in ATL specifically apparently.
First of thanks for this. Looks great and I would like to use it. I'm having an issue though.
When I launch the app, it shows the map and then directly starts fading out and I only see this:
This is my code:
Code: Select all
-- Isometric Test
function love.load()
loader = require "AdvTiledLoader.loader"
loader.path = "maps/"
map = loader.load("desert.tmx")
end
function love.keypressed(k)
if k == 'escape' then
(love.event.push or love.event.quit)('quit')
end
end
function love.draw()
map:draw()
love.graphics.print("Hello World", 100, 100)
end
edit: This seemed to be an issue with getColor() and being handled in IRC. Not an issue in ATL specifically apparently.
Re: Advanced Tiled Loader - Updated to 0.11.2!
Still asking for a way to skin maps. I also had a thought about it, what if you saved multiple tilesets in your tiled map, and then the ATL would simply allow you to assign different tilesets to each layer. I don't think it would be hard, you would just be pointing it to another tileset in the currently loaded map. If it is hard let me know. If you don't want to do it let me know if there's a way I could do it myself?
Anyways thanks again for the great library!
Anyways thanks again for the great library!
Keith Weatherby II / twitter / facebook / youtube
IndieFlux - Reviews and more! / Games Afoot Software
IndieFlux - Reviews and more! / Games Afoot Software
Re: Advanced Tiled Loader - Updated to 0.11.2!
The easiest way would probably be to swap out the image on the tilesets after you load them.
Code: Select all
-- Switch a skin. The skin parameter is a table that has images for all of the different tilesets indexed by their name.
local function reskin(map, skin)
-- Switch all of the tileset images to new skins but only if they exist
for tilesetName, tileset in pairs(map.tilesets) do
if skin[tilesetName] then
tileset.image = skin[tilesetName]
end
end
-- Clear all of the sprite batches. They use the old images. New ones will automatically be created.
for layerName, layer in pairs(map.layers) do
if layer.class == "TileLayer" then layer._batches = {} end
end
-- Force a redraw of the sprite batches.
map:forceRedraw()
end
-- Load the map
local map = Loader.load("myMap.tmx")
-- Suppose these were full of images for the tilesets
local night = {}
local day = {}
-- Switch all tiles to night time
reskin(map, night)
-- Switch all of the tiles to day time.
reskin(map, day)
Re: Advanced Tiled Loader - Updated to 0.11.2!
Advanced Tiled Loader has been updated to 0.12.0.
It is now possible to save maps! In addition you can now set ATL properties inside of Tiled itself.
It is now possible to save maps! In addition you can now set ATL properties inside of Tiled itself.
Re: Advanced Tiled Loader - Updated to 0.12.0!
Oh wow, both of those features are awesome! I feel like now we can use ATL to create a living-world MMO-type game where players can interact directly with the world and if a server resets, all changes aren't lost
Is the world save very resource intensive? Would there be any noticeable lag during a world save event?
Is the world save very resource intensive? Would there be any noticeable lag during a world save event?
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Re: Advanced Tiled Loader - Updated to 0.12.0!
I would also like to note that the saved maps are saved as "csv" and are uncompressed. This is because the current library I use for zlib/gzip only decompresses. If anyone could find me a pure-lua library/script that can compress into zlib/gzip I would be grateful.
If you're going to have the time and resources to make a large game like that you might want to make your own data format. If you take that route then you could use the provided save feature now and easily substitute your own later. Who knows, maybe it will be fast enough for your needs.
It depends on what you mean by MMO-type and how you plan to structure your game. Maps have to be serialized into an uncompressed XML document which is very slow and large on the disk (comparatively). It's perfectly fine for most single player games, but you're going to run into issues if you want to quickly save entire multiplayer living game worlds.Karai17 wrote:Oh wow, both of those features are awesome! I feel like now we can use ATL to create a living-world MMO-type game where players can interact directly with the world and if a server resets, all changes aren't lost
Is the world save very resource intensive? Would there be any noticeable lag during a world save event?
If you're going to have the time and resources to make a large game like that you might want to make your own data format. If you take that route then you could use the provided save feature now and easily substitute your own later. Who knows, maybe it will be fast enough for your needs.
- KingRecycle
- Prole
- Posts: 44
- Joined: Thu May 24, 2012 1:01 am
Re: Advanced Tiled Loader - Updated to 0.12.0!
I feel like I saw this but I can't find it.
Is there a way to not draw a specific layer but keep it's properties?
Is there a way to not draw a specific layer but keep it's properties?
Re: Advanced Tiled Loader - Updated to 0.12.0!
Yes. You can hide a specific layer by setting Layer.visible to false or you can change the map to not draw any object layers by setting Map.drawObjects to false.KingRecycle wrote:I feel like I saw this but I can't find it.
Is there a way to not draw a specific layer but keep it's properties?
Code: Select all
-- Hide a layer
map("MyLayer").visible = false
-- Hide all object layers
map.drawObjects = false
Re: Advanced Tiled Loader - Updated to 0.12.0!
A thought. How feasible would it be to use ATL without grid locking? And further on that notion, How feasible would it be to detect collisions with objects without grid locking? For instance, if I have a rock sitting in the middle of a tile, How could I detect only the part of the tile that is not transparent? Would I maybe need semi-complex polygons over top the collision area, or would it be possible to determine if the sprite's opaque pixels are going to collide with the rock's opaque pixels?
I like ATL very much; working with Tiled maps is quite easy and I wouldn't want to lose such a great tool for this thing I am about to start working on.
I like ATL very much; working with Tiled maps is quite easy and I wouldn't want to lose such a great tool for this thing I am about to start working on.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Who is online
Users browsing this forum: No registered users and 8 guests