Get Width and Height of STI (Simple Tiled Implementation) map

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Vectoral
Prole
Posts: 1
Joined: Sun Mar 13, 2022 1:39 am

Get Width and Height of STI (Simple Tiled Implementation) map

Post 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!
User avatar
NoreoAlles
Party member
Posts: 130
Joined: Mon Jan 03, 2022 5:42 pm

Re: Get Width and Height of STI (Simple Tiled Implementation) map

Post by NoreoAlles »

If you know how big each tile is, just multiply that by the width or height.
"Why do they call it oven when you of in the cold food of out hot eat the food?" - Jon Arbuckle
RamblinLane
Prole
Posts: 4
Joined: Fri Jun 03, 2022 11:42 am

Re: Get Width and Height of STI (Simple Tiled Implementation) map

Post by RamblinLane »

gameMap = sti('maps/testMap.lua')

mapW = gameMap.width * gameMap.tilewidth
mapH = gameMap.height * gameMap.tileheight
Post Reply

Who is online

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