Using Tiled as a game editor you can export to many different formats including json and lua.
Now I would like to use the lua formats (obviously) as it would be nice to just require these files in to the gameproject.
But I cannot find a way to use require (or load resources for that matter). Is there any way to do this?
This is what Ive done so far:
exporting lua tables (level-definitions coming from Tiled) into a folder
Adding that folder to the game project using custom_resources
Tried using require in different ways but cannot retrieve those lua files.
Tried using sys.load_resource(dynamic_path) and that will give me a string back… not a table
Instead if using JSON I can create that string mentioned above and use json.decode(str) and then get the table. But hey… shouldnt it work with lua directly somehow??
best regards
Andreas