Based on the classic Atari Pong (1972).
- User Interface Navigation: Mouse / Keyboard (Arrows/Enter) / Controller (Left Stick + Button0)
- Gameplay (One Player Mode):
- Keyboard:
- W/S or Up/Down Arrows to move up and down
- Pause/Menu: P or Esc
- Controller:
- Left or Right Stick Up/Down to move up and down
- Pause/Menu: Back or Start
- Keyboard:
- Gameplay (Two Players Mode):
- Keyboard:
- Left Player: W/S to move up and down
- Right Player: Up/Down Arrows to move up and down
- Pause/Menu: P or Esc
- Controller:
- Left Player: Left Stick Up/Down to move up and down
- Right Player: Right Stick Up/Down to move up and down
- Pause/Menu: Back or Start
- Keyboard:
Just like table tennis, but shorter rounds: First to 7 points wins, unless deuce (both players reach 6 point), then play until one player is 2 points ahead, then that player wins.
First serve direction is random. Alternate serve direction every 2 rounds, unless deuce, then alternate serve direction every 1 round.
- One Player mode (versus bot).
- Two Players mode (local versus).
- Full Keyboard+Mouse/Controller support.
- Custom-made SFX.
- Custom-made art and animation.
- Finite State Machine implementation.
For this mode, using my custom Finite State Machine. I have implemented a Simple Reflex Agent for the bot paddle. Its behavior follows this state diagram:
Idle
is the start state. It detects if the ball is coming away or toward from the bot paddle, then transition to thePrepare
orIntercept
state, respectively.Prepare
moves the bot paddle to the center of the y-axis for maximum ball coverage, then wait until the ball is coming toward the bot paddle to transition toIntercept
state.Intercept
predicts where the ball will be in the next 60 physics frames, then tries to intercept the projected ball's y-coordinate if its x-coordinate matches that of the bot paddle. Transitions toPrepare
immediately when the ball bounces away.