Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How do I use tiled with corona?
Started by ec0 May 25 2018 12:58 AM

13 replies to this topic
tiled map tilemap tile map help
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

ec0

[GLOBAL: userInfoPane.html]
ec0
  • Enthusiast

  • 42 posts
  • Corona SDK

  How do I use a map I made in Tiled in my corona game? And how can I interact with it in game? I've looked online, but haven't found anything that makes sense. Any suggestions?   



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,253 posts
  • Enterprise

There are several community developed Tiled map engines you can find. They include:

 

PonyTiled

Berry

Million Tile Engine

Dusk

 

You can search for those.  PonyTiled and Berry are being actively developed. MTE and Dusk are pretty mature engines, but if Tiled changes a behavior (like when they switched from internal tile sets to external tile sets as the default), those engines didn't update and you have to do extra work in Tiled to use the older behavior.

 

Rob



[TOPIC: post.html]
#3

ldurniat

[GLOBAL: userInfoPane.html]
ldurniat
  • Contributor

  • 388 posts
  • Corona SDK

Try

 

  1. Ponytiled - PonyTiled a simple Tiled Map Loader for Corona SDK.  In my opinion it is very useful and flexible module. Check out youtube videos:
  1. Million Tile Engine - A tile based engine for the CoronaSDK Game Development Framework. I have never used it.
  2. Dusk Engine - Dusk is a fully-featured, open-source game engine for Corona SDK. I had problem to run  demos lately. I'm not sure why. 
  3. Berry - Berry is a simple Tiled Map Loader for Corona SDK. My own project:)

 

ldurniat



[TOPIC: post.html]
#4

ec0

[GLOBAL: userInfoPane.html]
ec0
  • Enthusiast

  • 42 posts
  • Corona SDK

ive downloaded dusk, but i don't know how to use it. Ive also watched those videos, I understand how to use tiled. The thing im having trouble with is getting anything i make with tiled to work with corona 



[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,253 posts
  • Enterprise

You may be running into the issue of internal vs. external tile sets. Dusk only works with internal tile sets which was the Tiled default back pre 1.0 of Tiled. Tiled now defaults to external tile sets.  You should try to set your Tiled map to use internal tilesets and try again.

 

If not, I would look at PonyTiled since it works with external tile sets.

 

Rob



[TOPIC: post.html]
#6

ec0

[GLOBAL: userInfoPane.html]
ec0
  • Enthusiast

  • 42 posts
  • Corona SDK

Thanks, ill keep that in mind. But thats not what im having trouble with. I don't have a clue on how to access the map with corona, and use it.



[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,253 posts
  • Enterprise

Have you downloaded and examined the Sticker-Knight template yet? https://marketplace.coronalabs.com/app-templates/sticker-knight-platformer

 

It uses PonyTiled.

 

Rob



[TOPIC: post.html]
#8

ec0

[GLOBAL: userInfoPane.html]
ec0
  • Enthusiast

  • 42 posts
  • Corona SDK

No i haven't, ill try it. Thanks 



[TOPIC: post.html]
#9

ec0

[GLOBAL: userInfoPane.html]
ec0
  • Enthusiast

  • 42 posts
  • Corona SDK

I've been trying ponytile; and I've managed to get the map that it comes with to show, but when I try to get a custom map to load, all i get is a black screen. What am I doing different?



[TOPIC: post.html]
#10

ldurniat

[GLOBAL: userInfoPane.html]
ldurniat
  • Contributor

  • 388 posts
  • Corona SDK

I've been trying ponytile; and I've managed to get the map that it comes with to show, but when I try to get a custom map to load, all i get is a black screen. What am I doing different?

Try follow @Rob Miracle suggestion

 

You should try to set your Tiled map to use internal tilesets 

 



[TOPIC: post.html]
#11

ec0

[GLOBAL: userInfoPane.html]
ec0
  • Enthusiast

  • 42 posts
  • Corona SDK

how do i do that?



[TOPIC: post.html]
#12

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,253 posts
  • Enterprise

How do you do what? Make the tilesets internal? When you add a new tileset to your map, check the "Embed" button:

 

Attached File  Screen Shot 2018-06-01 at 2.20.02 PM.png   110.32KB   4 downloads

 

 



[TOPIC: post.html]
#13

ec0

[GLOBAL: userInfoPane.html]
ec0
  • Enthusiast

  • 42 posts
  • Corona SDK

Yeah, thanks



[TOPIC: post.html]
#14

attudesign

[GLOBAL: userInfoPane.html]
attudesign
  • Contributor

  • 122 posts
  • Enterprise

You could also try using the exported .lua file option. With some for statements and some dot operator action it is really quite easy. I did it this way for a project I've been working on. You'll just have to do all the coding for what gets placed and where, but it gives you complete control. For instance I use tile layers for the placement of the image tiles, action/triggers, level data, etc and a solids layer for where any color fills are needed. My level files have anywhere form 12-15 individual layers and this way loads very quickly. It only takes a second or two to load a level. 




[topic_controls]
[/topic_controls]