Connect3D is a simple 4 in a row game. The objective is to make four in a row with your pieces, while preventing other players from doing the same. Connect3D offers 2 - 4 player games and the ability to set the size of the board.
It follows a traditional Model View Controller architecture. Connect3D has three different views.
view | description |
---|---|
Text | Displays the game using the console, accepts text based input. |
Software | Displays the game using Java Swing. Uses mouse based input. |
Hardware | Displays the game using OpenGL. Uses mouse based input. |
I currently do not know how to package Connect3D's dependencies into a runnable jar file.
As such this is how you can set up an Eclipse project to run Connect3D.
- First clone the source files into an Eclipse project.
- Connect3D uses LWJGL v3.3.0 to access OpenGL. The download page for lwjgl is here the Minimal OpenGL preset should be sufficient. Ensure the JOML Addon is selected (JOML version 1.10.3). Use the ZIP Bundle mode. Select your platform in the Natives section.
- This excellent resource explains how to configure Eclipse to use LWJGL.
- When Eclipse has been configured to use LWJGL you can run the Main method from Connect3DMain package.
To place pieces when using the Software renderer, click in the grid that is drawn to the screen. Hovering the mouse over the grid will show you where the piece will be placed. Use the right mouse button to pan around the board.
When using the Hardware renderer, move the mouse to the column you want to place a piece in. The right mouse button can be dragged to pan around the board. The backspace key toggles the debug view that shows possible piece placements. Scroll up or down to zoom in and out.