How to use Lime with Corona and Tiled?

I am a total newb to corona and this stuff.

I bought Lime and I installed Corona and Tiled.

I have no clue, how to use it.

I read the tutorials and I understand, that I make my maps in Tiled and save it as XML, but what then?

What is my games directory, where I have to put Lime.
How this will be a corona project?
How this will be an iPhone/Android game?

I am totally confused.

Step 6: Load your map in Lime

The actual loading of your map is very simple, first off make sure you have actually placed Lime in your games directory and then include the library as usual:

1. local lime = require(“lime”)

Now load up your map data:

1. local map = lime.loadMap(“tutorial0.tmx”)

After loading up your map you will not have any visual objects created, this allows you to load up multiple maps at once yet only creating the visual data later one at a time, to actually create the visual representation simply use the next line of code:

1. local visual = lime.createVisual(map) [import]uid: 6587 topic_id: 5625 reply_id: 305625[/import]

Never mind, I got it.

I made a directory for my game.

Then I copied the lime files into it.
Then I copied the tmx file made in tiled into it.
Then I used the hello world files and I added the

  • local lime = require(“lime”)
  • local map = lime.loadMap(“my.tmx”)
  • local visual = lime.createVisual(map)

lines to the main.lua and I started it in the corona simulator, and now I have the map on my screen.

Now I have to write the game for the map :stuck_out_tongue: [import]uid: 6587 topic_id: 5625 reply_id: 19212[/import]

Awesome, glad you got it working in the end. Sorry I couldn’t reply any sooner. [import]uid: 5833 topic_id: 5625 reply_id: 19381[/import]

No problem. I have learned much in the last 24 hours, so I think, I will come along :slight_smile: [import]uid: 6587 topic_id: 5625 reply_id: 19395[/import]

You’ll be fine and you know where you to come if you have any issues :slight_smile: [import]uid: 5833 topic_id: 5625 reply_id: 19721[/import]