I made a map using a tilesheet that has 128x128 tiles, and I created a sprite that is 120px high, but he isn’t even close to the same size as the tile. I looked through the MTE file for a bit, but figured asking here might get me an answer faster. How do I scale sprites that are added onto the map?
Ah, nevermind, just found it in the code.
mte.addSprite(sprite, {sourceHeight = 64, sourceWidth = 64,}) makes it half the size of my tile.
I guess a better question would be, how to make the borders of my map line up with the border of the screen. When I go to coordinate 1,1 for example, I get a large black area off to the west and north of my character due to the empty space. How do I make the screen not move past that border?
The MTE function constrainCameraToScreen(parameters) will keep the camera from moving past the border.
Thanks dyson! Is there an FAQ I can go to in the future?
There is a FAQ, but it is pretty sparse at the moment and doesn’t cover these sorts of questions. Unfortunately some of the documentation has lagged rather far behind. Usually I focus on engine improvements first and then the API documentation second, leaving little time to update the tertiary docs like the FAQ.
I recommend perusing the API documentation to get an idea what functions are available to you. That, at least, is kept up to date! Also, feel free to ask any questions you might have here in the forums. I’m usually online at least every other day if not more often than that.
Ah, nevermind, just found it in the code.
mte.addSprite(sprite, {sourceHeight = 64, sourceWidth = 64,}) makes it half the size of my tile.
I guess a better question would be, how to make the borders of my map line up with the border of the screen. When I go to coordinate 1,1 for example, I get a large black area off to the west and north of my character due to the empty space. How do I make the screen not move past that border?
The MTE function constrainCameraToScreen(parameters) will keep the camera from moving past the border.
Thanks dyson! Is there an FAQ I can go to in the future?
There is a FAQ, but it is pretty sparse at the moment and doesn’t cover these sorts of questions. Unfortunately some of the documentation has lagged rather far behind. Usually I focus on engine improvements first and then the API documentation second, leaving little time to update the tertiary docs like the FAQ.
I recommend perusing the API documentation to get an idea what functions are available to you. That, at least, is kept up to date! Also, feel free to ask any questions you might have here in the forums. I’m usually online at least every other day if not more often than that.