|First Version of MegaMega|
Back in 2012 I read "Beginning Android Games" and I wanted to test my understanding of what I learned from the book so I wrote the first version of MegaMega. It was a very basic game. The player had to survive until the entire play field was filled with blocks. Blocks could only be destroyed as they fell down. After a month of messing around with the game mechanics the game was shelved due to other projects taking up my time. It was written using the framework found in "Beginning Android Games".
|Second Version of MegaMega w/Falling Blocks|
Fast forward to the Summer of 2013. After some nudging by a friend I decided to start working on MegaMega again. This time I decided to drop the falling block mechanic and instead use the blocks as barriers which are used by the game enemies to protect themselves from the player. Basically they serve the same purpose the spikes do in Tempest except that the player can not impale himself on the spikes/block. This time around I decided to use libGDX. It has come a long way in the last year and it is being used by a lot of Android games.
|Third Version of MegaMega w/Basic Game Play|
|Final Version of MegaMega|
The objective of the game is to survive through 15 zones (levels) of enemies to reach a "treasure".
Originally I wanted to do 100 zones. But due to time constraints I limited the game to 15 zones.
I split the 15 zones into three groups of zones based on difficulty:
- EASY zones 1 to 4
- MEDIUM zones 5 to 10
- HARD zones 11 to 15
For each difficulty group different music is used to notify the player that the difficulty of the game had increased.
In each zone the player must clear a fixed number of enemies in order to advance.
Since there are so few zones. I decided that the player only gets 3 lives and 3 smart bombs per life.
The smart bombs destroy all enemies and enemy missiles which are see on the play field.
The game play field is 360x320 units. Divided into 20x20 cells. So there are 18 columns and 16 rows.
CRAWLERS -- attack the player from all sides. Move down towards the player and try to reach his row and collide with him.
FLYERS -- fly from left to right and right to left dropping missiles on the player. The missiles have a velocity with a x and y component.
TRIGUNS -- drop down and fire three missiles in a striaght line at the player and then leave the play field.
DROPBOMS -- drop down and when they reach the player's row they explode into two smaller dropbombs which move to the left and right of the spot where the dropbomb exploded.
Enemies spawn at different (progressively longer) intervals as the game difficulty increases and the number of enemies spawned per spawn event increases as the difficulty increases.
Where enemies spawn depends on the type of enemy. Crawlers, Dropbombs, and Triguns spawn in columns. Flyers spawn in rows.
Dropbombs and Triguns spawn primarily in the center columns. They have a lower probability of spawning in the far left and far right columns. This was determined after play testing. If allowed to spawn in any column then game play became impossible for the player.
Flyers spawn primarily in the upper rows. As the game difficulty increases there is a higher chance that the a flyer will spawn at a row very close to the player. Flyers also move from left to right and right to left.
Libraries and Tools Used
I worked on the game on my Linux workstation and my laptop (Macbook Pro). While working on my latop I used Virtualbox to run Crunchbang linux. All the game assets were created and edited under Linux.
- libGDX - without this great library the game would not have been possible. It nicely abstracts away a lot of the pain of dealing with Android for game programming.
- Audacity - for audio editing
- Inkscape - for drawing sprites
- GIMP - misc image editing
- Eclipse+ADT - programming
- freesound.org - most the sounds and music came from here
- the player cannon sound was made using SFXR
+bitbucket.org for version control
- Processing - for quick sketches to experiment with ideas
- Trello - for task tracking
MegaMega was a fun project to work on. I started working on it in mid-July and it was finished by mid-August. I estimate I spent between 80 to 100 hours working on the game. With most of the time spent working on assets and tweaking game play. This project fullfils a long term dream of mine to have written a SHMUP style game for a hand held device.