Hello,
I’m working on a prototype of game similar to Space Invaders: http://www.otithelis.com/vidgames/space-invaders.jpg
The general idea is that there are some enemies in a group which move constantly from left to right and viceversa, and advance on Y axis, and there’s a ship which can shoot the enemies.
I noticed that for every new level the only thing that will change in the game will be the enemies. With a new level, new type of enemies will come with new abilities, like instead of just moving lef-right, to follow a bezier curve, to shoot from a different type of weapon, and so one. BUT, there will be also things that won’t change when advancing on every level, like the health bar, the score bar, the background image, the character controls, and even the collision handler won’t change.
And now I’m in a dilemma. I want to design every new level of the game in a separate Scene, but I don’t want to do things already done in Level 1, like to redraw the health bar, the score bar, recreate the collision handler and so one for every new Level.
On the other hand, I also don’t want to put all my levels in a single Scene, as this will increase the length of the code in a single file, and increase complexity as a consequence.
What would you advice to do in this particular situation?
Basically I want to setup all the general things in the Level1, and then all the subsequent levels to reuse some logic from here. And every new created Scene to have only code that describes how the enemies will act.
Thank you.
[import]uid: 180614 topic_id: 34380 reply_id: 334380[/import]