Code Monkey home page Code Monkey logo

javafx-pong's Introduction

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

javafx-pong's People

Contributors

toivjon avatar

Stargazers

Andrei-Paul Ionescu avatar Berk Bavaş avatar Tor (torbuntu)  avatar Dan Rusk avatar João Diogo Pinto avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.