I have some level data files in lua format like this:
return { width = 15, height = 25, etc. }
The map files are all in a subdirectory called maps and the file itself is named like map_1.lua , map_2.lua , and so on … The string to load the level is created dynamically like.
local lvlnumber = 4 LoadLevel("maps.map\_" .. lvlnumber) function LoadLevel( filename ) require( filename ) end
Problem is: in simulator everything is working fine, but when I build the app, the map files are not in the application bundle. I suppose that files that are not referenced directly in the code do not get copied to the application bundle?
If yes, zipping them before building and unzipping on first start on device might solve the problem.
Or maybe you know a different approach?
Thank you,
René