Skip to content

AnishMahto/PongChallenge

Repository files navigation

Pong Challenge

Browser based pong game created for PointClickCare's high school coding challenge. The challenge was to make a pong game, but challengers were given the freedom to add whatever features they liked. I ended up getting a bit carried away...

The application itself is made using HTML, CSS, JavaScript, and jQuery. Furthermore, unit testing is done through the Jasmine library for JavaScript.

Installation/Run Instructions

Installation:

  1. Download this repository as a ZIP folder
  2. Extract to desired location

Running Game:

  • Open extracted folder
  • Navigate to the PointClickCare_Pong_Challenge folder
  • Open the index.html file with any browser (however, tested using chrome and firefox)

Running Unit Tests:

  • Open extracted folder
  • Navigate to the PointClickCare_Pong_Challenge folder
  • Navigate to the jasmine folder
  • Navigate to the jasmine-standalone-3.4.0 folder
  • Open the pongUnitTesting.html file with any browser (however, tested using chrome and firefox)

Tested Environments

  • Developed in Ubuntu 16.04, using Google Chrome version 75.0.3770.100
  • Tested in Ubuntu 16.04, using Firefox version 67.0.4
  • Tested in Windows 1803 Home edition, using Google Chrome version 75.0.3770.100

Why HTML, CSS, Bootstrap, and JS/jQuery?

  • Installing the application does not require any pre-installed environment, as these languages are natively supported by all modern web browsers.
  • Running the application is extremely simple
  • I have experience designing good-looking frontends for applications using HTML/CSS/related libraries, and believe these languagues and libraries provide a lot more flexibility for this project than my other options (ex. java's jframe or python's pygame)
  • Raw HTML, CSS, and JS runs fast
  • The canvas HTML object supports all the features I need for game play

Regrets using JavaScript?

  • OOP in JavaScript doesn't feel as robust as in my other options, such as Java
  • Sometimes JavaScript's asynchronous ability caused more sources of potential error than help for this type of project

Why Jasmine for unit testing?

  • Jasmine doesn't require a specific user environment to run, unlike most other JS unit testing libraries that require pip and other external libraries
  • The syntax was easy to pick up, especially for someone who has never done unit testing before

Features

  • Bot mode
  • Auto aim mode
  • Multiple power ups
  • Fun sound effects
  • Easy scalability/program extensions, due to OOP and the concept of encapsulation

Pictures

Game Webpage: Unit Testing Webpage:

About

Browser based pong game created for PointClickCare's high school coding challenge.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published