Tiled Map Engine

@gamifried:

Hm… Try looking into the code and seeing if there’s anything obvious - the version of Ceramic in the samples doesn’t do any seg faults, so it’s something with the sample itself. I’ll look into it when I have free time :slight_smile:

@ironakamura:

Simple enough - just remove it like a normal object:

[lua]

display.remove(map)

map = nil

[/lua]

Thanks  :smiley:

no2games / Caleb P

I tried to download https://github.com/superqix/CoronaTiled/blob/master/tutorial.zip?raw=true and got a page not found.  Where can we get the file?

Thanks

noral.kuhlmann:

The tutorial is now melded into the main repository - just click the ZIP icon and download the whole thing, and you’ll be able to run it from the main.lua file.

Everyone Else:

Apologies for how long it’s taken for the new version… I’ve had to start completely over (text editor state loss :angry:). This implementation, though, should be quite good. I’m going to open a parallel window and rewrite everything (literally).

A quick update just to let everyone know this is still underway :slight_smile:

  • The library is split better into more independent files - the previous version (another version of Ceramic - this one’s the beta version of the Twilight Engine) I was working on had big “chunk” files, and small mini files so it wasn’t as good in this aspect

  • Completed the building of image layers, object layers, and tile layers

  • Finished a bunch of extras - dot table entry, for example: there’s a preference “dotImpliesTable” that specifies whether dots in a property name should be read as tables, but you can override it with one of two prefixes, !dot! and !nodot!.

  • Working on layer and map engine methods (like conversion of tiles to pixels and vice-versa, iterators, and the such)

Again, progress is live at http://gymbylcoding.github.io, so go there for more frequently updated progress info :slight_smile:

  • Caleb

Forgot to note something awesome - due to the dot abilities for tables, the following result in identical properties:

(in Tiled properties)

[lua]

propertyTableExample     =     !json! {“x”: 100, “y”: 200, “z”: 300}

[/lua]

(second example)

[lua]

propertyTableExample.x     =     100

propertyTableExample.y     =     200

propertyTableExample.z     =     300

[/lua]

  • Caleb

Question for everyone:

I’m currently working on the camera system, so kindly tell which of these you’d prefer:

  1. All the camera methods (get/set view position, update camera, etc.) to be inside the root map object:

[lua]

map.setViewpoint()

map.setDamping()

map.getViewpoint()

map.updateCamera()

[/lua]

  1. All the camera methods to be inside their own object (likely “view” or “camera”), a child of the map:

[lua]

map.view.setViewpoint()

map.view.setDamping()

map.view.getViewpoint()

map.view.updateCamera()

[/lua]

If you chose option 2, please say what you’d like the object to be named (“view”, “camera”, or something else).

Thanks!

  • Caleb

Forgot to mention that I’m defaulting to option #1 :slight_smile:

  • C

i vote for option 1 too!

keep it up!! :slight_smile:

Another quick question:

Would you rather the first release be without culling (thereby speeding up the release date a bit) or wait for the full thing, with culling included?

-Caleb

I’m making progress live at http://gymbylcoding.github.io, so be sure to go check if you want to see what’s coming along! You can see the last update time at the bottom right of the screen.

The name of the engine is changing… Again. This time, it’ll be the “Twilight Engine”. The name’ll take effect once the new version comes out.

  • Caleb

This is great work! I’m giving it a go now and hopefully it will be able to make development of my game much more straight forward. Thanks!

There seems to be a problem with the current public release of the Corona SDK and Ceramic. I cloned Ceramic and tried opening main.lua in the Corona Simulator but it crashes with a segmentation error (someone else I know has tested it with the same issue). 

I’m not sure what has changed but has anyone figured out how to get it working? My debugging is getting me nowhere currently. :frowning:

Actually, after another look, this only seems to affect the platformer sample, the other four samples work fine. 

Been out of town the last few days - sorry for not updating the progress page.

I’ve got scaled maps (layer scaling and map scaling at the same time, if you want) working, but have yet to do tracking bounds (with scaling).

The engine grows ever closer to release date! (for everyone who’s wondering, it’s probably about 75-80% done)

  • C

I’m quite new to Corona and Lua, but so far Ceramic has helped me a lot, but I have one question. when I change a scene with Storyboard how do I remove the map from the screen?

@gamifried:

Hm… Try looking into the code and seeing if there’s anything obvious - the version of Ceramic in the samples doesn’t do any seg faults, so it’s something with the sample itself. I’ll look into it when I have free time :slight_smile:

@ironakamura:

Simple enough - just remove it like a normal object:

[lua]

display.remove(map)

map = nil

[/lua]

Thanks  :smiley:

A quick update just to let everyone know this is still underway :slight_smile:

  • The library is split better into more independent files - the previous version (another version of Ceramic - this one’s the beta version of the Twilight Engine) I was working on had big “chunk” files, and small mini files so it wasn’t as good in this aspect

  • Completed the building of image layers, object layers, and tile layers

  • Finished a bunch of extras - dot table entry, for example: there’s a preference “dotImpliesTable” that specifies whether dots in a property name should be read as tables, but you can override it with one of two prefixes, !dot! and !nodot!.

  • Working on layer and map engine methods (like conversion of tiles to pixels and vice-versa, iterators, and the such)

Again, progress is live at http://gymbylcoding.github.io, so go there for more frequently updated progress info :slight_smile:

  • Caleb

Forgot to note something awesome - due to the dot abilities for tables, the following result in identical properties:

(in Tiled properties)

[lua]

propertyTableExample     =     !json! {“x”: 100, “y”: 200, “z”: 300}

[/lua]

(second example)

[lua]

propertyTableExample.x     =     100

propertyTableExample.y     =     200

propertyTableExample.z     =     300

[/lua]

  • Caleb