Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Can't get tile renderers to work
Started by Suvoroff Oct 24 2018 08:33 AM

3 replies to this topic
tiles dusk berry

Best Answer XeduR @Spyric , 24 October 2018 - 10:58 AM

I have no idea about Berry, but Dusk is outdated and last updated around 4 years ago. We had a discussion about it some months ago.

 

I haven't used other people's tile engines, but I think that ponytiled (https://github.com/ponywolf/ponytiled) is the way to go now.

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Suvoroff

[GLOBAL: userInfoPane.html]
Suvoroff
  • Observer

  • 11 posts
  • Corona SDK

Hey everyone!

Corona newb here. So I've been playing around with the SDK for a week now. What a convenient set of tools! Obviously, it made me want to try and throw together a tiny game with it. Can't say that I had any trouble writing my own code, but I got stuck the moment I started trying to deal with other people's work.

 

1d1b5795176656da9027d87808aed494.jpg

 

So I've made a simple tilemap using Tiled and tried to get it on screen using tile loaders, but I can't get two of them to work! I could've tried another one, but it feels like I miss something obvious, since I can't get both of those that I've tried to work. First I tried Dusk. I followed the steps described at the project's GitHub page, but when I run the code, I get this error:

Dusk/dusk_core/misc/functions.lua:53: attempt to index local 'path' (a nil value) 

I doubt that it's possible to screw up, but maybe I'm entering file paths incorreclty:

local map = dusk.buildMap("test/map1.json") 

As for Berry, the second loader I tried, it gives me this:

bad argument #1 to 'open' (string expected, got nil)

And the path in this case:

local map1 = berry.new("map1.json", "test")

'map1.json' lies in the same directory as the 'main.lua' file, and 'test' is a name of the folder that also belongs there.

 

Have zero clue about how to solve this. Can anyone give me at least a hint about where to look for the problem? Maybe there is some other info I can provide to make this mess more clear?



[TOPIC: post.html]
#2

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Contributor

  • 293 posts
  • Corona SDK

  Best Answer

I have no idea about Berry, but Dusk is outdated and last updated around 4 years ago. We had a discussion about it some months ago.

 

I haven't used other people's tile engines, but I think that ponytiled (https://github.com/ponywolf/ponytiled) is the way to go now.



[TOPIC: post.html]
#3

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,286 posts
  • Corona SDK

If you go with PonyTiled, be sure to read my and others' responses to this thread: https://forums.coronalabs.com/topic/74130-ponytiled/



[TOPIC: post.html]
#4

Suvoroff

[GLOBAL: userInfoPane.html]
Suvoroff
  • Observer

  • 11 posts
  • Corona SDK

Thanks you for your time, folks, PonyTiled indeed worked for me! Got the map displayed in no time. Thanks a bunch!




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: tiles, dusk, berry