For a assignment for school i've to develop a game in Microsoft XNA 4. Let me first clear out that my intention of this post is NOT to give me codes. I want to figure out things by my self. The intention of this post is to help me and give me advice wich design patterns may be better to apply in wich situation.
This game should use the following design patterns:
The assignment is as follow:
In this game the player should avoid the attack from his enemies who want to attack his spaceship. The enemies have their own way of attack and movement.
When the game starts the player has one cannon who can shoot bullets each 0.2 seconds. The spaceship can move horizantally with the keyboard. With the spacebar the player kan shoots bullets.
There are 3 kind of enemies who have their own attack and the way they move.
Chure : Moves horizantally from left to right, each time when the chure hits the edge
he moves down and again he move horizontally but this time in the opposite direction (thus from right to left). Each chure drops at any time (random) a bomb. Each level the speed of the drop will increase.
Thege: Moves from the corner of the stage diagonal to the player. When the Thege hits the player, the player loose one life and starts the level again. When the Thege don't hit the player and reach the bottom of the stage he will remove from the stage and won't come back again in that level.
Sinode : Moves from top to bottom of the stage, when the Sinode reach the bottom of the stage hi moves the opposite direction (from bottom to top). The Sinode stays on the stage as long as the player didn't shoot him. When the player shoots the Sinode he will be remove from the stage.
Each enemie can carry an upgrade wich will be released when he will be shot by the player. either the enemie has a upgrade or not has been choosen randomly. There are three kinds of upgrades. The player can use his spaceship but once expand with each type of upgrade. If the player already has a upgrade the upgrade will remove from the stage.
The three type of upgrades are:
- Lasers (Specs aren't important)
- Rockets (Specs aren't important)
- Guided missile (Specs aren't important)
some conditions to the game: - The game consists of 3 levels - Each player starts with 3 life - The level will be ended when all of the enemies are destroyed or not visible on the stage.
Now i've some ideas wich design pattern will be good by wich scenario but i would be gratefull if u guys can help me out how i can implement the factory and the observer pattern in this case and maybe help me out and give advice how i can implement the rest of the patterns.