Starbound

Starbound

Not enough ratings
Wiring Games with Starbound: Connect Four
By MongooseCalledFred
This guide is for people who are bored and looking for something else to do with Starbound, but it may still be boring. It is for people who want to have fun with friends, but it may make it easier for your friends to think of things that are more fun to do. It is also for people who want proof that you can wire a functional game with a wiretool and 444 wirable components: 182 And Switches, 64 Not Switches, 99 Latch Switches, 15 buttons, 42 lights of one color, and 42 lights of another. If you want to auto-detect wins, you'll need hundreds more And Switches. If you find any typos or bugs, please post it in the comments (with a link to a screenshot showing you actually tried if it is a bug).

Note: Persistent Switches now have the functionality that Latch Switches are being used for. You can safely use a Persistent Switch in place of a Latch Switch if: instead of connecting to both nodes, you connect to the top node, and instead of connecting to the top node only, you connect to the bottom node.
   
Award
Favorite
Favorited
Unfavorite
The Board
You need a grid six cells high and seven wide. Each cell needs to have at least 3 states. (Empty, Contains A's piece, Contains B's piece.) You can accomplish this with lights, like so:Note that both lights will never be on at the same time when wired.
Table of Switches
Note that you will need seven columns, so you will have to set up seven distinct copies of columns A and B. You only need one copy of column C, but you will still have to wire it and the reset button to each of those seven pairs of columns.
C
Connections
1
a
Lat
b
c
C1c->A1b, C2a
2
a
Not
c
C2c->B1b
Reset Button->(A8a, B8a, A12a, B12a, A16a, B16a, A20a, B20a, A24a, B24a, A28a, B28a, A32a, B32a, C1a)

A
B
Connections
1
a
And
b
c
a
And
b
c
A's Button->A1a
B's Button->B1a
A1c->A2a | B1c->B2a
2
a
And
b
c
a
And
b
c
A2c->A3a, A4a, C1a
B2c->B3a, B4a, C1a, C1b
3
a
Not
c
a
Not
c
A3c->A4b
B3c->B4b
4
a
And
b
c
a
And
b
c
A4c->A7a, A11a, A15a, A19a, A23a, A27a, A31a
B4c->B7a, B11a, B15a, B19a, B23a, B27a, B31a
5
6
a
Not
c
A6c->A7b, B7b
7
a
And
b
c
a
And
b
c
A7c->A8a, A8b
B7c->B8a, B8b
8
a
Lat
b
c
a
Lat
b
c
A8c->A6a, B10a, 1st (Bottom) Light A
B8c->A6a, B10a, 1st (Bottom) Light B
9
10
a
Not
c
a
And
b
c
A10c->B10b
B10c->A11b, B11b
11
a
And
b
c
a
And
b
c
A11c->A12a, A12b
B11c->B12a, B12b
12
a
Lat
b
c
a
Lat
b
c
A12c->A10a, B14a, 2nd Light A
B12c->A10a, B14a, 2nd Light B
13
14
a
Not
c
a
And
b
c
A14c->B14b
B14c->A15b, B15b
15
a
And
b
c
a
And
b
c
A15c->A16a, A16b
B15c->B16a, B16b
16
a
Lat
b
c
a
Lat
b
c
A16c->A14a, B18a, 3rd Light A
B16c->A14a, B18a, 3rd Light B
Table of Switches, continued
17
18
a
Not
c
a
And
b
c
A18c->B18b
B18c->A19b, B19b
19
a
And
b
c
a
And
b
c
A19c->A20a, A20b
B19c->B20a, B20b
20
a
Lat
b
c
a
Lat
b
c
A20c->A18a, B22a, 4th Light A
B20c->A18a, B22a, 4th Light B
21
22
a
Not
c
a
And
b
c
A22c->B22b
B22c->A23b, B23b
23
a
And
b
c
a
And
b
c
A23c->A24a, A24b
B23c->B24a, B24b
24
a
Lat
b
c
a
Lat
b
c
A24c->A22a, B26a, 5th Light A
B24c->A22a, B26a, 5th Light B
25
26
a
Not
c
a
And
b
c
A26c->B26b
B26c->A27b, B27b
27
a
And
b
c
a
And
b
c
A27c->A28a, A28b
B27c->B28a, B28b
28
a
Lat
b
c
a
Lat
b
c
A28c->A26a, B30a, 6th Light A
B28c->A26a, B30a, 6th Light B
29
30
a
Not
c
a
And
b
c
A30c->B30b, A2b, B2b
B30c->A31b, B31b
31
a
And
b
c
a
And
b
c
A31c->A32a, A32b
B31c->B32a, B32b
32
a
Lat
b
c
a
Lat
b
c
A32c->A30a, 7th (Top) Light A
B32c->A30a, 7th (Top) Light B
Explanation
Column C is responsible for keeping track of whose turn it is for the logic.

The first chunk of the main columns is responsible for determing that:
  1. You pressed the button for this column
  2. It is your turn
  3. There is still space in this column.
If those are all true, the Not Switch and And Switch immediately below will be triggered. Column C will also be notified to toggle whose turn it is. The Not Switch and And Switch are intended to shorten the signal to exactly one frame. If it wasn't shortened, multiple cells would light up, instead of just one.

Each chunk thereafter is responsible for one cell. The Not Switch and the And Switches are responsible for determining that:
  1. This cell is empty
  2. The cell below has a piece in it (if applicable).
If those are both true and the column was selected, both nodes of the Latch Switch are triggered. This sets the Latch Switch to On until the reset button is pushed. The Latch Switch tells the appropriate pieces that the cell is occupied, and turns on the associated light.

The Not Switch in the bottom chunk also identifies when the column is full, and notifies the first chunk to prevent wasted turns.
5 Comments
teddie fazbeer 16 Jan, 2021 @ 1:15pm 
:friendly: my brain
MongooseCalledFred  [author] 8 Jul, 2016 @ 7:46am 
I wrote that game in C# from instructions once. It's much more feasible to spawn in the chess pieces and move them around by MM. However, I do have an idea for controls similar to Video Chess on the Atari 2600...
Sans the Skeleton 8 Jul, 2016 @ 4:21am 
No problem, and now do chess :P
MongooseCalledFred  [author] 7 Jul, 2016 @ 4:34pm 
Not as bad as it would have if I had posted the original sketches, without the key... Thanks for the rating.
Sans the Skeleton 7 Jul, 2016 @ 5:07am 
My brain hurts from reading all that. 10/10