Moving the disc

There are lots of ways to let the player choose which column to play, but to preserve the look and feel of the original board game you should make him select the column moving the disc over it. Obviously you can't allow the player to freely move the disc, but you will have to lock y coordinate and let the player move the disc horizontally with the mouse.

The idea: Let the player move the disc with the mouse along x-axis to select the column where the disc should be dropped. It looks simple, but leads to two problems:

  • What happens when the player moves the disc outside the game board?
  • What happens when the player moves the disc inside the game board, but in a position unclear to determine which column he's choosing?

This picture ...

Get Flash Game Development by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.