This was my submission to the 2019 Airbus Code Competition in Germany where I achieved the third place. It is a simple, web-based implementation of the well-known space invaders game, featuring a local multiplayer and multiple difficulty levels.
The space invaders application consists of a client and a server. The client is based on Angular and handles the actual gameplay, whereas the server uses ASP.NET CORE and an SQLite database to store the scores achieved by the players. Hence, both the client and server have to be installed for the application to work.
After downloading the git repositories and installing the required packages, please refer to the Execution section.
Angular 8 requires node.js 10.9 or greater
Download and install node.js from the official website.
# if required, install curl
sudo apt-get install -y curl
# install nodejs version >= 10.9
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
The npm package manager will be installed automatically with the download of the node.js executable described in step 1. You can verify that it is installed on your computer by executing npm -v
in a cmd window.
sudo apt-get install -y npm
Execute the following commands in a cmd window:
npm install -y -g @angular/cli
sudo npm install -y -g @angular/cli
Make sure you are in the main directory of the SpaceInvadersClient project or provide the path to the package.json file located in the project folder to the npm install
command as an argument.
# The following command will install every package listed in the package.json file
npm install
# The following command will install every package listed in the package.json file
sudo npm install
The git repository of the server can be found here. It is based on C# and requires .NET Core SDK version 2.2.
Download and execute the .NET Core 2.2 SDK installer from the official website.
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install apt-transport-https
sudo apt-get install dotnet-sdk-2.2
The documentation for installing dotnet on a system running a different os can be found here.
Since this application uses HTML5, it is strongly recommended to use the latest version of the Firefox, Chrome or Safari browsers for the application to function properly.
Navigate to the folder containing the server application and execute the following command in a cmd window:
# Launch the server
dotnet run SpaceInvadersServer.csproj
Navigate to the folder containing the client application and execute the following command in a cmd window:
# Launch the client application
ng serve
Navigate to the folder containing the files for the server. Execute the following command in a separate terminal window:
# Launch the server
dotnet run SpaceInvadersServer.csproj
Navigate to the folder containing the client application. Execute the following command in a terminal:
# Launch the client application
ng serve
With both the server and the client up and running, navigate to https://localhost:4200 to play the game. Enjoy!