Which architecture should i use for my project?

Hello!

I got an AS3 background and i’d like to make a simple shoot them up to start with corona and lua.

My first question is on how to approach bullet or enemy management.

Usually i got  a BulletManager class where i handle pooling, creation and deletion a BulletPattern wich manage bullet behavior and a Bullet class for the object itself, nearly the same for enemies.

Do you think i should modify my setup? heard object pooling was automatic, really =) ? this may change something on how to approach that project I don’t really get it for now

In AS3 i use a registy class to keep some public static variables for easy access in other classes

What would be the equivalent for example if i want to access player’s coordinates for one of my enemy?

Thanks in advance,

Max.

Hi Max,

Are you experienced with the Lua language at this time, coming from AS3? Do you have a Corona project started? Do you plan to use the Box2D physics engine?

The best place to begin learning many topics is Corona University, where you’ll find guides, tutorials, and videos that discuss several core topics:

http://www.coronalabs.com/resources/tutorials/getting-started-with-corona/

Have fun!

Brent Sorrentino

I just misunderstood and took the storyboard system as a class one, seeing project with multiple files like game.lua, level1.lua, level2.lua. Anyway this cuts some questions but i still got some! 

I’ve setup a simple prototype, a ship rotating to the touch, shooting bullets at enemies spawning on top with physics etc, so this works fine but 

i still wonder whats the best way to implement a more complex system with a lot of bullet and enemy types and behaviors, i fear a big enterframe with for loops iterating through a lot of objects with lot of conditions. 
So yeah that and how could i manage all the data relative to the object to create is there better than two dimension tables as parameter objects? 

And third how would be the way to handle the events that will occur in a level can i use something like xml to plan all my level and pick the info i need when its time to spawn an object.

Max.
 

oh JSON is the way to go i guess but im still open to some advices

Hi Max,

Are you experienced with the Lua language at this time, coming from AS3? Do you have a Corona project started? Do you plan to use the Box2D physics engine?

The best place to begin learning many topics is Corona University, where you’ll find guides, tutorials, and videos that discuss several core topics:

http://www.coronalabs.com/resources/tutorials/getting-started-with-corona/

Have fun!

Brent Sorrentino

I just misunderstood and took the storyboard system as a class one, seeing project with multiple files like game.lua, level1.lua, level2.lua. Anyway this cuts some questions but i still got some! 

I’ve setup a simple prototype, a ship rotating to the touch, shooting bullets at enemies spawning on top with physics etc, so this works fine but 

i still wonder whats the best way to implement a more complex system with a lot of bullet and enemy types and behaviors, i fear a big enterframe with for loops iterating through a lot of objects with lot of conditions. 
So yeah that and how could i manage all the data relative to the object to create is there better than two dimension tables as parameter objects? 

And third how would be the way to handle the events that will occur in a level can i use something like xml to plan all my level and pick the info i need when its time to spawn an object.

Max.
 

oh JSON is the way to go i guess but im still open to some advices