Hi Greg,
I think with a little clever planning, and careful coding, you can mesh the suggestions made throughout this thread into a workable solution that doesn’t involve “dynamic lua loading”. For example, take a pencil and paper (my favorite way to brainstorm ideas, despite all the digital tools and trinkets) and ponder, “how can I combine such a function of method into something that can be shared between levels/purposes/behaviors?” Can you create functions that accept many different arguments and then pick apart those arguments to suit a “common purpose”? Can you combine 5 unique functions that share a few common traits into 1 function? Etc. etc. Not only does that ultimately simplify your code, but it organizes things too.
You might also investigate an object-oriented approach. Corona dev Omid Ahourai has posted an OOP method on his blog here (there are other approaches if you search online, but this one is very current): http://www.ardentkid.com/blog/
Brent [import]uid: 200026 topic_id: 34498 reply_id: 137182[/import]