1. Encountering issues with the Localization/Translations with 1.3.5? Please report them via the section linked below so that we can account for all of them and have them addressed. Thanks! Localization Bugs & Issues Section
  2. We have hub threads for known bugs/issues and statuses of fixes for Mobile, 3DS, and Console platforms (UPDATED):
    Click here for Mobile
    Click here for 3DS
    Click here for PS3/PS4/PS Vita/XBox 360/XBox One

Fastest Engines - Measured with Hoiktronic Binary Skeleton Counter [Video]

Discussion in 'Terraria Guides' started by ZeroGravitas, Dec 4, 2014.

  1. ZeroGravitas

    ZeroGravitas The Destroyer

    [Updated 2015-08-12] Related Guides: Hoiks | Item Hoiks | Hoiktonics (what is it?) | Rapid Fire Dart Traps [​IMG]

    The video is a self-contained guide to an ultra-low latency, 7-bit binary counter. The principles of it's logic operation are explored fairly thoroughly in the video, so will not be re-explained here. This written guide focuses mainly on the engines that were tested and adds a few new ones too!​
    00:00 - Introduction
    00:43 - Binary Bunny Counter - Артём Мелик-Шахназаров
    01:41 - Hoik powered flip-flop tutorial
    03:00 - Hoiktronic 128bit skeleton counter introduction
    04:36 - Minecart Engines (1-4 plates)
    05:41 - Bird Engines (2-8 plates, 1-3birds)
    07:58 - Teleporter Engine (Standard type) - Manbeartroll
    09:41 - Teleporter-Hoik Hybrid (Horizontal Type) - MeoWish
    10:39 - Teleporter-Hoik Hybrid (Vertical) - Ultimate!
    11:47 - Explanation of maximum plate activation rate
    12:29 - Hoik Engine (player powered)
    13:43 - Hoik House Engine (mechanic powered)
    14:34 - Credits, Acknowledgements and Bloopers
    + Video Clips Used (in order of appearance):
    Popuptwo - "Minecart Basics + Compact Vertical Rails (Fastest Clock in the game?)"
    Yrimir - "Birdstatue Engine and Twitter Announce"
    ManBearTroll - "Terraria 1.2 Teleporter Engine"
    Meo Wish - "Guide Engine"
    Артём Мелик-Шахназаров - "Terraria binary counter/timer extender/display.
    + Reference:
    Teleporter float glitch by Buck (TO forum).

    + Credits:
    All footage shot in Terraria for PC.
    No mods or 3rd party content!
    Game IP belongs to Re-Logic.
    Music from Terraria Soundtrack Volumes 1 & 2
    by Scott Lloyd Shelly (Resonance array):
    Video captured with Fraps, edited in trakAxPC.​
    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. This is because block collisions are only checked once each frame (or 'tick'). In-game wiring activations may change the state of actuated blocks (and lights) multiple times within one tick, but the meaning of this is ambiguous since it can not be seen. Only the end result is rendered to screen: whether an odd or even number of activations have happened in that time. (Note - the exception is teleporter systems, which can move characters multiple times in under 1 frame. But again, only the end result is observed, and no collisions or impacts can take place until these wiring actions have concluded.)
    Hoiktronic Counter & Engines1c.png
    Hoiktronic Counter & Engines1(wiring).png
    Note - the skeleton teleporter loader is set up to be over 38 tiles (horizontal distance) from the skeletons in the counter to avoid them blocking statue spawn.
    The outputs from all the engines shown in the video (and the diagram above) are wired with a single colour, since it is purely demonstrating the fastest possible number of activations in each case. This is somewhat like a drag race, only showing the raw number of activations per second, but not in a useful context. For example, to max out statue activations, one needs to use at least 2 different wire colours (for all 6 inputs), and using all 3 (red green and blue) is generally far easier. The mob proximity spawn limits on statues means that these 6 input activations must generally be split up (staggered) into no more than 3 at a time. To ace this application you would need engines with at least 2 pressure plates.


    Compact Crab Engine - just for reference, before we look at the fancy new engines in the video (and others beyond), here's a simple one that runs off the old mechanism of crabs jumping up and down when they're in a confined space (ceiling only 2 tiles high). This update to the classic design uses a 'ghost wall' glitch to let the crabs enter the pressure plate chamber (but not back out) - slope inactive blocks against a wall. Loaded crab jump at a very regular 6 times per second, with additional crabs adding an extra 6 act/s to the output (provided they don't happen to jump at exactly the same time). A more complex design would be needed for more than 3 output wires.​
    Compact Crab Engine1.png
    1.3 Note - see minor redesign, below.

    Hoik Engine - (in video and diagram above) the player walks in from the left, through the blocks (thanks to the sloped platforms and the 'ghost wall' glitch). The downwards slopes then bounce the player's sprite (and the screen view) back and forth at 60 times per second. The plates are activated alternatively at 30 times per second, staggered by 1 tick from each other.

    Square blocks above the 'teeth' (as in figure B, below) are there purely to keep the player from 'stepping up' onto the top of the teeth blocks, when not holding the {down} key. Bizarrely, the blocks need not be solid; inactive blocks work just as well. The pressure plates can not be on the ground, adjacent to each other, if you want to have 2 outputs on the same coloured wire, one from each plate. Since adjacent wired tiles connect, 3 unique outputs would be the maximum (3 colours). So for the full 6 outputs (2 sets of all 3 colours) possition one, of both, plate(s) onto the top of the adjacent (blue) column. Players activate these plates at head height just fine.

    All possible player powered hoik engines (below): A - player walks in from right and holds {down} to run engine. B - same as A but no need to hold down (use grapple or teleport to exit). C - as with B but only 1 tile gap between hoik teeth, space under them for plates. D - dud design, no space for plates (in the middle does not work because player overlaps it in both positions. E - actuating a tooth is easiest (but not essential) for entering these top hoik engines. F - as with E but with enclosure for skeleton (will only operate while on screen) or NPC via king/queen statue (will only continue to operate off screen during the day). Note - only E and F are currently console compatible, using only up-sloped blocks.

    2 Step Hoik Engines.png

    House Hoik Engine - this is a variant on the plain hoik engine (above). It has been carefully designed to function as valid housing for a friendly NPC. The idea being that the engine can run continuously, day and night, even while you are across the map. It even continues between save and re-load!

    The lever inside actuates the loading/unloading teeth. They should be set to active (i.e. solid) when allocating an NPC to the house and when engine is not in use. If the NPC's housing banner shows below the loading teeth they may fall through the floor or just fail to teleport home. NPCs will teleport in immediate during night time hours (7:30pm-4:30am) when they and the housing are off screen (HD resolution). If this does not work, try hammering the tooth directly below their banner into a square block (shown in diagram below, right, as a red block). Hammer it back once they are in.

    There are a lot of idiosyncrasies to valid housing and NPC location. For example, inactive blocks are fine, counting towards open space, but the banner for re-locating the NPC into the house will sit below these blocks, even if they are at floor level. Because of this, various loading teeth designs, involving top hoiks (against the ceiling), had to be scrapped. Slightly different designs also had the problem of the NPC teleporting back to their square block in the middle of the room at night, stopping the engine. This design seems finely balanced between those this and being valid: once the NPC is in they are happy enough not to find new accommodation, but they have nowhere safe to stand at night inside the house, because of the sloped block under their standing spot.

    I also found that a single platform inside a completely sealed box is sufficient to count as a 'door', which is handy.

    The engine teeth in this design were deliberately chosen so that pressure plates could be placed below with 1 tile between them, isolating their wiring from each other. 6 outputs (on 2 sets of the 3 colours of wire) are therefore possible. Like the plain hoik engine, each plate is activated 30 times per second, on alternating ticks between the two plates. Provided you can get them in and stay put (I don't trust the game to be wholly reliable, it should run day and night, where ever you are and resume when you re-enter world. This has not been tested in multi-play yet.

    For those playing on console, you have the consolation prize of a semi-function hoik house engine (below left). Because the NPC will stand immobile in the middle of the room all night, it can only really be loaded during the day (and with a bit of fiddling). As I said about, the NPC will also teleport out of the hoik at night, if they are off screen. So this design is only more useful than using a king/queen statue because it lets you specify an NPC and have them always handy.
    Alternative House Engines2.png

    Teleporter Engine (Standard) - i.e. 'conventional', as per ManBearTroll's teleporter engine (on the Terraria Online forums), but simplified down to a single pair of pads, with a single drop. This was perfectly adequate to get an accurate speed measurement for a single skeleton in flight. But the dual drop, cross-linked, original design has the advantage of spreading the 12act/s out between 2 pressure plates, allowing for 6 outputs. The top pad, in the diagram shown, has been suspended in mid air via the teleporter float glitch. The engine's skeletons can get stuck on top of a supporting platform when the player is standing above that height, but only at night (a change in the mob's AI). Also applies to crabs.

    Teleporter Hoik Hybrid (Guide Engine) - i.e. 'horizontal, as designed and demonstrated by MeoWish. This functions like a faster, sideways version of the regular teleporter engine, using a 'bottom hoik' to push the skeleton, player or other NPC across to the second pad and hit the plate there. Again, multiple pairs of plates can be included, and cross-wired, to share the activation rate between multiple plates, for a greater number of separate outputs. The timing of this engine is syncopated: it activates every 1, then 2, then 1, then 2 ticks. The character's sprite alternately lands on the middle tooth (of 3), taking a single 2 tile jump to the left (hitting the plate and teleporting), and then lands on the right hand tooth, jumping (2 tiles left) to the left hand tooth, before jumping a second time onto the pressure plate (and repeating the cycle, ad nauseum). I'm not sure if this irregular pattern can be of any particular use, but it averages out at exactly 40 activations per second.

    Optimal Teleporter-Hoik Hybrid Engines copy.png
    This 'optimal' redesign of a horizontal teleporter/hoik hybrid provides 2 pressure plate outputs, both running at 30 activations per second. This makes it fully equivalent to the hoik engines, while using only 2 active teleporter pads. Note the 3rd example requires a 3rd pad to load the skeleton effectively because it uses a top hoik instead. This is to make it console compatible, since some gaming platforms don't yet have downward sloped blocks. The design repeatedly teleports the skeleton, NPC or player into the middle, where the teeth then push them one tile outwards either side, alternating sides.

    Like all teleporter engines, the output wires which are also connected to the engine's teleporters (mid diagram = red on right bunch and blue on left bunch) can not be connected to other teleporters! The captive character will be teleported out if so. Note also that while the design is fast, one or two of these engines running simultaneously my cause major frame-rate problems (possibly due to the number of teleportation animations, with their particle effects, as some do no even render).​
    Teleporter Hoik Hybrid (Ultimate) - i.e. vertical. Teleporter pads can be hammered! They can be made into hoik teeth directly! (What where they thinking?!) The bigger, 3 tile jump that is possible when hoiking a player sized sprite vertically allows a single hoiks step every time, with this teleporter engine. This achieves the ultimate activation rate for a single sprite, since the plate collision detection code appears to only allow one plate to be activated, ignoring all other that are hit that game tick. The only way to go faster would be to add more characters to an engine (but not this engine, it wouldn't help). Because the game's implements the effects of a wire activation immediately (including teleportations), the skeleton (or other character) in the engine appears to spend the entire time in the lower section (waiting for the block collision detection to come around again). This means a flame, or other trap can do no damage to them up top, since they don't spend long enough there! Adding a second pair of pads and cross-wiring their destination pads is again possible for splitting the output activation rate between more wires.

    Minecart Engines - very simple. Just lay pressure plate track sections next to each other, with one regular piece of track at each end to hammer into bouncing bumpers. Right click to grapple into cart mode, then hold either right or left direction to build up speed. Apparently turning around at one, or both ends takes longer that moving from one plate tract to the next (when at full speed of 48tiles/s). This is shown in the fact that the shorter, smaller, minecart engines have fewer activations per second than the longer ones. Although the sound effects from hitting the bumpers make it sound and look pretty furious, the single plate engine has only ~32act/s, while the 4 consecutive plate engine reaches ~43act/s. There is a diminishing return for each section of plate track added, however; the graph of activation rate verses length of track is asymptotic, approaching (but never reaching) 48act/s (in line with the minecart's top speed). Note that, in practice a length of 48 tiles will reach this for a measured period of 1s.

    Bird Engines - just like the minecarts (above), turnaround time is lost time for birds - they can only trigger a plate when moving from one plate to anther. So longer plate-runs work out at higher act/s. Birds only fly at ~10.6 tiles/s though, so a single bird will top out at this rate (10.6 act/s), regardless of track length. Unlike with minecarts, however, it's easy to spawn multiple birds. Up to 3 in this compact design, but the maximum of 10 (in an entire world) is possible by simply adding a long chimney between the statue and the plate run (putting over 37.5 tiles between them).

    Bird Engine Speeds Graph1b (re-graph).png
    The bird engine is easy to start and stop too, with a single dart (you monster!). The major flaw is that there is a high chance that birds will happen to 'synchronise' their plate activations, so that they keep hitting within the same game tick. For most applications this is not helpful. In the worst case, of two birds occupying exactly the same space, it is like the second bird does not exist. For this reason there is no definitive speed results for each number of birds (above 1). But, in theory, it is easily possible that an engine (about 3 or more plates long), loaded with 10 birds could reach 60act/s, and over. Up to a maximum of ~ 10.6 x 10 = 106act/s, under perfect circumstances, with a very long track.


    Rainstick Engines - why are all other engines so damn horizontal?! This new vertical concept takes advantage of the ability of crabs, skeletons (and bats) to ignore platforms when they want to drop down (towards player height). By interleaving the platform (and pressure plate) heights, each tile dropped activates a plate (note: no activations on the way up). So tiles/s down = activations/s in this engine. I think the faster models look and sound a little like a rainsticks when in operation, hence the imaginative name! You could then refer to the plate platforms as 'spines' too...​
    Rainstick Engines1c(trans).png
    Stumps - are designed to be 7 spines in length since that's the max height crabs and skeletons will jump to from the bottom. This engine doesn't run entirely regularly, since the mobs are jumping up and down repeatedly, but slight pauses in activations might be handy for certain applications. The actuated block at the bottom is left solid while running (then actuated to stop the engine by dropping all mobs in the lava). The number of mobs (and hence the speed) is selected manually by the player (by clicking 1 to 3 in). If you choose to make this setup auto-re-loading, by connecting the plates to the mob statue too (e.g. green wire), output from an 8th (or lower) spine will keep the engine running in a continuous loop, like a...

    Repeater - must be 8 or more spines tall (to re-activate the statue input after 0.5s cool-down). 16 spines seems to be a sweet-spot, since with this height the next mob will start hitting plates just as the one before it goes 'squish' at the bottom (so a continuous output stream of pulses). You could make it longer though. Bear in mind with all of these engines that the player needs to stand at the bottom (or below) to get the mobs to drop all the way down reliably. Also note that if using skeletons in an automatically repeating engine, like this, they take a couple of hits to die by lava, so will jump back onto the bottom spines. To stop this you could build a little recess at the bottom, so they walk in (towards player) and get their heads jammed under a ceiling.

    Spear Trap Batteries - Not technically what I'd call a "fastest engine", but while I'm talking about similar designs... Players seem to jump down exactly 6 consecutive platforms per second (regardless of wearing wings, etc). And bats appear to match this rate exactly too (giving a second, automatic option). This would equate to an ideal 6 hits per second, by staggering the firing of connected traps.
    • Overkill: Given a 2s cooldown on spear traps, this would require 12 traps, for a continuous succession of hits. But when spear traps are configured in a vertical column, the travel delay from the top of the stack to the bottom creates a gap in the sequence that needs to be filled with an additional 2 firings. So 14 traps/timers/spines in total, in practice. Which equates to more hits per second than is possible, due to monster's damage cool-downs from piecing attacks.
    • Stingy: removing half the plates (and 1s timers) also allows you to get away with the gap in the firing pattern (by compressing the stack of traps). The half of optimal hit rate (from 3 activations/s) can also be improved by having the monster(s) below on a platform. This way the spear tips hit once when passing down and a second time on the way back up. If the gap below them (and the platform) is just right, the maximum 6 hit/s might in-fact be achieved! Unfortunately, monsters in the 'wild' rarely stay very still, so a staggered distribution of spear traps might be better in covering a kill zone (especially as these traps are hard to come by).
    Continuous Drop - Impractical, but interesting. This setup is how I determined the 37 tiles/s fall rate for the mobs (which is the same for all mobs, in air, and player, without wings items). All mobs reach this terminal velocity quickly (in under 1 second). Even more interestingly, I found the drop speed of boulders to be over 60 tiles/s (61.1tile/s, to be precise)! This means that they sometimes failed to activate an engine plate (every 54th one) since it would have been the second plate hit in a single tick (and that's not allowed by the game). This put a spanner in my "boulder powered, sequential, block de-actuating, pull-down lift" (in a bad way)... It's fairly useless as an engine since it is one-shot only. But interesting that this 60 activation/s (maximum possible rate) design should have been possible since Terraria version 1.0!

    More Engines - By all means drop me requests to test a specific engine if you have a favourite in mind (attach a screen-shot, preferably). This guide was looking mostly at raw speed and less at actual utilisation, which may be more of a focus in future guides/videos. Much more on 'hoiktronics' to follow too!
    1.3 Update Notes:
    • Hoik physics was unaffected, counter mechanism still works fine.
    • Crab AI was modified, slowing jump rate from 6 to 5 times per second. The 2 tile high ceiling in engine also now too high to initiate continuous jumping - added 2 platforms to rectify this.
    Compact Crab, Modified.png
    • Skeletons now de-spawn immediately during the day at surface level when off-screen.
    • Pressure plates can now be placed atop any flat, solid block surface, including on to of upside down slope. Some more compact hoik engine designs now possible.
    • Target Dummies can be used in hoik engines! Their invisible 'ghost' NPC essence (that displays damage figures) can be separated from their visible sprite via teleportation or 'floating' the dummy in the air (using the teleporter pad float trick). 'Ghost dummies' are perfectly behaved, staying entirely still and not de-spawning unless you exit the world or die. There can be only 100 ghosts per world, regardless of the number of dummies placed down. Their possibilities were uncovered in this T-MEC thread by @Thiner.
    index_php.jpg 60 acts/s engine using foot-height hoik (lever for stop/start).
    30act_s dummy.png 30 acts/s engine (narrower) using waist height (credit: DicemanX) . Add second plate under other sloped tooth for 60acts/s.
    Last edited: Aug 12, 2015
  2. bisslit

    bisslit Skeletron Prime

    You're the smartest person I've ever seen!!
    Praise ZeroGravitas!!

    PD: Really good post/video, i just knew the bird engine. I never thought about the others o_O
  3. DicemanX

    DicemanX Brain of Cthulhu

    Very good write-up, and I really like the summary pic! The idea of hoiktronics is particularly inspired, and will revolutionize how we approach building a wide variety of contraptions. I'm certainly looking forward to doing more work with wires and hoiks!
    ZeroGravitas likes this.
  4. ZemmySix

    ZemmySix Retinazer

    Great guide! I always prefer explanations to videos so that makes it even better. One question: are there any engines you can't use due to them being too fast?
  5. ZeroGravitas

    ZeroGravitas The Destroyer

    Well, if you have an engine were there are 2 mobs in sync (for example) they will be hitting each pressure plate twice, so this will turn some things (like actuated blocks and lights) on and off in the same tick, which means nothing actually changes.

    Also, with triggering mob statues speed isn't everything either, since you want to avoid accidentally triggering an input cool down while spawning is blocked by the previous (three) monsters still being at the statue. But this is more of an issue of application...
  6. DicemanX

    DicemanX Brain of Cthulhu

    The guide has gotten even better with the added engines. Very nice work! This will be quite useful going forward.

    I modified the house engine slightly in one of the farms:


    The modification is designed to eject the NPC from above the pressure plate area to the right, so that you no longer have to wait in the daytime for the NPC to saunter over to the right where the actuated teeth are. I haven't had any trouble with the NPC disappearing from the house in the day to night transitions.
    ZeroGravitas likes this.
  7. Edzandor

    Edzandor Terrarian

    I feel dumb, but how come my spear traps always hit into the trap below in a vertical column?
  8. DicemanX

    DicemanX Brain of Cthulhu

    Make sure to actuate all your spear traps first, and once they are in the background, remove the actuators. Traps can still fire even if they are in the background.
    Edzandor and ZeroGravitas like this.
  9. Edzandor

    Edzandor Terrarian

    Wow, thank you so much. I spent hours on a farm only to find out that my bottom spears were the only ones to fire.
    ZeroGravitas likes this.
  10. N3rDZ

    N3rDZ Skeletron Prime

    So I've been testing out the hoiks for xbox 360 and idk whats going wrong when I or a NPC enter the setup it works and gives off the expect acts/s but when i attempt it with a statue the mobs dont activate the pressure plates also the teleport engines dont exactly run correctly they tend to stop on their own idk if it has anything to do with the newest update or what but i have duplicated what u have posted exactly and nothing maybe someone else can verify if its just me or if it is console based issue...also i am so grateful for this thread and all the work you and diceman have done i have been compiling many things both of you have done into one map and hope to upload it asap. Sorry for the run on sentence
    Last edited: Feb 28, 2015
  11. ZeroGravitas

    ZeroGravitas The Destroyer

    Would I be right in assuming that you've fallen into the common trap of not realising that the different colours of pressure plate are now specific to different types of creature/character? (Need red, green or yellow for skeletons, etc.)
    Is this the console compatible teleporter-hoik hybrid engines (obviously the one with downwards slopes are PC only)? Or the regular drop kind of TP engine? When the latter has the top pad sat on a platform, the skeletons will stop dropping through at night (specifically) if the player is standing above the height of the platform.
    Sounds great! Is that also on Xbox 360? (You can upload and share maps on from/for the console?)
  12. N3rDZ

    N3rDZ Skeletron Prime

    I believe i used red but i could be wrong Ik i was using brown and grey for the NPC/player hoik. I will check in a couple mins after my kid falls asleep.
    Yes it is the console compatible ones but i may have used the wrong plates. But will try the top drop one if all else fails.
    My most prized (and oldest most frequented maps) are on a flsh drive so all i have to do is move them to my poopy laptop transfer over to the tablet which i am currently using and bam! Lolz this also explains why i cant quote my tablet is annoyingly sensitive and finicky.
    --- Double Post Merged, Mar 1, 2015 ---
    Just checked i was using brown plates ~:/ . So now i will retry the hybrid again armed with the knowledge you have ordained me with.
    Last edited: Mar 1, 2015
    ZeroGravitas likes this.
  13. N3rDZ

    N3rDZ Skeletron Prime

    It was the plates i was using...should have paid a lil more attention when buying them...sorry for the triple post...im just glad its my error...which means next project
  14. Henrixen51

    Henrixen51 Skeletron Prime

    Ive see Hero`s jellyfish necklace farm.
    With the player friendly engine (B) will it be more effective?
  15. ZeroGravitas

    ZeroGravitas The Destroyer

    Sorry for lack of reply. Not sure what engine design you were referring to, but that rail based jellyfish necklace farm was already close to perfectly optimised, with little improvement possible. The game has now changed entirely in 1.3, of course, since statues can only have 1 input now (instead of 6).
    --- Double Post Merged, Aug 11, 2015, Original Post Date: Aug 11, 2015 ---

    Guide Change Log:
    • Added new linked "Contents" list at top.
    • A note about getting NPCs reliably into (alternatively designed) house hoik engines.
    • And some notes on the relevant changes wrought by the recent major game update.
  16. blacklight1212

    blacklight1212 Terrarian

    Hi! I'm new here, and I checked the last hoik system (dummy targets) works flawless, I'm using to activate some functional statues and the horseman's blade to farm the moon lord (yes, DicemanX horseman farm), is great!
    Thanks guys, really appreciated :happy:
    ZeroGravitas likes this.
  17. xanderhunter

    xanderhunter Terrarian

    Need some help, I'm having a bit of a problem fighting plantera on expert mode, so I've decided to make a heart generator of some sort, and I was wondering if I should use a mob kill or just a normal heart statue, also which engine and mob statue would be preferred if that is the best option.
  18. Strifin

    Strifin Eye of Cthulhu

    Oi, I dont think Im smart enough for this, next page.
  19. Viviww

    Viviww Terrarian

    Does this work on mobile? I want to make several farms with hoiking but don't want to waste hours on something that doesn't work.