It is a simple shooting videogame, created as a capstone project using JavaScript, for Microverse. Only for learning purposes.
You are the pilot of a battlecruiser (maybe one among dozens), and your task is destroy all the asteroids that you can for saving the Earth. In order to comply with this important duty, you can drive the battlecruiser using arrow keys (🡱🡳🡰🡲) and shoot a Yamato Beam using spacebar.
To start, you shoould type your name (at most 11 characters). If you left a blank input, you will be registered as UNNAMED
.
When you click on Play, the battlecruiser will start in the bottom of the screen, and the asteroids will fall from the top with differents velocities.
The most important goal is getting the highest score. Your name will be put in the Top 10 if get a good score. Now, try to consider:
- There 5 kinds of asteroids.
- If you destroy the fastest kind of asteroid, you will get +25 points for your score.
- If you destroy the slowest kind of asteroid, you will get +5 points for your score.
- You will see at most 5 asteroids on your screen. When you destroy one, it returns from the top immediately.
- You will lose if your battlecruiser receives three hits.
- Preloader: Preloads all assets and configurations for the game.
- Title: Loads the logo and options for the game (for playing, show credits and show top 10).
- Top10: Shows the top 10 scores gotten for the players.
- Credits: Shows the credits for the author of this videogame and the author of the assets.
- Game Start: Displays the main scene and start the game. Here you can drive the battlecruiser and shoot beams.
- Game Over: When you lose, this scene shows your score.
- Node JS
- Webpack
- Javascript ES6
- Babel
- Phaser
- Jest
Check out the live demo here
- Go to Leaderboard API and get a Key for you.
- Install Node JS. (NodeJS Documentation)
- Install Webpack. (Webpack Documentation)
- Clone this repository in your terminal using git clone command.
- Enter the repo directory.
- Open the
src/keys/api.js
file and edit the value forLEADERBOARD
. Use your own API Keys gotten from Leaderboard API. - Run
npm install
&&npm run build
in your terminal.
- Run
npm run test
in your terminal.
- Run
npm run server
in your terminal. - Open http://localhost:8080 in your browser.
- Enjoy :)
- Full screen mode.
- Power ups when shooting to special asteroids.
- More audios for specifics scenes (Title, Game Start, Game Over, Top 10).
- Possibility for choosing among different battlecruisers.
👤 Sergio Zambrano
- Github: @sergiomauz
- Twitter: @sergiomauz
- Linkedin: Sergio Zambrano
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- Most of the characters assets belongs to Blizzard Entertainment and the game Starcraft (Battlecruiser, pilot, colors, etc).
- Audios were downloaded from Open Game Art
- Microverse, for the lessons and tips.
This project is MIT licensed.