Minecraft / Projects

Connect 4 (no sand, win detection, turn validation)

infoWhat is PMCView3D? Read the Schemagic feature announcement for more info.

  • 7
  • 3
  • comment
  • playlist_add
  • share
  • more_horiz
avatar Dr_Gradus
Level 4 : Apprentice Engineer

Connect 4

Hey people,
Here with another redstone build. So what I have here is a Connect 4 game that does not use any sand. This connect 4 is fairly compact and uses fairly simple logic. Some of the features included are Win detection and Turn validation. The win detection and turn validation are both shown on the top cell. When a player wins the top cell will blink the winner's piece. Besides that it'll show who's turn it is on that screen.


The main connect 4 board uses hopper lines and OR gates in order to do the main logic. When a player sends a piece down the hopper line it'll reach the lowest available cell and it checks if the cell is available through hopper locking. If a piece is in a cell then it'll activate an OR gate that will lock a hopper above it closing off that cell.

The win detection works by checking only one player's pieces at a time. So when it is X's turn the win detection will use a demux to check O's pieces (since O just went making it X's turn therefore we check if the move O made won or not). This works vice versa also. If there is a piece of that player in a cell then it'll send a signal out through the demux into the win detection circuit.
The win detection itself is a Signal Strength based AND gate array. Since my connect 4 design uses 4x4 cells (4x4 footprint tileable) the signal strength needed to check 4 pieces is the default signal strength used in mc (15). So to describe it in further detail, if a piece is in the slot then it'll turn off a torch which is powering a line (vertical, horizontal or either diagonals). If there are 3 torches turned off then the signal strength will still reach the output torches (win detection output) but when a 4th input torch is off, the signal strength will be 0 at some points allowing there to be a 4 input AND gate. One neat thing about my design is that the win conditions for a single column, row, or diagonal, will all be on a single line. So every possible win condition in column 1 will be in a single redstone line. This is possible through the use of slabs since slabs work as instant diodes allowing me to stack SS based and gates onto a single line. (Here is an imgur album with screenshots of an old version of the win detection. It may be old but it has good description of the logic if you couldn't follow above)

Here are some reddit posts I made of my previous versions if you want to see my progress to getting my current design.
Connect 4 Version 3 (current version)
connect 4 Version 2
Connect 4 Version 1 (the worst design for sure but still interesting logic)
Progress100% complete

Comments : 0

star Login or register to post a comment.

Planet Minecraft



© 2010 - 2019