Skip to content

TheCodingRocket/3D-Pong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Logo

Hey there! Pong is a two-dimensional sports game that simulates table tennis. The player controls an in-game paddle by moving it vertically across the left or right side of the screen. They can compete against another player controlling a second paddle on the opposing side. Players use the paddles to hit a ball back and forth.

Using three.js I was able to make a 3D version of the game. And combining with GameRunner a minimal framework for creating canvas games. the game was able to provide a 60fps double buffered canvas game loop, allowing the game itself to concentrate on updating its game state whenever the update() method is called and rendering itself every time the draw() method is called.

Gameplay

On computer, click the screen. you then can use your cursor to move the board. Hit the ball with the board. Get 5 points and win.

On mobile, use your fingers to swipe the paddle. You can also pinch to adjust the height of the view. = Zoom in or Zoom out, whatever that suits you best. One more thing, if you want gravity, just toggle the gravity button. It basically keeps the ball not floating randomly. It's basic physics.

Logo


πŸš€ Building your own 3D Pong

  1. Create and change the web link

    Download or Fork the repository
  2. Preview the site as it will appear once deployed

    Use any Code Editor to change anything you don't like
  3. Host the repository

    Once you're finish editing the contents, host the site
  4. Enjoy the game

    Thats it you're finsihed, Have fun!

Special thanks to erichlof for inspiring me to make this game.