Beta Updates

Moving the map also appears to have completely died, for no logical reason…

map:move( 2, 0 ) [import]uid: 13089 topic_id: 4422 reply_id: 16064[/import]

Kudos to Graham and all other testers! Been away for a day and I have a lot to catch up now. Have a nice sleep Graham. [import]uid: 11904 topic_id: 4422 reply_id: 16065[/import]

Basically the world group is only created if you actually create the map the old way, because doing it the new way the world group isn’t needed as nothing is actually inserted into it.

You can fix this by just creating that group after you have loaded your layers like this: map.world = display.newGroup()

I will add that into the createLayer function so that in the next update you won’t have to. [import]uid: 5833 topic_id: 4422 reply_id: 16066[/import]

Drop 1.6 -> sleep deprivation… perhaps 1.5 will be better [import]uid: 11904 topic_id: 4422 reply_id: 16067[/import]

I no longer get that error when loading, but the map:move function now returns an error regarding chunkSize.

By using this new layer functionality, am I unable to use things like worldToTilePosition, map:move, e.t.c? [import]uid: 13089 topic_id: 4422 reply_id: 16068[/import]

@ksan

A day in the world (or map) of Lime is a long time :slight_smile:

I really should go to bed, but the problem (a good thing I guess) is that I’m having too much fun developing Lime. Although I do have to get up in a few hours to go to my day job (however my day job currently is in the same chair I’m in right now doing contract work, best commute to work ever. Wheelie chair from the bed) [import]uid: 5833 topic_id: 4422 reply_id: 16069[/import]

Hmm, I’m thinking, instead of map:move - is there a layer:move function that I can run across all of the layers instead? This would get around my problem. [import]uid: 13089 topic_id: 4422 reply_id: 16070[/import]

@udesignme

There is probably a few things that still depend on the old way of doing things, I should have fixed that error now and basically we will just have to keep working through whatever issues you come up with when you get them. This is what the beta period is for :slight_smile:

I have uploaded a new version with the two fixes, just keep the new bugs coming in :slight_smile:

New version - http://justaddli.me/downloads/builds/beta/LimeBeta1.7.zip

With these bi-hourly builds the version number is going up quickly :slight_smile: [import]uid: 5833 topic_id: 4422 reply_id: 16071[/import]

To answer your question about performance, between 3 and 9 FPS on device without physics. [import]uid: 13089 topic_id: 4422 reply_id: 16072[/import]

Okay, with the new build - what should I do to load a layer, put it in to my display group, insert something else, then insert another map layer? Just so I’m clear :p.

Edit: I assume after this, I still use map:move? [import]uid: 13089 topic_id: 4422 reply_id: 16073[/import]

Well at least thats something, it means it’s most likely the visual that is killing the performance :slight_smile:

Currently there is not layer:move() function but there will be in the next drop which will now be tomorrow as I think it is bed time for me now.

For now you could add in your own function just to get you going until the next version.

  
local moveLayer = function(layer, x, y)  
 layer.group.x = layer.group.x + x  
 layer.group.y = layer.group.y + y  
end  
  

This will be in the next version and while I’m at it I will add some other helper functions such as layer:setPosition() and the same for tiles and objects. [import]uid: 5833 topic_id: 4422 reply_id: 16074[/import]

@udesignme

The steps would be like this:

  
-- Load the map  
local map = lime.loadMap("map.tmx")  
  
local layer1 = lime.createLayer(map, "Layer1")  
local layer2 = lime.createLayer(map, "Layer2")  
  
yourDisplayGroup:insert(layer1.group)  
  
yourDisplayGroup:insert(somethingElse)  
  
yourDisplayGroup:insert(layer2.group)  
  

And yea, map:move() should work :slight_smile:

[import]uid: 5833 topic_id: 4422 reply_id: 16075[/import]

Doing it that way results in map:move not functioning, I still have to create map.world and insert in to that to get that functionality working, will try the layer move instead. :slight_smile: [import]uid: 13089 topic_id: 4422 reply_id: 16076[/import]

Ah right yea, will look at it more tomorrow. I think I’m just to tired to sort it now :slight_smile: [import]uid: 5833 topic_id: 4422 reply_id: 16078[/import]

Moving the layers works fine, so just gonna do it that way :). Get some rest! [import]uid: 13089 topic_id: 4422 reply_id: 16079[/import]

Yea I relalised my mistake as soon as I woke up, map:mave() will naturally not work (it just wont break) as it moves the map.world group which your layers are not a part of.

I may just have to leave it at that (at least for now) and simply provide you the helper functions. I will probably update the move function later to take a custom displaygroup so that you could call move and pass in your group. [import]uid: 5833 topic_id: 4422 reply_id: 16117[/import]

The next version, coming sometime tonight, will have a few extra helper functions such as:

map:move(x, y)
layer:move(x, y)
objectLayer:move(x, y)
object:move(x, y)
tile:move(x, y)

layer:draw(event)
objectLayer:drag(event)
object:drag(event)
tile:drag(event)

All these functions have been added to the online API but naturally don’t try using them until I have uploaded the new code :slight_smile:

You will also be able to control the time of a basic animation without using “sequences”, simply create your animated tile as normal with “IsAnimated” and “frameCount” and then add a “frameTime” property as detailed here - http://justaddli.me/ldi.php?c=tile&p=frameTime

I am also still looking into parallax, isometric and speed issues :slight_smile:

I have also just realised something else, if in tiled you create an Object at say 10, 10 and then move the map if you try to do something with that object it *may* be in the wrong position, will have to investigate further. [import]uid: 5833 topic_id: 4422 reply_id: 16146[/import]

Keep up the great work, I expect I’ll be coding at 4am again! [import]uid: 13089 topic_id: 4422 reply_id: 16172[/import]

Me too! I saw your post in the public forums about Arc Arcana, holy crap that sounds like a big project :-) [import]uid: 5833 topic_id: 4422 reply_id: 16173[/import]

Hip hip hooray!!! Lime is turning out amazing! Thanks for all your hard-work. [import]uid: 11904 topic_id: 4422 reply_id: 16181[/import]