Failing the IQ test, first tutorial

Hello all!

Well, when I was using the publicly available non-beta lime, I was able to load up a test map with no problem.

Now, I've grabbed the latest beta, and did the following:

1
2
3
4
5
6
7
local lime = require("lime")
--Now load up your map data:
 
local map = lime.loadMap("testmap.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:
 
local visual = lime.createVisual(map)

Perhaps someone who has a working example can email it to me or post it somewhere? mario.roberti@gmail.com (Yes, I am not afraid of SPAM..I am that awesome)

Thx in advance!

Love,
Mario

[edit]

Forgot to include the debug output...no errors, just :

Copyright (C) 2009-2010 A n s c a , I n c .
Version: 2.0.0
Build: 2010.243
The file sandbox for this project is located at the following folder:
(/Users/mroberti/Library/Application Support/Corona Simulator/TileTest-FC7CA236EC8DAFAC746E3E00C81598F9)
Coconut: Creating Map
Coconut: Creating layer - Tile Layer 1
Coconut: Map created
Done!
logout

[Process completed]

I added the "Done!" part from within my main.lua part.

Hi Mario, that should be working. Could you send me your mapfile so that I can take a look at it?

Mario, Graham,

I have the exact same issue. I'll send mine as well,

Cheers!

Rob

Hi both Mario and Rob,

I have realised my foolish mistake, in the current version you also need to update the map. This will be changed in a later version.

Sorry for the mistake.

1
2
3
4
5
local onUpdate = function(event)
        lime.updateMap(map)
end
 
Runtime:addEventListener("enterFrame", onUpdate)

Thanks Graham

That fixed it for me.

Cheers!

Rob

Glad to hear it!

I'm also failing the IQ test. My map is appearing but it is shown portrait so only a slice is shown. I'm also missing the blue sky background...

You will probably need to set in your build.settings file your default orientation, if this doesn't work (or it's a different problem you are having) please send me your project and I will have a look at it for you.

Thanks. Build settings did fix the orientation. Suggest you mention this need in your Tutorial 1 so other newbies like me don't bombard you with questions once you go live.

Glad it works and yea that is a good idea, I will update the tutorial(s) before release.

Ok. This beginner finally made it through #3 as well. Please note the following known bug in Tiled which might affect some folks :

http://sourceforge.net/apps/mantisbt/tiled/view.php?id=70

A small caution on this one could also help. Cheers

Well done for making it through :-)

And I will also make a note of that too, thanks!

Both tutorials have now been updated.

Super. Checked and verified they are now "idiot-proof" even by my standards! Well done. Now onto Tut5... After exported set save I can't execute any more. Will find it out soon and let you know.

Ok. I give up. After exporting the tileset as described on Tut5 I'm getting bunch or errors when running the app. Here's how it goes :

Runtime error
...hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:307: bad argument #2 to 'newSpriteSheet' (number expected, got nil)
stack traceback:
[C]: ?
[C]: in function 'newSpriteSheet'
...hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:307: in function 'newTileSet'
...hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:1019: in function 'load'
...hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:1313: in function <...hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:848>
(tail call): ?
...HShT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/main.lua:20: in main chunk
Runtime error: ...hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:307: bad argument #2 to 'newSpriteSheet' (number expected, got nil)
stack traceback:
[C]: ?
[C]: in function 'newSpriteSheet'
...hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:307: in function 'newTileSet'
...hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:1019: in function 'load'
...hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:1313: in function <...hT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/lychee.lua:848>
(tail call): ?
...HShT1FraEy8QQ7VKLjE+++TI/TemporaryItems/237/main.lua:20: in main chunk

Very strange, the tutorial certainly works with the latest code (unless I have missed out a step by accident), could you please send me your project so I can see what I have done wrong?

Thanks for your offer to help check this out. You can find my current tutorial project at : http://dl.dropbox.com/u/16928994/LimeTut.zip

I am sure its something idiotic that I'm doing.

Right, I've "solved" the problem. I'm not sure exactly what it is yet but it is definately a Lime bug so well done! Basically to fix it if you import the first tileset back in (right click the tileset in Tiled and choose Import) still leaving the ice one exported it will work.

I will look into why having more than one (or simply the first one) exported causes Lime to implode.

Thanks. Appreciate your effort here. Lets call it fools luck that I stumbled on this one.

Hehe :)

views:1484 update:2011/10/13 16:39:51
corona forums © 2003-2011