Lime and Tiled tutorial updates

Hey Folks,

I’m just beginning to play with Lime and Tiled and I’ve found that the tutorials at the Lime site (http://lime.outlawgametools.com/tutorials-3/) need some updating.    Tutorial 10 (http://lime.outlawgametools.com/tutorials/10-more-work-on-platformer-characters/) requires ui.lua, but it doesn’t say which version and I couldn’t get it to work with any version as is.  So, after a few tweaks, I got the buttons to work, but then I thought, “why not use the new Widgets instead of ui.lua?”

So, I took out the ui.lua buttons and put in new widget buttons.  This tutorial will run with Corona SDK build 1076.  I am attaching my tutorial10.lua file.  Hopefully it will help some newbies!

Ok, I’m not having as much luck with Tutorial 11 which involves sprites.  It definitely requires an older build of Corona and I have no idea of what to do to get it to work with the newest public build (1076).    I looked at CoronaTIled, but it’s not obvious to me how to do sprites with it either.   Are sprites easier with Million TIle Engine?

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. 

@michael714:

Nice job!

I’m looking into Lime, at the moment, and finding it pretty cool, barring a couple of things…

C

Tutorials are 100% accurate if you use the previous version of lime and does not require an older build.I have bought mte too and I have to say that it is amazingly fast and lime amazingly easy to work with :smiley:

michael714, I used Lime for the GIG Jam last weekend and used sprites the same way dyson122 uses them with MTE – create them like normal and then insert them into a layer of the map.

[lua]

local layer = map:getObjectLayer(“Layer Name”)

layer.group:insert(mySpriteObj)

[/lua]

Sometime in the near future I’ll be looking into the Lime sprite code, but for now you can do that.

 Jay

Hey odijack,

Not sure what you mean there.  Which version of Lime are you using?  Is that version still available for download?

Thanks!

Hi @michael714 I talk about Graham’s versions but I don’t know where you can find them.

Ok, I’m not having as much luck with Tutorial 11 which involves sprites.  It definitely requires an older build of Corona and I have no idea of what to do to get it to work with the newest public build (1076).    I looked at CoronaTIled, but it’s not obvious to me how to do sprites with it either.   Are sprites easier with Million TIle Engine?

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. 

@michael714:

Nice job!

I’m looking into Lime, at the moment, and finding it pretty cool, barring a couple of things…

C

Tutorials are 100% accurate if you use the previous version of lime and does not require an older build.I have bought mte too and I have to say that it is amazingly fast and lime amazingly easy to work with :smiley:

michael714, I used Lime for the GIG Jam last weekend and used sprites the same way dyson122 uses them with MTE – create them like normal and then insert them into a layer of the map.

[lua]

local layer = map:getObjectLayer(“Layer Name”)

layer.group:insert(mySpriteObj)

[/lua]

Sometime in the near future I’ll be looking into the Lime sprite code, but for now you can do that.

 Jay

Hey odijack,

Not sure what you mean there.  Which version of Lime are you using?  Is that version still available for download?

Thanks!

Hi @michael714 I talk about Graham’s versions but I don’t know where you can find them.

does anyone have a complete tutorial how to create a level map in corona sdk??? just to ease things up…it would be hard to manually lay out the map using NOtepad++ alone.haha

does anyone have a complete tutorial how to create a level map in corona sdk??? just to ease things up…it would be hard to manually lay out the map using NOtepad++ alone.haha