In this project, a 2D RPG game in JavaScript was built with the help of Phaser library.
An external api service is used to store the player names and scores. Top 5 players are displayed in game leaderboard.
The main character needs to kill enemies as quickly as possible with the least amount of arrows to open the exit door(6 minimum) and get a high score.
- (←) left arrow key => Move left
- (→) right arrow key => Move right
- (↑) up arrow key => Mpve up
- (↓) down arrow key => Move down
- (Space) key => Attack enemy
To run 'ForestRPG' locally, clone the repository, navigate to it's directory.
[email protected]:ikraamg/ForestRPG.git
cd ForestRPG
git checkout game-feature
npm install
npm run start
Now go to localhost:8000 in your browser.
npm run test
- HTML/CSS
- Phaser 3
- Webpack
- Eslint
- Stylelint
- Jest
- ES6
- NPM
- Github
- Github pages for deployment
- Leaderboard API service
This game has 3 main assets that bring it to life:
- The hero
- The map assets:
- The Enemies (Moles and Treants):
You are a hero in a Fantasy Forest World where nuclear waste has created made trees walk around and turned moles into large beasts. The Treants and Moles are preventing you from continuing on your jouney to find other humans. Once you have killed atleast 6 enemies a mountain door open so you can continue to find a cure for this chaos. The faster you get kills, the higher the chances of you finding a cure.
You (and your 3 lives) head to the forest, armed with a bow and arrows to kill the enemies as quickly as possible. Ammo costs points so try to use as little as possible.
Any contact with an enemy is deadly and you lose a life. Try to kill as many enemies as possible before exiting the area through the mountain door to get the highest score.
Don't forget to post your score to the global leaderboard!
- Add multiplayer functionality
- Add more levels
- Adding collectable objects like coins and upgrades
- Touch controls/Mobile Friendly
- User authentication
👤 Ikraam Ghoor
- Github: @ikraamg
- Twitter: @GhoorIkraam
- LinkedIn: isghoor
- Email: [email protected]
Give a ⭐️ if you like this project!
For the amazing pixel art and other assets: Luis Zuno
This project is MIT licensed.