“4Gravity!” is an arcade game for Commodore C=64, Atari 400/800 and Dragon 32/64 written in a short time thanks to the primitives made available by the ugBASIC language.
This game is a “Connect Four” clone. It is a two-players, one-player and zero-player connection board game, in which the players take turns dropping colored tokens into a seven-column, six-row vertically suspended grid. The pieces fall straight down, occupying the lowest available space within the column. The objective of the game is to be the first to form a horizontal, vertical, or diagonal line of four of one's own tokens.
The game allows you to select the type of player for each of the two colors, between computer and human, so there are 4 possible combinations:
By default the game always starts in 2 players mode. You can change this setting by pressing the following keys:
1 you choose RED player as human
2 you choose RED player as computer
3 you choose YELLOW player as human
4 you choose YELLOW player as computer
[SPACE] you will start the game.
RED color will start always as the first, while YELLOW color will be always the second. The gameplay example shows the first player starting by dropping one red token into the center column of an empty game board. The arrow always points to who gets the next move.
If the player is human, the keyboard will be enabled to wait for a keypress. By pressing a digit from 1 to 7 you will put a token on that particular column. If the column is not full, the token will move up to the lower free limit of the column. If the column is already full, the request will be ignored.
If the player is computer, it will choose automatically one of the (free) seven column to put the token on.
The two players then alternate turns dropping one of their tokens at a time into an unfilled column, until one of them achieves an horizontal, vertical or diagonal four in a row, and wins the game. If the board fills up before either player achieves four in a row, then the game is a draw.
The game is available on itch.io.
The sources are on github: