I’m using MTE v821
The frameborder on my simulator is the Iphone5, with the simulator zoomed out as far as possible.
I’m not using any mte zoom functions.
Here is my config.lua:
application = { content = { width = 320, height = 480, scale = "letterBox", fps = 30, --[[imageSuffix = { ["@2x"] = 2, } --]] }, --[[-- Push notifications notification = { iphone = { types = { "badge", "sound", "alert", "newsstand" } } } --]] }
Here is what i’m using to setup my world and the sprites:
function scene:willEnterScene( event ) local group = self.view --LOAD MAP ------------------------------------------------------------ mte.toggleWorldWrapX(true) mte.toggleWorldWrapY(true) mte.loadTileSet("basicTileset", "tilesets/tileset.png") print("Loading: maps/" .. worldData.nextMap .. ".json") mte.loadMap("maps/" .. worldData.nextMap .. ".json") setEnemyPool() setNPCSprites() --SETUP D-PAD ------------------------------------------------------------ controlGroup = display.newGroup() DpadBack = display.newImageRect(controlGroup, "images/dpad.png", 60, 60) DpadBack.x = 60 DpadBack.y = display.viewableContentHeight - 60 DpadUp = display.newRect(controlGroup, DpadBack.x - 12, DpadBack.y - 34, 25, 25) DpadDown = display.newRect(controlGroup, DpadBack.x - 12, DpadBack.y + 7, 25, 25) DpadLeft = display.newRect(controlGroup, DpadBack.x - 34, DpadBack.y - 13, 25, 25) DpadRight = display.newRect(controlGroup, DpadBack.x + 7, DpadBack.y - 13, 25, 25) DpadBack:toFront() --HIDE LEVELS ------------------------------------------------------------ playerSprite = player:getSprite() playerSprite:addEventListener("touch", displayMenu) layers = mte.getLayers() layerObjects = mte.getLayerObj() startPos = mte.getObject({name="startPos"}) if playerSprite.locX == nil and playerSprite.locY == nil then playerSprite.locX = tonumber(startPos[1].properties.x) + 1 playerSprite.locY = tonumber(startPos[1].properties.y) + 1 end for i = 1, #layers, 1 do if not layers[i].properties.objectLayer then end if layers[i].properties.level \> 2 then mte.fadeLayer(i, 0, 0) end end mte.goto({ locX = playerSprite.locX, locY = playerSprite.locY, blockScaleX = 32, blockScaleY = 32}) --CREATE playerSprite SPRITE ------------------------------------------------------------ setup = { kind = "sprite", layer = mte.getSpriteLayer(1), locX = playerSprite.locX, locY = playerSprite.locY, levelWidth = 32, levelHeight = 32 } mte.addSprite(playerSprite, setup) mte.setCameraFocus(playerSprite) -- CREATE NPC SPRITES ON THE MAP -- for name, npc in pairs(worldData.npcs) do setup = { kind = "sprite", layer = mte.getSpriteLayer(1), locX = npc:getLocX(), locY = npc:getLocY(), levelWidth = 32, levelHeight = 32 } mte.addSprite(npc:getSprite(), setup) end -- DETECT MOVEMENT ------------------------------------------------------------ DpadUp.id = "up" DpadDown.id = "down" DpadLeft.id = "left" DpadRight.id = "right" movement = nil battleCount = 0 DpadUp:addEventListener("touch", move) DpadDown:addEventListener("touch", move) DpadLeft:addEventListener("touch", move) DpadRight:addEventListener("touch", move) Runtime:addEventListener("enterFrame", gameLoop) end
All of my tiles are 32x32 sized tiles.