Hello,
currently I am recoding a game that I've wrote about half a year ago. I have seen that Advanced Tiled Loader is not being developed anymore so I switched to Simple Tiled Implementation.
My problem is that tileData does not exist anymore. In the documentation of STI I cannot find an alternative function. How can I solve this problem?
Regards,
lxndio
Switching from ATL to STI - tileData does not exist anymore
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Switching from ATL to STI - tileData does not exist anym
What I would do is go through the class file and see what properties and methods the class contained, what & when its method's return or updated its properties, I looked through map.lua and compiled a list of properties and its methods, this list may or may not be complete
Based on the information above you could possibly extend the functionality of STI and write a get method to retrieve whatever information you need by placing it right inside the file before the line where it says return Map.
Example: This would return a table of all the properties of Map
Ofourse you would need to know what each property is and what kind of data is may or may not hold, somethings might be tables some might be strings, some might be numbers
Code: Select all
--Properties of map
self.tilewidth
self.tileheight
self.canvas
self.tiles
self.tileInstances
self.drawRange
self.drawRange.sx
self.drawRange.sy
self.drawRange.ex
self.drawRange.ey
self.width
self.height
self.tilesets
self.layers
self.orientation
--Methods of map
Map:init(path, fw)
Map:initWorldCollision(world)
Map:setTiles(index, tileset, gid)
Map:setLayer(layer, path)
Map:setTileData(layer)
Map:setObjectCoordinates(layer)
Map:setSpriteBatches(layer)
Map:setObjectSpriteBatches(layer)
Map:setDrawRange(tx, ty, w, h)
Map:addCustomLayer(name, index)
Map:convertToCustomLayer(index)
Map:removeLayer(index)
Map:update(dt)
Map:draw(sx, sy)
Map:drawLayer(layer)
Map:drawTileLayer(layer)
Map:drawObjectLayer(layer)
Map:drawImageLayer(layer)
Map:drawWorldCollision(collision)
Map:resize(w, h)
Map:convertIsometricToScreen(x, y)
Map:convertScreenToIsometric(x, y)
Map:convertTileToScreen(x, y)
Map:convertScreenToTile(x, y)
Map:convertIsometricTileToScreen(x, y)
Map:convertScreenToIsometricTile(x, y)
Map:convertStaggeredTileToScreen(x, y)
Map:convertScreenToStaggeredTile(x, y)
Example: This would return a table of all the properties of Map
Code: Select all
function Map:getEverything()
return {
self.tilewidth,
self.tileheight,
self.canvas,
self.tiles,
self.tileInstances,
self.drawRange,
self.drawRange.sx,
self.drawRange.sy,
self.drawRange.ex,
self.drawRange.ey,
self.width,
self.height,
self.tilesets,
self.layers,
self.orientation
}
end
return Map
Re: Switching from ATL to STI - tileData does not exist anym
What exactly do you need tileData for?
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: Ahrefs [Bot], Bing [Bot] and 4 guests