Last Updated: 2015-08-19. Questions/suggestions will help flush out this guide. Recommended reading first: 2015-08-19. Questions/suggestions will help flush out this guide.Recommended reading first: Hoik Guide

+ Introduction:



1 player, 10 skeletons max, 21 'town' NPCs, (and up to 15 snow zombies, if you're clever!)

​

+ Type 1 Hoiktronics - Captive Actors :

Type 1 Hoiktronic counter runs at up to 60Hz. ​

+ Type 2 Hoiktronics - Travelling Actors:

A horizontal binary counter, like one shown above, can count to the age of the universe

by using a 1s timer as input and being extended to the width of a 1920p screen.

​

+ Type 3 Hoiktronics - Discrete Components:

+ Hoiktronic Computing:



​

+ Issues:

+ 1.3 Update Changes ( 2015-07-30 ):

There is one more NPC available now (the Tax Collector

NPC behaviour has also been slightly modified, @DicemanX says this has broken parts of many of his hoiktronics builds, which will need tweaking.



Mob behaviour looks largely unaffected, so far.



Hoik physics itself seems otherwise unchanged. (However, trap timings have been tweaked, which may affect related builds.)

Target Dummies look set to revolutionise hoiktronics since their 'ghosts' can drop or be teleported away from the fixed standing position of their sprite! It appears this will add an additional 100 very well behaved size 3 (player/skeleton sized) actors.

@z26 here in T-MEC.

+ Relevant Links:

Terraria wiring is different to that in real life (and Minecraft). It is activation based, rather than relying on a steady voltage state or continuously applied on/off indicator. These activation events only come from the following: pressure plates, timers (1, 3 or 5 second, after they've been turned on) or switches/levers clicked by a player. These 'switches' are more like buttons really, since they only send an instantaneous pulse, as do plates. There are no other input devices or sensors (as of 1.2.4.1). So making wire devices change what they're doing requires either a player, friendly NPC, statue mob or 'wild' spawned monster to hit a button. I'll call these characters '' for want of a better umbrella term, since they triggerivations.Plates send only a single activation when hit by an 'actor', then nothing more until their body has cleared the plate (and then overlapped it again). Actors are only allowed to trigger 1 plate at a time and plates have to be at least 1 tile apart, so this puts a cap on how fast wiring devices can do stuff: the top speed of the actor involved. A former wiring staple, bird engines, top out at ~10.6 activations per second, in line with the bird's top speed in tiles/s. (Up to 37acts/s possible from some mobs via a rainstick configuration.)But straight line speed isn't all that interesting in it's possible uses. The path of mobs has to be diverted sometimes in order to make true switches (transistor equivalents) for logic operations. This can, and has, been done with birds, for example. But even birds are clumsy and somewhat unpredictable (although deterministic) in navigating bends. This means that there is a greater need for statues, whereas mobs from a single statue can be distributed around a device far more quickly with hoiktronics.' is intended to communicate the key use of the 'hoik' glitch (with sloped blocks) to control the movement of NPCsandthat they become somewhat like big, fat electrons, facilitating rapid digital mechanisms. In even the best designed bird reset towers it take several seconds for a bird to blunder through all the motions, while a reset line (of about the same size and number of resets) takes 16 ticks or less (~1/4 of a second). Similarly, while PowerCosmic's bird powered lookup table for scoreboard display is very efficient, it still takes about 1 second to update, where as the hoiktronic equivalent is done almost too fast to see the change ripple through the segments (8-18ticks total).Skeletons are the tallest statue mob, so are best for use in hoiks. This is because the verticalhorizontal jump distance of the hoik glitch is determined by height category of the sprite colliding with the sloped blocks. The height also allows space to insert pressure plates into each hoik step, between, below, or above hoik teeth (depending on hoik type). Happily, skeletons have the same dimensions as players and town NPCs, which is convenient because the same hoiktronic designs will work with any of these. So player can test the design themselves, before letting the little monsters loose all over the place.Note: multiple actors can activate the same plate within the same tick. But each actor is limited to triggering a single plate per tick (leftmost and topmost plate gets priority, in lieu of a simultaneous triggering). This issue is only now relevant due to the speed of hoiks.This new wiring paradigm can arguably be divided into further subtypes as follows:are held in the hoiktronic logic device, waiting for input. This allows it to respond immediately (same tick) to any input signal. The flip-flops in my first hoiktronic counter operate at up to 60 times per second, i.e. changing state once per game tick. This is effectively a ' synchronous ' device, and perhaps the closest you can get to conventional electronics logic in Terraria, since input signals are updated to output every tick.Only the flip-flop has been implemented in game, but other types of logic should be possible using a similar setup. Thesetake 2 ticks, or a little longer to update, at worst. Getting skeletons or NPCs into position can be pretty tricky, so initialisation sequences can be an issue. However the biggest flaw in this approach is that the number of logic devices is limited to the number of actors available in a world simultaneously (max 10 skeletons + max 24 NPCs). So it would be impractical to build computers on this basis.are sent down hoik lines to update logic one step at a time, asynchronously. Actors behave like marbles or billiard balls rolling through a Digi-Comp mechanical computer, tipping levers this way or that, their path shaped by barriers. They are the read/write head. Unlike type 1, this paradigm is far more easily extendible, at only the cost of latency , as a longer run will increase the time it takes to complete a full iteration of logic updates, etc.In many circumstance one can also simply throw in more actors to move matters along quicker. For example, the linear counters in this video tour of my lab can have several skeletons rippling down their length simultaneously, provided they aren't so close they overlap (interfering with each other directly). Separate hoiktronic components could also be run in parallel, providedis taken with timing when interfacing them together.Extending these devices too far can hit other practical limits of the game: skeletons will spontaneously de-spawn within ~12 seconds when they go off screen (1920p resolution), instantly under certain conditions. At night, off-screen NPCs will immediately teleport to a home too, unless their home is visible. Players are the most reliable of actors, since they only despawn on death and don't (necessarily) try to move around on their own (falling out of alignment for down-hoiks, for example).A particularly useful feature, of horizontal hoiks, is that the exact vertical position of an actor during a step depends on whether the previous step had a top (against ceiling), or a bottom (against floor) hoik tooth.This distinction is just enough to make the difference between hitting a pressure plate or clearing it on the next step (diagram below, left). This allows for an unbroken hoik run, of a fixed number of steps, when a series of logic levels are reset (or set). DicemanX's reset mechanism (below right) with the same run time regardless of number of resets required. My more compact reset line (see top of post) is half the size, but more complex with variable execution time, due to optional waist height bottom hoik steps (and only works right to left). This feature has many other potential uses...hoiktronic logic can be packaged up into self contained units, with only wires connecting between (see below). This is more like the old bird powered logic and is limited by the 0.5s input cooldown on spawning statues. To overcome this you could simply chain these discrete devices together with teleporters, output to next input. However, this would then be more of a convoluted type 2 hoikronics, with instantaneously fast, wired teleporter routes replacing hoik connection lines. The extra wiring for the teleporter interlinks may prove prohibitive in (parts of) complex builds, and could lead to extra failure modes, with actors being accidentally back-teleported when multiple actors are in use.Teleporters can be used to instantly mount a spawned skeleton onton a hoik, without having to wait for them to clear the statue on foot. Teleporters are also particularly useful for exit points that would be difficult to install within a complex mechanism using hoik-only routing (since we're stuck in 2 dimensions here). DicemanX's expandable computer is a good example of this, with many teleporters all linked up to the same exit, to clear skeletons out when they're finished with. It's also a execution of a relatively powerful design for doing mathematical operations on binary numbers.By representing binary number stings using the actuated states of hoik teeth, we have started to make rudimentary contraptions that can perform simple mathematical operations on these numbers: addition, multiplication (currently via repeated addition), subtraction (via complement and addition), division (via repeated subtraction), etc. These are the basics of computation. There's still a long way to go to make a more general purpose (programmable) computer. It's unclear how far we will be able to extend this technique, given various issues (particularly de-spawning), but there's a lot of things left to invent and uses to put existing developments to.- skeletons and NPCs seem to behave entirely correctly, although they may fail to render for long lengths of hoik, so machines may seem to be working by entirely invisible magic. Players do not work correctly in devices like the counters shown in the type 2 hoiktronics video. Wiring events seem to take several ticks to get updated, while block collisions continue to update, hence player will not be diverted correctly by instantaneous actuation of blocks. Alternative server software has not been tested.- are generally problematic, because they are sensitive to the actor's precise horizontal positioning (must be right up against the thick side of the sloped teeth). Players can easily fall out after walking into a down mount, and lengths over 6-7 consecutive steps are unsuitable for use with skeletons and NPCs are their continual movement will cause them to get jammed.