Hello michael714,
With the Million Tile Engine you simply create a sprite using Corona’s API and then add it to the map with an MTE function call.
local spriteSheet = graphics.newImageSheet("SonicSprite2.png", {width=64, height=70, numFrames = 224}) local sequenceData = { {name= "standRight", sheet = spriteSheet, frames = {1,2,3,4,5}, time = 200, loopCount = 0}, {name= "walkRight", sheet = spriteSheet, frames = {17,18,19,20,21,22,23,24}, time = 400, loopCount = 0}, {name= "runRight", sheet = spriteSheet, frames = {49,50,51,52}, time = 200, loopCount = 0}, {name= "jumpRight", sheet = spriteSheet, frames = {65,66,67,68}, time = 400, loopCount = 0}, {name= "standLeft", sheet = spriteSheet, frames = {16,15,14,13,12}, time = 400, loopCount = 0}, {name= "walkLeft", sheet = spriteSheet, frames = {32,31,30,29,28,27,26,25}, time = 400, loopCount = 0}, {name= "runLeft", sheet = spriteSheet, frames = {64,63,62,61}, time = 200, loopCount = 0}, {name= "jumpLeft", sheet = spriteSheet, frames = {80,79,78,77}, time = 400, loopCount = 0} } local player = display.newSprite(spriteSheet, sequenceData) local setup = {layer = 5, kind = "sprite", locX = 10, locY = 10, levelWidth = 64, levelHeight = 70, offsetX = 0, offsetY = 0 } mte.addSprite(player, setup)
It is important to note that Lime was designed to use Corona’s physics API while MTE was not. The next update to MTE will include samples demonstrating platforming physics without the physics API. The code above is from the Sonic Finale sample (available at the end of the week):
[media]http://www.youtube.com/watch?v=sZ5I1zI5HmM[/media]
I would not say sprites are easier in MTE, just different. The primary advantage of the Million Tile Engine is it’s speed regardless of map size, not its simplicity.