This is a simple 3D Pong game created with Three.js.
- 3D graphics using Three.js
- Player vs AI gameplay
- Score tracking
- Responsive design
- Physics-based ball movement
- Increasing difficulty as the game progresses
- Move your paddle with the mouse or touch
- Press SPACE to start or restart the game
If you have Python installed:
# For Python 3.x
python -m http.server
# For Python 2.x
python -m SimpleHTTPServer
Then open your browser and go to: http://localhost:8000
If you prefer using Node.js:
- Install the
http-server
package:
npm install -g http-server
- Run the server:
http-server
- Open your browser and go to: http://localhost:8080
If you use Visual Studio Code, you can use the "Live Server" extension:
- Install the "Live Server" extension
- Right-click on
index.html
and select "Open with Live Server"
index.html
: Main HTML file with game layoutjs/game.js
: Game logic using Three.js
- Move your paddle to hit the ball
- Don't let the ball pass your paddle
- Try to get the ball past the AI's paddle to score points
Enjoy the game!