mesecons competition machine in-progress

Post Reply
User avatar
khonkhortisan
Member
Posts: 30
Joined: Fri Jun 29, 2012 17:30

mesecons competition machine in-progress

by khonkhortisan » Post

This is an incomplete tic-tac-toe machine. There are nine input buttons, a reset button, a current team indicator, a team style setting, a win blink setting, a manual team changer, and a 9x9 display screen. There's no win counter.

download:
v3 http://www.mediafire.com/?ogke19pbbfs3osv
v2 http://www.mediafire.com/?befx607rhkxr5r1
v1 http://www.mediafire.com/?m50j2fzdbj0bde4
add "active_block_range=5" to your minetest.conf
coordinates: (30.7, 2.5, 20.4)

Progressively less outdated pictures:
Image
Image

Problems:
I press some buttons, the board lights up, press reset, the board goes dark, then sometimes the board lights up again. I have wires left on with no source of power/logic for it. There are µcs on each end of the wire, with the relevant ports off.
Pressing the same button twice won't put an X over an O, however, it will change the turn.
The win calculation is working correctly, but it doesn't know when the board is full.
Somehow the blinky plant overheated random chips in the row it was connected to.

Currently:
There is a three-way setting for whose turn it is after a win
a win stops input
You must wait for the whole circuit to load before the board blinks (if you quit during a win) - and I believe for proper operation, too.
Even if you win in two or (three) ways at the same time, it still blinks correctly.
There is a current turn indicator.
There is a setting for blinking the winning line.

It's not quite ready to be entered in the competition yet. Cornernote told me to put this here.
Last edited by khonkhortisan on Thu Aug 30, 2012 20:13, edited 1 time in total.

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Post

khonkhortisan wrote:Cornernote told me to put this here.
It was just a suggestion (He made me do it officer!)

=)


p.s. really nice work, cant wait to see it completed

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Post

just downloaded and had a run through, this is so huge! i can follow the wires to the display, but once it hits that grid oc microcontrollers, whoa, i'll let you understand the internals!

are you going off a diagram, or do you have it in your head?

2cool4me4
Member
Posts: 16
Joined: Sat Aug 25, 2012 22:16

by 2cool4me4 » Post

About the blinking thing: use a mese clock with delayers, like most people would do with redstone when they need an endless loop.
I have done NOTHING!

User avatar
khonkhortisan
Member
Posts: 30
Joined: Fri Jun 29, 2012 17:30

by khonkhortisan » Post

are you going off a diagram, or do you have it in your head?
I'm going completely off my head. That's why it doesn't quite work right yet.
once it hits that grid...
That grid of microcontrollers would be easier to understand if mesecons had redpower2's "Null Cell" where the X ends of the wire are connected, the Z ends of the wire are connected, but the X and Z ends aren't connected to each other.
mese clock with delayers
I'm not sure what you mean when you say mese, but I tried having multiple delayers in a loop, and it didn't maintain a consistent timing and ended up with the wires all on (after 11 loops around). I tried having a NOT connected to a delayer, but it freezes after restarting the server.

The first row of microcontrollers stops the buttons from doing anything if the game has already been won.
The second two rows let only one button be pressed at a time.
The third row goes off to a T-flop team changer, that changes the team when the button releases.
The fourth row splits the buttons into the amount of wires needed for the display and allows the signal to continue on either that square's X wire or that square's O wire.
The fifth row is a passthrough to let the reset button on both sides of the sixth grid.
The sixth grid keeps the square on if the button is pressed and that square isn't already the other symbol, and turns the square off if the reset button is pressed.
Around the second corner, the giant seventh grid, on the top level, ANDs together the top row of Xes, the middle row of Xes, and so on for the 16 ways of winning, then it both passes that to the bottom row and passes it to an "X won" wire and an "O won" wire
The bottom of the seventh grid blinks the same wires that caused a win.
The eighth two rows map an X and O wire to a 3x3 display.

That's how it works.
Last edited by khonkhortisan on Thu Aug 30, 2012 06:59, edited 1 time in total.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

Clock circuit that might be useful to someone, attached to a simple 4-bit binary counter. Turn the switch on to let it run, off stops the clock.

µCScript code for the "clock chip":

if(C&D)after(0.2, "off(B)"); if(D&!C)after(0.2, "on(B)");

Change the 0.2's to adjust the clock frequency (higher numbers = slower clock)

Image

The code for the flip-flops (the three µC's in the back) in this circuit is just the default T-flop code the mod provides, but tweaked for the particular ports I'm using:

if(B)sbi(1,1); if(!B&#1&D)off(D)sbi(1,0); if(!B&#1&!D)on(D)sbi(1,0);

(where B is the Clk input and D is the Q output)
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
khonkhortisan
Member
Posts: 30
Joined: Fri Jun 29, 2012 17:30

by khonkhortisan » Post

Added v3 which has a turn style, team indicator, wire swapper (which you should never make if you don't have to)
I still need a full board detector, to not switch teams if the board is already full, and if I finish every thing else, possibly a win counter to polish it off.
VanessaE, I based my clock off that one.
Last edited by khonkhortisan on Thu Aug 30, 2012 06:39, edited 1 time in total.

irksomeduck
Member
Posts: 224
Joined: Tue Aug 28, 2012 21:45
Location: Littleroot town, Hoenn region

by irksomeduck » Post

Looks fancy...
I love exploring minetest worlds :D
If you have a good seed let me know
--------------------------------------------------
My world/house pack- http://minetest.net/forum/viewtopic.php?id=3066

User avatar
khonkhortisan
Member
Posts: 30
Joined: Fri Jun 29, 2012 17:30

by khonkhortisan » Post

So I missed the mesecons competition, messing with worldedit and mesecons sources. Oh well. I'll finish this eventually. It mostly works.

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Post

im still keen to see it working

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests