Skip to content
This repository has been archived by the owner on Nov 14, 2020. It is now read-only.
/ javafx-pong Public archive

A JavaFX implementation of the classic Pong game.

License

Notifications You must be signed in to change notification settings

toivjon/javafx-pong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

javafx-pong

A JavaFX implementation of the classic Pong game.

Contains a single game mode where two human players can play against each other.

Development blog entry: https://toivjon.wordpress.com/2017/11/12/javafx-pong/

Scenes

Game is split into following scenes:

  1. A welcome scene, which contains the main menu.
  2. A court scene, which contains the actual gameplay.
  3. An end game scene, which contains the results from the court scene.

The list of scene transitions:

  • 1 to 2, when a player starts the game by pressing the enter key.
  • 2 to 3, when either player receives the 10th point (i.e. game is over).
  • 3 to 1, when the enter key is being pressed.

Features

This Pong implementation contains the following features.

  • Each game lasts until either player receives the 10th point.
  • Both paddles are controlled by human players.
  • Ball velocity is increased on each hit with a paddle.
  • Ball velocity does not exceed the pre-defined maximum velocity.
  • Ball movement is being stopped for 30 ticks after each reset.
  • Ball direction is randomized from four different directions after each reset.
  • Paddles are returned to their default position after each reset.

Screenshots

alt text alt text alt text

About

A JavaFX implementation of the classic Pong game.

Topics

Resources

License

Stars

Watchers

Forks

Languages