Skip to content

dahveed15/Air-Hockey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Air Hockey

Live Demo

Background and Overview

Air Hockey is a 2d game. The goal is to get the puck past the opponent's paddle.

Functionality & MVP

Users will be able to:

  • Play against another user.
  • Play against an AI.
  • Choose the speed of the puck.
  • Add multiple pucks

Architecture and Technologies

This project will be implemented with the following technologies:

  • Vanilla JavaScript for overall structure and game logic
  • HTML Canvas for DOM manipulation and rendering

Scripts:

  • game.js: responsible for the logic of winning/losing
  • puck.js: responsible for the logic of moving the ball around
  • paddle.js: responsible for the air hockey paddles hitting the ball

Wireframe

This app will consist of a single screen with the simulation canvas, game controls, and nav links to the Github and my LinkedIn.

Implementation Timeline

Day 1: Setup all of the files that I need for the program

  • Create Board with Canvas
  • Create puck
  • Get puck moving around
  • Try to learn how to implement sound effects

Day 2: Paddle Logic

  • Create two paddles that can move around independently
  • Make the puck be able to bounce off of walls and the paddles

Day 3: Game Logic

  • Implement Logic to make the player whose puck got past the paddle lose
  • Display who won
  • Try to Implement an AI
  • Try to make it multiplayer

Day 4: Controls

  • make a play game page
  • create controls for ball speed
  • give instructions on how to play
  • give option to handle multiple pucks
  • make the canvas nicely styled

About

An Air Hockey game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published