Page 1 of 1
Get Width and Height of STI (Simple Tiled Implementation) map
Posted: Sun Mar 13, 2022 1:43 am
by Vectoral
I'm using STI by karai17 and had a quick question about how to get the width and height of a map in pixels, thanks!
Re: Get Width and Height of STI (Simple Tiled Implementation) map
Posted: Sat Apr 30, 2022 5:21 pm
by NoreoAlles
If you know how big each tile is, just multiply that by the width or height.
Re: Get Width and Height of STI (Simple Tiled Implementation) map
Posted: Fri Jun 03, 2022 3:23 pm
by RamblinLane
gameMap = sti('maps/testMap.lua')
mapW = gameMap.width * gameMap.tilewidth
mapH = gameMap.height * gameMap.tileheight