footurist
footurist

Reputation: 1609

Display objects as property of modules in Corona SDK / Lua? (composer)

I am developing games with the composer library of Corona SDK and I am facing a problem with design patterns. Let's say I have a bunch of modules, that I make globally accessible in main.lua. After thinking about how I would make communication between modules easy, I came up with the approach to make the generated display objects properties of the module. I first tried the oop approach but then I ended up wrestling through complicated parameter structures, that passed the objects which made debugging a pain. Is there any problem with this approach, that you can see? Do I need to rethink my approach for the sake of stability?

Thanks for your help!

Greetings, Nils

Upvotes: 1

Views: 103

Answers (1)

ldurniat
ldurniat

Reputation: 1702

Maybe try use Custom Events to objects communication. Also read

What is more I recommended you analyse three free and open source games from Ponywolf on Corona marketplace. I do it myself :)

Upvotes: 2

Related Questions