Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/george-swift/2d-game

An infinite two-dimensional platform game with JavaScript and the Canvas API.
https://github.com/george-swift/2d-game

async-await es6-classes es6-modules es6-promise webpack

Last synced: 28 days ago
JSON representation

An infinite two-dimensional platform game with JavaScript and the Canvas API.

Awesome Lists containing this project

README

        

# 2D-game

![](./2D-game.gif)

## Live Link
Start playing the [2D-game](https://george-swift.github.io/2D-game/) here

### Objectives:
- Using ES7 Async functions and Promises
- Functional programming
- Object-oriented design using ES6 classes
- Code organization with ES6 modules in Javascript
- Using Webpack for compiling Javascript modules
- DOM manipulation

## Features
The 2D-game is a platform game based on the tutorial by Marijn Haverbeke in the 3rd Edition of the book- Eloquent Javascript. The
game is played using keyboard `up`, `down`, `left`, and `right` arrows. The game supports longer key presses for increased range of movement. The `player` is a basic rectangular block and a user is faced with the task of collecting coins in a course with `lava` as obstacles. The `player` glows and the next level appears if a user wins. If a `player` touches the `lava`, the user has lost. An animated frame will be displayed before the level is restarted. Further implementation will add scores. The 2D-game currently supports screen sizes from iPad Mini and above.

## Prerequisites
- Internet Connection
- Git GUI
- An Integrated Development Environment
- Chrome and Firefox or Safari. Internet Explorer is not supported.
- Node Package Manager [(NPM)](https://docs.npmjs.com/about-npm)

## Tools/Built With
- JavaScript ES6/7
- Webpack
- HTML5/CSS3
- NPM

## Getting Started
- To get started with the app, clone this project by running `git clone https://github.com/george-swift/2D-game.git`
- Run `npm install` to install the needed packages and dependencies
- A development tool is included in the npm script. Run `npm run start` to fire up a local server with live reloading.
- If not already redirected, visit `http://localhost:8080/` in your browser to start playing the 2D game with dev server.
- To terminate the server, enter `Ctrl + C` in your terminal

## Acknowledgments

- [Eloquent Javascript by Marijn Haverbeke](https://eloquentjavascript.net/)
## Authors

👤   **Ubong George**
- LinkedIn: [Ubong George](https://www.linkedin.com/in/ubong-itok)
- Twitter: [@\_\_pragmaticdev](https://twitter.com/__pragmaticdev)
- GitHub: [@george-swift](https://github.com/george-swift)

## Show your support

Leave a :star:️   if you like this project!