Skip to content

johnstonstu/pong-game

Repository files navigation

Pong Game

A basic pong game using SVGs.

Setup

Install dependencies:

> npm i

Run locally with Webpack Dev Server:

> npm start

Build for production:

> npm run build

Keys

  • space: pause
  • r: reset

Player 1(RED):

  • a: up
  • z: down

Player 2(BLUE):

  • ▲ : up
  • ▼: down

Techlologies used:

  • Html
  • Css
  • JavaScript (no jQuery)
  • Webpack
  • ESlint

Major Lessons Learned

  • Use of classes in js
  • Drawing / moving SVG with js
  • ES 6 scoping (let/const)

Major Obsticles

  • No jQuery
  • Collision events
  • Vector calculation for ball movement
  • User key input
  • Max-Score setting being lost on refresh

Releases

No releases published

Packages

No packages published