Tic-tac-toe, one of the simplest board games in existence, is nearly ubiquitous. illi4dt3 is an extension of this classic game into four dimensions.
The classic 2-dimensional version is widely known. A 3x3 board is filled one piece at a time, with two players taking alternating turns. The game is won when a player manages to get three in a row, column, or diagonal, and is drawn when all squares are filled.
Fig. 1 - Won 2-dimensional tic-tac-toe games
A common variant of this game extends the square board into a cube (with dimensions 4x4x4). Play continues as above, except that the game is won when a player gets a line of 4 pieces in any combination of dimensions. The playing cube may be represented by a cube, or more commonly, a set of 4 grids, each 4x4 in size (as shown in Figure 2).
Fig. 2 - 2 winning lines for X in 3-dimensional tic-tac-toe.
Thus, if this trend continues, 4-dimensional tic-tac-toe may be played on a 5x5x5x5 hypercube with 5 pieces in a line needed for victory.
The program uses a pseudo-4-dimensional approach to display the 3-dimensional projection of the hypercube grid on which the game is played. Using a combination of mouse and keyboard, the user will has control over translation and rotation in all 4 dimensions. The keyboard is used to input the player's moves by moving to the desired square among 4 dimensions. The hypercube is approximated by a series of five cubes, each with a different w (4th dimensional) coordinate. The user is able to determine how this w coordinate is projected onto three space.
Screenshots
The same game in different perspectives in 4 space
Two winning rows
Areas of future expansion:
Minor bug fixes
More optimized code (especially with many objects drawn)
True 4-dimensional playing field
Computer with Artificial Intelligence
Extension to n-dimensions
Last edited 2004 May 12th by Muneaki Nakamura