PDA

View Full Version : How to Make a Connect Four Machine in LittleBigPlanet



jiggles
02-02-2009, 10:03 PM
Hi all,

I made a brief overview of how I made my latest creation (Sweet Connect Four Machine!):

hLWoiDTNX8s


It's a 2-player game of Connect 4, as the name would suggest, where the game itself controls the flow of play (so it's not possible to cheat). The players take a colour each and take it in turns to drop discs of their colour onto the 7x6 grid, in an effort to be the first to get four in a row in any direction. In addition to controlling whose turn it is, the game is able to identify the winner, and the players are able to reset the board and play as many times as they wish (but they are unable to abuse the reset function if, say, they're losing).


The level uses 100% of the thermometer (seriously, placing one more LED light causes it to overheat) and around 1000 wires.

Hope you like.

- jiggles

Whalio Cappuccino
02-02-2009, 10:25 PM
Honestly, why aren't you working for NASA or something big like that yet?

jiggles
02-02-2009, 10:29 PM
why aren't you working for NASA

I once punched an astronaut.

In my defence, he had it coming.

Whalio Cappuccino
02-02-2009, 10:30 PM
I once punched an astronaut.

In my defence, he had it coming.

Wow, what did he do to you?

jiggles
02-02-2009, 10:33 PM
Wow, what did you do to him?

I'm only kidding. :p

NASA don't employ the Irish. Something about giving someone that much responsibility when they're off their face on Guinness doesn't sit well with their company policy.

:p

moleynator
02-02-2009, 10:54 PM
Oh whaaaaale and jiggles...

*Rolls eyes*

I'll check this out.

Trap_T
02-02-2009, 11:03 PM
After watching the video
Looks awesome! Good job!


before watching the video
I've programmed connect 4 and it requires a lot of AND commands.... I'm pretty sure I know how you did this or atleast how I would do it.

A bunch of AND switches (one for each winning combo, believe there's... 73? just a quick guess, something around there), one for each winning combo (4 in a row) and depending if the piece is in a certain spot it would move a piston and all of the combos' ANDs that it's involved in.

So in total 146 AND switches (one for each color) X_X right?

I wanna make one now!

jiggles
02-02-2009, 11:09 PM
before watching the video
I've programmed connect 4 and it requires a lot of AND commands.... I'm pretty sure I know how you did this or atleast how I would do it.

A bunch of AND switches (one for each winning combo, believe there's... 73? just a quick guess, something around there), one for each winning combo (4 in a row) and depending if the piece is in a certain spot it would move a piston and all of the combos' ANDs that it's involved in.

So in total 146 AND switches (one for each color) X_X right?

Not a bad guess. There's 69 possible wins for each colour, so 138 unique wins total, each requiring 4 pistons, 4 blocks of glass and 4 wires going in. 552 wires, 552 pistons and 552 blocks of glass just to see if someone's won. :grr:

Trap_T
02-02-2009, 11:13 PM
Not a bad guess. There's 69 possible wins for each colour, so 138 unique wins total, each requiring 4 pistons, 4 blocks of glass and 4 wires going in. 552 wires, 552 pistons and 552 blocks of glass just to see if someone's won. :grr:

Just seems like a really long and tedious wiring job than anything else lol.
After you make the first AND switch, just duplicate it...

The wiring must of been a pain though ;p

jiggles
02-02-2009, 11:20 PM
Just seems like a really long and tedious wiring job than anything else lol.
After you make the first AND switch, just duplicate it...

The wiring must of been a pain though ;p

Spot on.

The wiring was tedious at the beginning, but I got pretty quick at it, as there was a simple system to stick to. At about 2/3 of the way through, though, it got worse and worse. It's pretty hard trying to wire something up when the wires are invisible! I couldn't see the wire tag coming out of the switches on the board, and I couldn't see the wire I was currently holding!

Dan_Westy
02-04-2009, 05:20 PM
my friend made a connect 4 machine, waaaaaaay more simple, works fine.

Leather-Monkey
02-04-2009, 06:49 PM
D= Im confuzzled.



Looks really cool, will give this a try

wexfordian
02-05-2009, 08:49 AM
Ah! thats what the "braaaaains" tag if for! Seriously though well done and thanks for sharing. It was like a little materclass in switch setup. C'mon Ireland!

NinjaMicWZ
02-05-2009, 08:44 PM
First of all, I'm glad you're Irish, second of all, these are the kinds of creations that are truly and absolutely jaw dropping. Even if I could have planned something like this I would have just thought about all the work it would take and given up right away.

It's ridiculous how it would probably take an hour to make a connect 4 board in real life, but takes hundreds of hours to make one in digital form. I thought technology was supposed to make things easier?

Trap_T
02-05-2009, 08:56 PM
First of all, I'm glad you're Irish, second of all, these are the kinds of creations that are truly and absolutely jaw dropping. Even if I could have planned something like this I would have just thought about all the work it would take and given up right away.

It's ridiculous how it would probably take an hour to make a connect 4 board in real life, but takes hundreds of hours to make one in digital form. I thought technology was supposed to make things easier?

Haha, No lie, I could make a digital connect four 100x times better and faster than I would if I tried to make one out of wood or plastic lol

jiggles
02-06-2009, 12:42 AM
Wow. Thanks for all the kind words and positive feedback, guys. I'm glad you all liked it. I think I'll be doing more of these videos for anything complicated I make in future. :)

Next stop, Buckaroo.

Oh yes.