Hi everybody, it's been a long time, I know, but the development of the Final Project
and summer vacations kept me away to update my blog.
Today's topic is Game Engines' final project. During Game Engines class we learnt how
to develop video games in XNA.
For the people who don't know what am I talking about, XNA is a great video game development
framework released by Microsoft and based on C# programming language.
Its main strengths are:
It grants the opportunity to develop video games for both MS Windows and MS Xbox 360.
It is based on C# (an Object Oriented programming language) and runs on a virtual
machine (no memory management as in C).
Microsoft's development community is huge and available to help newcomers.
For more information please visit the link below:
During the semester we had lessons and laboratories where we learnt:
How to manage sprite animations
How to manage player inputs
How to develop simple physics algorithms, in order to develop our small engine
How to manage collisions between objects
How to manage cameras
How to manage sounds
How to create a small game menu
After a full immersion of C# programming, to be honest my developing skills were a little
bit rusty at the beginning of the module, we had our final project assignment: to remake one
of the first arcade games. After a long time thinking me and Marc decided to choose Space
Invaders (1978 version).
We started looking for the original sprites and, luckily for us, we managed to find the
complete sprite-sheet on Space Invaders fan sites.
Next step was the development of the game mechanics. In order to achieve our goal we started
analyzing the game by playing one of the many online flash remakes. After that, we started
planning a set of objects that represent the whole game. Below you can find a diagram of
Here is a brief explanation of the behaviour of each class:
Spaceship: this class manages the spaceship in the bottom part of the screen
(controlled by the player) by managing movements, controls, shooting bullet conditions,
collisions with enemies' bullets, player's lives and score.
Bullet:this class manages the bullet's behaviour and movements.
EnemyManager: this class manages the whole group of enemies, their movements, speed and
score value. It also manages whether or not an enemy can shoot a bullet and the
collisions between each enemy and the bullets shot by the spaceship.
Enemy: this is the simplest representation of an enemy and it provides the simple
functionalities required by the EnemyManager.
BonusEnemy: this class represents the UFO that flies at the very top of the screen
and if hit it provides a huge amount of points.
EnemyBullet: this class is almost identical to spaceship's Bullet with the only
difference of the used sprite and movement behaviour.
Shield: this class represents one of the green shields just on top of the spaceship and
it manages the collisions between spaceship's Bullet and EnemyBullet, deciding when a
single piece of it has been destroyed.
ShieldPart: this is the smallest part of the shield and it manages the amount of HP
(hit points) of a shield.
AnimationPlayer: this class provides a set of controls needed to manage a sprite
Animation: this class creates a sprite animation starting from a sprite sheet.
About the game menu we customized an example provided by Microsoft development website called
Game State Management.
To be honest one of the hardest parts of the project was merging our game mechanics classes
and the game menu example. First attempts were a disaster, but after a couple of days of
blood and tears we managed to master it.
If you want to have a look of what we have done, you can find a video of the game in action
in the link below:
Space Invaders - The Remake
While, if you have some programming skill or if you just want to know how to make a video game
in XNA in the link below you can find the source code of our project:
Space Invaders Source Code
In order to import it and work on it you will need:
All the software above is legally free to download from Microsoft website.
Next time I will talk about the Final Project, a brand new video game called Shards. Stay tuned!!!