CV / 3D Engine - Air Hockey

Introduction

The project aims to develop an air hockey game using the JMonkey 3D engine. Air hockey is a board game played by two players. It was invented in 1972 by Bob Lemieux, an ice hockey enthusiast and engineer for the pool table manufacturer Brunswick Billiards. The game was a huge success from the moment it was launched, and there has been a championship running since the late 1970s. The puck is kept in the air by the airflow generated by small vents in the table (Wikipedia).

Table d'Air Hockey

Expected work

The project will produce a Java application built on the JMonkey Engine that allows users to play virtual games of Air Hockey according to the proposed rules.

Rules

The game is played on a table that represents a playing field. Two players compete by hitting a puck back and forth using paddles.
An air hockey table is defined by:

  • A rectangular playing surface on which a puck and the players’ paddles move. The dimensions of the playing surface can be fixed or variable.
  • Two goal lines, located at the ends of the table, facing the two players.
  • Two paddle zones, located in front of the goal lines. These define the space within which a player may move their paddle.
  • A neutral zone in which the puck may not be touched by a paddle.
  • Two boards, placed on either side of each player, off which the puck may bounce.

 

A game of air hockey consists of a series of exchanges during which players hit the puck back and forth while trying to score points:

  • The puck may only be hit with a paddle.
  • The puck may bounce off the table’s edges any number of times.
  • When a puck crosses a player’s goal line, their opponent is awarded a point.
  • If a player accidentally knocks the puck into their own goal, they also lose 1 point.
  • A player cannot have fewer than 0 points.
  • A player who scores 12 points wins the game.
  • If the puck gets stuck during a rally, it is put back into play by the player who did not last touch the puck.
  • An exchange begins by placing the puck on the in-play line of the player with the serve. The player may then hit the puck with his paddle to start.
  • After a point is scored, a new exchange begins at the initiative of the player who conceded the point.

Implementation

Object representation

Every visible object in the game (terrain, opponents, paddle, puck, score, ...) must be modelized and textured. Regarding the interface, you can refer to the documentation on HUDs with JMonkey.

Game modes

The proposed application will be a video game that allows users to play air hockey matches according to the rules of the game. Two game modes must be included:

  • Single-player mode against the computer
  • Versus mode against another human player (on the same machine or remotely)

The single-player mode must include a tournament in which players must defeat at least 5 opponents before achieving the final victory.

Opponents

In single-player mode, different opponents should behave differently (some faster, some stronger, etc.). Each opponent can have a specific behavior, affect the game table and, for example, require a specific paddle shape and size or a goal that is larger or smaller.

For example, within the original ShufflePuck Cafe game, Princess Bejin can manipulate the puck with her mind and Lexan starts out very strong but gets weaker and weaker as he scores points (since he drinks every time he scores a point).

Princess Bejin (ShufflePuck Cafe)
Princess Bejin has a small paddle but can manipulate the puck with her mind. Lexan has a normal paddle, is very strong at the begining of the match but become weaker and weaker.

Physics

The game must feature realistic shot physics. In particular, the following must be implemented:

  • Smashes that give the puck a speed boost of 5% to 15% when struck hard and on target
  • Lifts that impart spin on the puck when struck at an angle
  • Flips that reduce the puck's speed.

You can represents physics by coding the underlying physical laws by yourself or by using the physics implementations available within JMonkey.

Power Up

Bonuses may appear randomly on the game board and grant an effect to the player who hits them with the puck. Three bonuses must be included:

  • Speed +: The puck gains a 50% speed boost when it hits this bonus, lasting for 10 seconds.
  • Size +: The puck’s size increases by 20% for 10 seconds.
  • Size -: The puck’s size decreases by 20% for 10 seconds.
  • Shot on Goal: The puck travels directly toward the center of the opponent’s goal.
  • Paddle +: The player’s paddle increases in size by 10% for 20 seconds
  • Paddle -: The opponent’s paddle decreases in size by 10% for 20 seconds

Beyond Air Hockey

You are free to implements more functionnalities as you wish but expected behaviors and rules has to be respected.

Inspiration

To get inspired, we encourage you to try the following games:

ShufflePuck Cafe (The legend)

ShufflePuck Cantina (a remaster of the original)

Air Hockey (a modern Air Hockey)