Fully functional in-game 24hr clock (with stop/start functions + option to set starting time)

DicemanX

Brain of Cthulhu
After an intense day of building/engineering yesterday, I have created the first ever fully functioning clock *with* 7-segment display within Terraria. The clock can be stopped and restarted at any time, and the hours, minutes, and seconds can be set to whatever time the player wishes. Skeleton statues power the device, but if the player wants to wander off and have time keep going, all that needs to be done is a swap of skeleton statues with king statues along with a removal of the lava. The time elapsed is stored even when the game is shut off, so the player can actually keep track of play-time using this clock. A single 1-second timer powers the entire device.

Aside from the engineering feat, this clock has actual applications within Terraria. It can allow for automated events at certain times while playing (perfect for adventure maps), and allows for boss and moon event autofarming while completely away from keyboard.

My thanks to ZeroGravitas for introducing us to Hoiktronics and for his continuous great feedback, both of which were instrumental in inspiring me and pushing me to build this clock!


Video of the clock in action:




Construction + Wiring (white background walls for clarity):

8RM0qHR.jpg


nfb1GR0.jpg



Explanation:

The 7-digit displays are all hooked up to their own hoiktronics grid. In each grid, a skeleton is hoiked upwards and turns on/off certain segments in the display by passing over pressure plates. Each time a skeleton is hoiked up via a particular path, the tooth below that upward hoik deactuates, and the next adjacent tooth actuates. This results in the next skeleton taking the adjacent path upwards. Once a skeleton takes the final upwards path, it also triggers a skeleton to spawn in the next hoiktronics grid. So, for instance, if the seconds display reads 29, then once the ones digit turns from 9 to 0, it simultaneously changes the tens digit from 2 to 3. Likewise, if the hours and minutes display is 10:59pm, then once the ones digit changes from 9 to 0, it will be accompanied by a change of the tens digit from 5 to 0 and the hour to change from 10 to 11.

One 1-second timer powers the entire clock. Three skeleton statues are also used, and a reset mechanism uses separate wires from the five reset switches to both the teleporters in each hoiktronics grid and the skeleton statues. Each switch in the reset mechanism advances the count in the seven-segment display it's connected to by one. The reset switches can be activated very rapidly, which makes setting the desired time easy.


World Download:

http://www.filedropper.com/dicemanxultimatehubworldv64


ZeroGravitas' Guide to Hoiktronics:

http://forums.terraria.org/index.php?threads/hoiktronics-what-is-it-guide.8371/
 
Last edited:
I think they will never fix this bug now.

Let's hope so. Hoiks aren't abusive, but they do enable a whole host of amazing contraptions. With the introduction of hoiktronics we should be able to construct some pretty elaborate machines and "catch up" to what players have accomplished in minecraft.
 
Pretty interesting contraption you have here, sir, though the only thing hard to understand it's the display, could you make a diagram in your free time, explaining how it cascades? (better ask the creator rather than spending 1 hour trying to explain it to yourself) There are certain adaptations that'd fit it nicely, like using the military system instead, or making it flush with the floor. I see a nice use as the timer for the bomb in one of the arenas Yrimir showcased long ago (though briefly, as a cutscene), on this subject, it's there a way to create a real, binary randomizer using NPCs?
~Agreed, hoiktronics are certainly one of the hot topics in the geeky part of Terraria, what they lack in compactness they do in much higher speed of react and action, though the ol' trusty birds are still a viable option.
 
Pretty interesting contraption you have here, sir, though the only thing hard to understand it's the display, could you make a diagram in your free time, explaining how it cascades? (better ask the creator rather than spending 1 hour trying to explain it to yourself)

Sure thing. The entire set-up is really just 5 components put together. Each component consists of a seven segment display for either digits 0-9 or digits 0-5 attached to a hoiktronics grid. A hoiktronics grid consists of separate tracks that hoiks a mob or NPC (or a player) causing certain pressure plates to be activated along the way. Here's a picture from a simpler set-up:

B2D6BB30D5246F10C8F4C85438C69E9712E7430F


There are 10 tracks on the hoiktronics grid on the right (corresponding to the digits 0-9), and six tracks on the left (corresponding to the digits 0-5).

Let's focus only on the right grid. When the right seven segment display shows 0, and a skeleton is hoiked along the track at the very bottom, it hits pressure plates along the way to shut off certain segments and turn on other segments to convert the digit from 0 to 1.

Here's the wiring so that you can trace which pressure plate is connected to which segment:

B38950A3E3A0616C800E08F5FA48C433D8D1CA2F


Next, a skeleton is hoiked along the track second from the bottom, and the pressure plates along the way convert the digit from 1 to 2 in the process (again, follow the wires in the diagram to confirm which segments will be turned off and which segments will be turned on in the display).

The other major part of the grid is a mechanism to ensure that the skeletons are sent in sequence along the tracks starting from the bottom track and ending at the top track before looping back down to the bottom. In the diagram this is accomplished by timer cascades, consisting of 10 1-second timers which turn on 2 at a time and send a pulse every second to one of the ten skeleton statues in sequence. However, a different mechanism is used in the 24 hour clock.

Let's take a look:

XcHHYxw.jpg


The tracks now run vertically instead of horizontally in this set-up. A skeleton is teleported in, and is immediately hoiked to the right along the "bottom" hoik. The bottom hoik pushes the skeleton down (but the floor is in the way) and to the right. There is also an up hoik above each bottom hoik, but the bottom hoik always takes precedence. Once a bottom hoik tooth is actuated, the skeleton ends up being hoiked upwards past pressure plates along the track which all get activated. In the picture above a skeleton that teleports in will end up being hoiked upwards in the fifth column.

A "feed-forward" mechanism is used to change tracks:

PNbgTlO.jpg


When a skeleton is hoiked upwards, it moves past a pressure plate that de-actuates the bottom hoik tooth, and actuates the bottom hoik tooth in the adjacent vertical track. This means that when a subsequent skeleton is teleported in, it will end up moving up that adjacent track.

A 1-second timer keeps teleporting skeletons into the hoiktronics grid, so that each digit change to the next successive digit occurs every second.

So that's how individual components function. Then it's a simple matter to connect all the components together - the hoiktronics grid for the ones digit has a pressure plate in the final track so that when activated it causes a skeleton to teleport into the next hoiktronics grid for the tens digit. Thus in the next hoiktronics grid a skeleton teleports in every ten seconds.

There are some other minor details regarding the wiring, but what I described is the most important as far as the logic of the set-up is concerned.

Of course the in-game clock is just the tip of the iceberg when it comes to hoiktronics. Separate tracks that enable and disable certain outputs and timer cascade or feed-forward mechanisms have a wide variety of applications, as we'll demonstrate soon enough.
 
Last edited:
Ah, seems like I was trying to understand the device itself, rather than the separate modules, every line in the digit (7 lines/digit) has a boolean value of true or false, every time a skeleton passes, certain predefined lines have their value inverted, though since it cascades, we can't really jump from certain numbers to others, only if every activation the value'd be reset, then set to the desired one, though that do slow the device by a fair amount.
Agreed, there are still many things to come from the huge machinery known as the Terraria Comunity, for example, the
first thing that I designed using hoiktronics was a checker if all of the conditions (all of the teeth are solid) are fulfilled, something simple, not a huge mega monster who knows how many hours I have wasted looking at a screen.
Q: what it's the easiest way of turning the input from decimal to binary withouth changing the whole device itself? There are ways, but they are 'bulky' and not that friendly at all.
 
Ah, seems like I was trying to understand the device itself, rather than the separate modules, every line in the digit (7 lines/digit) has a boolean value of true or false, every time a skeleton passes, certain predefined lines have their value inverted, though since it cascades, we can't really jump from certain numbers to others, only if every activation the value'd be reset, then set to the desired one, though that do slow the device by a fair amount.

It actually won't be that slow. For instance, if you start with a boolean value of false for every segment in the 7-segment display (or however many segments you want - sky's the limit), and have ten tracks for each of the ten digits, then you can jump from one number to another by sending two signals for every input - one that sends a signal down the track corresponding to the current digit (thus reverting all the values to false), and another signal for a different digit you're trying to switch to.

The trick of course is how to arrange for simultaneous pairs of signals, one "undoing" the previous signal sent, and the other for the new signal. There are various easy and elegant ways of arranging this :).

Q: what it's the easiest way of turning the input from decimal to binary withouth changing the whole device itself? There are ways, but they are 'bulky' and not that friendly at all.

There are some set-ups that have been illustrated in ZeroGravitas' latest video guide:

http://forums.terraria.org/index.ph...hoiktroic-binary-skeleton-counter-video.6464/

His skeleton counter can be very easily hooked up to a binary display in a manner that's illustrated in the bunny counter + binary display by another player in the video. This isn't exactly the conversion you asked about, but it's a way of producing binary displays from the get-go.
 
¹ oh, so synchronizing the 2 modules at it's maximum won't add more than 1 tick delay to the system, the feed forward automated cascade feature it's rendered obsolete,
² Frankly, the most interesting thing for the use of decimal-binar transformer it's the feed forward worm tooth, the simplest representation of a number, I've done research on converting decimal to binary using Minecraft mechanics, how to apply it in Terraria'd be the challenge, a cascade of modules that substract from a number Y, 2^n. n it's the representing module, if Y-2^n has a positive output X, Y=X, Value=True, if not, Y stays the same, Value=false, every activation (value=true/false) n=n-1, we repet the algorithm until we hit 2^-1, as our interest stays only in positive, natural numbers. It's basicaly the reverse of reading binary numbers.
 
Last edited:
I want to learn this but I think I would benefit better being taught this vocally. As my chance of learning by creating and building along side hearing is far better than reading.
 
I want to learn this but I think I would benefit better being taught this vocally. As my chance of learning by creating and building along side hearing is far better than reading.

Unfortunately ZeroGravitas and I don't speak in our videos, so you'll have to try your best by studying the diagrams, reading through our explanations, or even downloading the worlds to see the mechanisms in action. Understanding the 24hr clock begins with understanding a few things about hoiks themselves - when I was learning about them a while ago I heavily relied upon ZeroGravitas' guide and I did a lot of building and experimentation. This is the guide I returned back to time and time again:

http://forums.terraria.org/index.ph...c-etc-transport-using-only-sloped-tiles.1656/

It's also a good idea to try to build some simple hoik systems and watch how players or mobs get hoiked around.

In addition to building knowledge of hoiks, you should take your time reading through my post #7 above since it contains a simpler set-up. That set-up is also in the world I offer for download in my opening post in this thread, so I'd advise checking it out. Once the logic of the simpler set-up is understood, it becomes easier to understand the more complex set-up in the 24hr clock. Of course feel free to ask questions here or in the T-MEC social forums! (link is in my sig).
 
Nice to see wiring being used for more complicated contraptions than automatic door openers.

There used to be a lot more wiring work on the old forums, but then the engineering all but dried up for a long while. With ZeroGravitas' hoiktronics we're going to have a resurgence, and hopefully this 24hr clock is just the tip of the iceberg as far as elaborate contraptions are concerned :).
 
What exactly is hoiktronics......

Hoiktronics is a term coined by ZeroGravitas in his most recent video:

http://forums.terraria.org/index.ph...hoiktroic-binary-skeleton-counter-video.6464/

Hoiktronics refers to the combination of wires and hoiks in signaling pathways. Since jumping from one hoik tooth to another hoik tooth takes exactly 1/60th of a second, signals using mobs/NPCs can be very rapidly propagated. Furthermore, hoiks allow for various logic gates, feed-forward mechanisms etc.
 
What exactly is hoiktronics......
It's a good question, since we can't fully answer that yet. Clearly were're still making it up as we go...
The counter's mode of action is labelled as 'hoiktronic' to communicate the key use of the 'hoik' glitch (with sloped blocks) to control the movement of NPCs so rapidly and precisely that they become almost like electrons, facilitating rapid digital mechanisms. The maximum frequency of operation of the hoiktronic components is 60 times per second, in line with the games frame rate.
 
Back
Top Bottom