Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/george-swift/2d-game
- Owner: george-swift
- Created: 2021-06-02T19:34:21.000Z (over 3 years ago)
- Default Branch: development
- Last Pushed: 2021-06-03T15:57:42.000Z (over 3 years ago)
- Last Synced: 2024-10-07T22:32:24.317Z (about 1 month ago)
- Topics: async-await, es6-classes, es6-modules, es6-promise, webpack
- Language: JavaScript
- Homepage: https://george-swift.github.io/2D-game/
- Size: 4.59 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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!