Hoiktronics: Fully Automated Slot Machine (video tutorial + schematics)

DicemanX

Brain of Cthulhu
I present yet another advanced hoiktronics build: a fully automated slot machine! The slot machine has a bank system that keeps track of your money. Each time you pull the slot lever it deducts $1 from your account, and every time you win it adds to your tally. Here's a video of the slot machine in action, followed by a more in-depth tutorial of the mechanisms involved. In this post I'll summarize the logic of the entire mechanism and present the schematics of the build.


Video:



Picture of the Slot Machine:

5A7C2D84D67FC16F86E778A662006BC33C025954



Wiring:

KuZd6d3.jpg


How the slot machine Works:

When you first enter the machine, $21 is automatically added to the bank. You use money to play - it costs $1 to pull the lever. Each time the lever is pulled, $1 is deducted from the total automatically. A single pull of the lever randomizes the symbols that appear in each of the three slots. There are three possible symbols - a diamond, a spade, and a seven. The payouts for getting three symbols in a row are as follows:

3x Diamond = win $10
3x Spade = win $20
3x Seven = win $20

The winnings are added to the total automatically. Once the player reaches $100 or more (thus winning the game), a secret door opens, granting access to a treasure chest filled with rare items.

Exiting from the slot machine triggers a reset mechanism which wipes the bank total. Re-entering automatically puts $21 into the bank.


Explanation of Mechanism:

The slot machine consists of three components:

1) Randomizer System (cause random symbols to appear in the three slots each time a lever is pulled)
2) State Readers (check to see if 3 identical symbols appear in each of the slots)
3) Count-up and Countdown seven segment displays (keep track of bank totals)

The randomizer system is constructed by chaining a number of randomizer units together. Here`s a schematic of each unit:

fII7v24.jpg
5yyIZ0W.jpg


The summoned skeleton can take 1 of two paths when it reaches the first door on the left. If the door is closed, then it acts as a solid wall and the skeleton will end up being hoiked further to the right, hitting the pressure plate connected by green wire to an output (right torch in the diagram). If the door is open, then the skeleton ends up getting hoiked upwards and then to the left, hitting the pressure plate connected by green wire to a different output (left torch in the diagram).

When closed doors are activated by wire, they have a 50% chance of opening to the left and 50% chance of opening to the right, so long as there's room. This is why a second door, the door on the right in the diagram, needs to be used in the mechanism. When that door is activated, if it opens to the left, it stops the left door from opening and results in the skeleton passing through the bottom pressure plate. If however the right door opens to the right, the left door is allowed to open and the skeleton passes through the upper pressure plate instead.

In the Slot Machine, each slot has two such randomizers chained together, resulting in 3 possible outputs. The outputs are connected to the slot display and light up torches to form either the diamond, spade, or seven symbols. A skeleton that passes through the first randomizer triggers via an early pressure plate a skeleton to pass through the next randomizer, until the randomly-generated symbols appear in all three slots.

The next stage after randomization is the activation of the state checkers (the final randomizer in the chain has a pressure plate that is connected to skeletons in the state readers). State checkers check the state of a system, and generate outputs if a certain state is detected. Here's what they look like in the slot machine:

yLRiCBl.jpg


kJHKDbk.jpg


The red wire on the far left is from the last randomizer, and spawns skeletons in all three rows. The skeletons pass through the ghost walls (actuated hoik teeth next to a solid wall makes it possible to pass through that wall) and trigger the pressure plates that send them through the horizontal hoiks. The skeletons initially take damage from the lava, and can be killed off by any of the three spear traps as they move through the horizontal hoik.

The bottom track represents the default state of the state checker - a skeleton passing through that track, it it were invulnerable, would trigger all three pressure plates (of course in reality it would die at the first one and never make it through the other two). The top track represents a situation in which none of the three pressure plates would be activated. To create this state, signals have to be sent through all three blue wires to toggle the bottom and top hoiks that control whether the pressure plates to the right of those hoiks will be activated.

In other words, if the same symbol appears in all three slots then the skeleton will successfully pass through one of those three tracks and reach the pressure plate at the far right. That pressure plate is connected to the counter mechanism, which will add 10 or 20 to the bank total, depending on which three symbols are matching in the three slots.

The counter mechanism will be explained in more detail in a separate thread, due to its complexity. The video goes into some detail regarding the mechanism, and the tutorial world is available for download below if you want to see the mechanism first hand and play around with it.


Update:

I added two new mechanisms to the slot machine. The first is a XOR gate that disables the lever when the counting mechanisms are active - without this disabling mechanism if the lever was pulled twice in quick succession then it messed up the counting mechanisms. Here's are the updated pics of the relevant region:

6FD55FB69569FA221C29DE1BF75B44412C8B0712


Wiring:

457B6A9F82C4B8A68D636C2C77CBB48A1565D2A8


The two XOR gates are to the left - here's a closer look:

TW19SzG.jpg


The sequence of events is now as follows:

When the slot machine lever is pulled, it spawns a skeleton in the top left XOR gate (referring to the close-up pic directly above). That skeleton will be hoiked down into the lava by the second down hoik tooth or by the third down hoik tooth. In the lava are pressure plates that connect to the next XOR gate to continue the chain of events. There are also actuated blocks beolow each of those down hoik teeth. If there is a 0 in the tens position of the dollar amount in the bank, the left actuated block becomes deactuated (via the incoming green wire on the left of that XOR gate), preventing the skeleton from being hoiked downwards at the second hoik tooth. If there is a 0 at the ones position of the dollar amount in the bank, then the right actuated block becomes deactuated (via the incoming green wire on the right of that XOR gate), blocking the skeleton from being hoiked downwards at the third hoik tooth. In other words, if there is $00 in the bank the skeleton is prevented from reaching the pressure plates in the lava, and the chain of events is severed at this point.

If the dollar amount is greater than $00, then the chain of events isn't severed. When the skeleton reaches either of the pressure plates in the lava of the first XOR gate, it spawns a skeleton in the second XOR gate to the bottom right corner of the close-up pic above. The skeleton needs to pass straight through to the two pressure plates on the right and into the lava + spiky ball trap where the blue wire and green wire connect. Those two pressure plates initiate the deduction of $1 from the bank total, and trigger the spawning of the skeleton in the reset hoik track which will then trigger the randomizers as described earlier in this post.

When the NPCs are busy adding to or deducting from the bank total, the blocks below the hoik teeth in this second XOR gate become actuated, and the skeleton is hoiked downward into the lava and spiky balls below. This prevents the skeleton from ever reaching the far right until the addition/subtraction operations are completed.



World Download:

http://www43.zippyshare.com/v/6JBOnLVK/file.html (old link)
http://www77.zippyshare.com/v/YlLi8lnN/file.html (updated link)
(Enter B0 in the Teleporter Hub to reach the Slot Machine)


Tutorial World:

http://www64.zippyshare.com/v/5sYcbUsL/file.html (old link)
http://www44.zippyshare.com/v/SmMaiQih/file.html (updated link)
(use the left teleporter at spawn point)
 
Last edited:
Wow that makes my fingers hurt just thinking about building it...btw do you think it would be possible to make this on consoles? If so ik what i might be doing for the next fortnight lolz. And 1st lolz


Edit: After observing your video and seeimg the mechanisms used it might be feasible with a few modifications due to lack of down slopes and a number of issues that i have run into. I will attempt the smaler mechanisms individually and return with my findings later tonight.
 
Last edited:
Great use of the new style door based hoik randomiser (that you designed), on top of an up/down decimal counter and display that flummoxed me for a moment (now try that with 10 different overlaid symbols!). This was the big project then, right? I'll have to digest the whole guide some time.
 
Ugh i almost had it then idk thing is fickle. Its possible without down slope just very infuriating. The skeletons won't hoik up then they do then dont hoik thru or get stuck somewhere... ill try some more later after some sleep and when my eyes stop bleedi g :zombie: ill post a pic of what i got so far after i wake up so i can get input on how to remedy it without the use of dynamite or explosives. gotta hand it to you guys this stuff is very tedious and kinda complicated
 
Great use of the new style door based hoik randomiser (that you designed), on top of an up/down decimal counter and display that flummoxed me for a moment (now try that with 10 different overlaid symbols!). This was the big project then, right? I'll have to digest the whole guide some time.

It started out as a smaller project (slot machine without the bank) but I felt something was missing. Then I got the idea of fully automating it via the count-up and count-down mechanism. Figuring out the logic of that mechanism wasn't too bad, but there were some minor issues that took a while to solve. In particular, issues arise when you're trying to do a feedback mechanism on a straight track - in a feedback mechanism hoik teeth get altered behind the NPC, but eventually the mechanism will have to feed forward to the end of the track, so you have to deal with the NPC arriving there. Having to deal with one such track is one thing, but having to deal with two anti-parallel tracks (one to count up and the other to count down) is a significant challenge.

I'll present a more detailed discussion in a separate thread, because there is much to explain.
 
Wow that makes my fingers hurt just thinking about building it...btw do you think it would be possible to make this on consoles? If so ik what i might be doing for the next fortnight lolz. And 1st lolz


Edit: After observing your video and seeimg the mechanisms used it might be feasible with a few modifications due to lack of down slopes and a number of issues that i have run into. I will attempt the smaler mechanisms individually and return with my findings later tonight.

On consoles you only get half the sloped blocks, and this specific build unfortunately uses all of them. However, it is possible to modify the build to work on console but it would take a bit of work. It also depends if you're only interested in the slots component without the bank component.

If you manage to build some of the mechanisms on console, don't hesitate to post them!
 
Definitely will try some more just took a break...had some other projects i was doing and life ya know lolz...but once i got the kinks worked out i will post the images...and eventually the map once i have the aesthetics perfected...also will attempt it on mobile no promises tho...all credit to you and the rest of the T-MEC team who hand a hand in its creation of course i just recreating it for a console freindly version til they get the rest of the slopes
 
Definitely will try some more just took a break...had some other projects i was doing and life ya know lolz...but once i got the kinks worked out i will post the images...and eventually the map once i have the aesthetics perfected...also will attempt it on mobile no promises tho...all credit to you and the rest of the T-MEC team who hand a hand in its creation of course i just recreating it for a console freindly version til they get the rest of the slopes


Would you be able to post a video as well? It will be interesting to see how much can be replicated on console!
 
Would you be able to post a video as well? It will be interesting to see how much can be replicated on console!
yes but itll be shot by phone so idk what quality video itll be...usually good but ill show you i actually just got the randomizer kinks fixed although it wont work at night due to skeletons wanting my brains
 
So these pics show the working randomizer but its not super random like yours and the top door will force the skeletons to go into the left most traps if i wire it to shut as you did so it flip flops from side to side and closes occasionally...ill post video jn a fewWiring.jpg Randomizer.jpg
 
So these pics show the working randomizer but its not super random like yours and the top door will force the skeletons to go into the left most traps if i wire it to shut as you did so it flip flops from side to side and closes occasionally...ill post video jn a fewView attachment 33767 View attachment 33768

It'll be interesting to see if you can get this to work perfectly! In the state shown in your pics (left door open, right door closed) which way would the skeleton end up going? How would the skeleton go if both doors are closed?
 
So the video is :red:ty cause i had to compress it and idk a good one 2 use and the websites said no proper extension or something along those lines...ugh me goi g to bed deal with this tomorrow
 
After the video was posted i wnet back and added wires where shown and now the skeletons go thru the botto and pop in the room like they should i stead of just like walki g up i to it
PicsArt_1425441759791.jpg

ive also been able bring the far right wall to where it is supposed tl be and add the spiky ball trap back in and it wlrks exactly as yours does just slightly slower with the killing and ive had to slightly rweak ghe wirkng to get the dorors to stay shjt so as to avoid jamming...when i get back on ill take a vid or pic and repost it or pm it either way the next mechanisms are gonna be ridiculously annoying to re vamp
 
Last edited:
Update:

I added two new mechanisms to the slot machine. The first is a XOR gate that disables the lever when the counting mechanisms are active - without this disabling mechanism if the lever was pulled twice in quick succession it would then mess up the counting mechanism. Here's are the updated pics of the relevant region:

6FD55FB69569FA221C29DE1BF75B44412C8B0712


Wiring:

457B6A9F82C4B8A68D636C2C77CBB48A1565D2A8


The two XOR gates are to the left - here's a closer look:

TW19SzG.jpg


The sequence of events is now as follows:

When the slot machine lever is pulled, it spawns a skeleton in the top left XOR gate (referring to the close-up pic directly above). That skeleton will be hoiked down into the lava by the second down hoik tooth or by the third down hoik tooth. In the lava are pressure plates that connect to the next XOR gate to continue the chain of events. There are also actuated blocks beolow each of those down hoik teeth. If there is a 0 in the tens position of the dollar amount in the bank, the left actuated block becomes deactuated (via the incoming green wire on the left of that XOR gate), preventing the skeleton from being hoiked downwards at the second hoik tooth. If there is a 0 at the ones position of the dollar amount in the bank, then the right actuated block becomes deactuated (via the incoming green wire on the right of that XOR gate), blocking the skeleton from being hoiked downwards at the third hoik tooth. In other words, if there is $00 in the bank the skeleton is prevented from reaching the pressure plates in the lava, and the chain of events is severed at this point.

If the dollar amount is greater than $00, then the chain of events isn't severed. When the skeleton reaches either of the pressure plates in the lava of the first XOR gate, it spawns a skeleton in the second XOR gate to the bottom right corner of the close-up pic above. The skeleton needs to pass straight through to the two pressure plates on the right and into the lava + spiky ball trap where the blue wire and green wire connect. Those two pressure plates initiate the deduction of $1 from the bank total, and trigger the spawning of the skeleton in the reset hoik track which will then trigger the randomizers as described in the opening post.

When the NPCs are busy adding to or deducting from the bank total, the blocks below the hoik teeth in this second XOR gate become actuated, and the skeleton is hoiked downward into the lava and spiky balls below. This prevents the skeleton from ever reaching the far right until the addition/subtraction operations are completed.
 
Last edited:
Hey there DicemanX, I just wanted to let you know a little bug I found in your 1.3 world, specifically your slot machine. I got a triple "7" and i only got $10 rather than $20. I don't know if anyone else is getting this issue, but I will say that my computer isn't the greatest that it can be, heck, it doesn't even have windows 7 on it because it just won't handle it. BTW, i did find that the spades work just fine, but the diamonds are still in testing.
[doublepost=1466447285,1466447042][/doublepost]so i finally got a 3 diamonds in a row and they give me $20, so what it looks like to me is that the triple diamonds are giving me $20 instead of the triple 7.
[doublepost=1466447728][/doublepost]ha ha ha ha ha I broke the slot machine. look in the attachments

P.S. yes that is a baby skeletron head covering me.
 

Attachments

  • Capture 2016-06-20 14_34_58.png
    Capture 2016-06-20 14_34_58.png
    311.9 KB · Views: 287
Back
Top Bottom