Grab Fruits!
About the Project
This project is to build a platform game with Phaser library. It was built as the JavaScript capstone project at Microverse.
In this project, I did these things:
- Planned the game overview and specific mechanic with Game Design Document(GDD)
- Built platform game with Phaser library
- Implemented a scoring system using the given API to save the score with a username and display it in a game view
- Deployed to a server so the game is accessible for anyone
Also, these features are added:
- Three modes: Easy, normal, and hard that is different on the speed of showing enemies and fruits
- Double jump: The main character can double jump
A list of commonly used resources that I find helpful is listed in the acknowledgments.
Table of Contents
- About the Project
- Built With
- Live Demo
- Game Design Document(GDD)
- Getting Started
- How to run the game
- What is Grab Fruits
- How to play the game
- Rule of the game
- Author
- Contributing
- Show your support
- License
- Acknowledgements
Built With
Live Demo
Game Design Document
Game Design Document (GDD) Link
Getting Started
To get a local copy up and running follow these simple example steps.
- On the project GitHub page, navigate to the main page of the repository.
- Under the repository name, locate and click on a green button named
Code
. - Copy the project URL as displayed.
- If you're running the Windows Operating System, open your command prompt. On Linux, Open your terminal.
- Change the current working directory to the location where you want the cloned directory to be made. Leave as it is if the current location is where you want the project to be.
- Type git clone, and then paste the URL you copied in Step 3.
e.g. $ git clone https://github.com/yourUsername/yourProjectName - Press Enter. Your local copy will be created.
- To run the test, run
npm test
How to run the game
- After cloning or downloading this repository, in the terminal, move to this folder
eg:
cd Desktop/platform-game
- Run
npm install
oryarn install
- After installing packages in step2, run
npm run build
- Run
npm run dev
, then the local server will be automatically opened - Choose dist folder, and start the game
What is Grab Fruits
Grab Fruits! is a simple game as its name is. A player is expected to collect as many fruits as possible without touching spiders.
How to play the game
- Click the "Click to Start" button
- Input a username that will be shown if a player will be a top 5 scorer.
- Choose the mode from easy, normal, or hard that is different on the speed of showing spiders(enemy) and fruits
- Start the game
- In the game-over view,
- To see the top 5 scorers, click the "Score" button.
- To start the different username or mode, click the "TOP" button
- To restart the game in the same mode, click the "Restart" button
- In the score view,
- The top 5 scorers are showing with their username and their score
- To start the different username or mode, click the "TOP" button
- To restart the game in the same mode, click the "Restart" button
Rule of the game
- A player gets a 70 scores when touching a fruit
- The game will be over when a player touches a spider
- A player can be operated by using keyboard cursors arrows (←, →, ↑).
- To run to the left, click ←, to the right, click →, and to jump up, click ↑
- A player can double jump, to do it, click ↑ again in the air
Author
Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Show your support
Give a
License
This project is MIT licensed.