This is a 3D clone of the two-player connection board game, Connect Four, created in the Unity Engine scripted in C#. The key features this game has to offer is online multiplayer and an AI that gets progressively harder each time you beat it.
The players choose a color and then take turns dropping colored discs 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 discs. The first player can always win by playing the right moves.
For optimization purposes, this game was designed under an event-driven architecture where no code is run in an Update() function. So instead, only coroutines and C# delegates are used for example for input detection and moving the objects around.
- Download & extract the ZIP file
- Open the extracted folder
- Go to the Builds folder
- Windows - Click Connect4.exe
- Android - Put Connect4.apk to Android phone
- Open the application on whichever operating system you are running on
- Select Local Game button to play against the AI
- Select Quick Game button to play against a random player on a different device (MUST ENTER IN USERNAME)
- Select the black disc or white disc
- Press Play Button
- Press Reset Button to play another round of Connect-4 after game has finished
- Press Back Button to go back to start menu
Instruction | Touch Controls |
---|---|
Move Disc to the Left | Swipe Left |
Move Disc to the Right | Swipe Right |
Drop Disc | Swipe Down |
- On Windows, swipe controls are activated by holding the left mouse button
I created all of the 3D models in Blender (Black Disc, White Disc, & Game Board), including the pictures for the black & white disc. The other 2D assets were from the asset store.
- The Connect Four title asset originated from PSD Logo Templates by Unruly Games
- The rest of the user interface assets were from Simple UI by Unruly Games