I would seriously consider using a data format, such as xml or json. Or even simpler, check out ICE (from the codebase)
There are several pitfalls to having multiple lua files that contain the same functions but just different object positions or similar.
-
If you have all the same functions duplicated from lua file to lua file and you find a bug, you have to manually go into each one and fix the same bug numerous times.
-
It makes doing updates and other things a tedious task.
Look into ICE and data formats, then you can simply have one level file that contains all your levels and item/platform positions per level and simply re-initialize your variables on loading the next level then load your next level file.
It may seem complex or even hard right now, but I assure you once you put the time and effort into learning it , you will thank both me and yourself for doing it, and will never go back to having a lua file for each level ever again. [import]uid: 84637 topic_id: 22288 reply_id: 89306[/import]