Alien Invaders is a Space Invaders clone for Android. A spacecraft must defend the earth from an alien attack. The army alien consists of 3 categories of aliens: ugly, bad and good. The spacecraft must destroy the alien army without getting hit and keep her from arriving on Earth. The only defense for the spacecraft are 4 blocks behind which it can shelter from the aliens bullets. For each alien kill the player will get a score. The aliens move in block from left to right and vice versa, and every time they touch a margin, they advance. The player advances to level when he kills all the aliens. At each new level the speed of the aliens increases, thus increasing the difficulty of the game.
This game has been created only for educational purpose, it has no claim to be a complete game distributable through the Android market. It's my belief that you can get inspiration from this source code to implement your own video games.
In the game there is no the upper spacecraft to hit as a bonus as in the original game. The game also has an infinite theoretical life.
The original author of the framework code, later modified by me, is Mario Zachner (@badlogic) that released the code with GPL3 license as a resource of the Beginning Android Games book. The framework is a very simplified version of the open source library Libgdx, released by Mario Zachner with GPL3 license. Graphic assets and some simplifications comes from the open source project rubyinvaders written in Ruby by Robert Alexander Leon (@llexileon).
Enable USB Debugging mode that on many devices from 3.2 up to 4.0 (excluded) is in Settings>Applications>Development. On devices from Android 4.0 and later, you’ll find them in Settings>Developer Options. On Android 4.2 and later the option is hidden by default. To make it reappear, go to Setting->Info on the device and tap Version Build 7 times, the option will become visible.
Enable installation from Unknown Sources clicking on Settings->Security.
Download the application clicking here and install it.
Download and install Android Studio. If you already have Android Studio installed, make sure it is at the latest level. Once Android Studio is up and running make sure all projects are closed (if a project is open do File->Close Project), the "Welcome to Android Studio" Panel appears. Select the option "Check out project from version control" and then GitHub.
Fill the following fields:
Git Repository URL: https://github.com/sasadangelo/AlienInvaders.git
Parent Directory: <an empty directory previously created>
Directory Name: AlienInvaders
The source code will be downloaded and the AlienInvaders project will be created. Now you can run the code doing Run->Run. You can execute the code on Physical or Virtual device. For more details you can read the last section of the following article.
Sometime could happen that there is incompatibility between the level of gradle declared in the source code with the one installed in the development environment. When this occurs Android Studio will show also a link to fix it. Click the link to solve the issue.