The Terraria “velocity multiplier” that does so much more

If you look up Velocity on the Terraria wiki,  you’ll find a section on this: extraUpdates.  Now, what this section basically says  is that extraUpdates acts as a kind of   “velocity multiplier”. If a projectile  is fired at 6 velocity, then giving  

It one extraUpdate will make it fire at 12  velocity. Every extraUpdate simply multiplies   the total base velocity – pretty simple. And yes, extraUpdates does do that. It does   multiply velocity in the way that it’s described,  and frankly, that’s all you need to know. 

The only time normal Terrarians actually need to  care for extraUpdates is with the Magic Quiver,   which doubles projectile velocity when using  arrows that don’t have a velocity multiplier. So,   when using the Magic Quiver, you need to  be aware of which arrows have extraUpdates  

And which don’t, but otherwise, it’s  a completely hidden facet of the game.  However, I am not a normal Terrarian. I’m an  unhelpable nerd. If you look beyond the surface   game, than you find that extraUpdates has a lot  more effects than just multiplying velocity – and  

That’s what I’m talking about today. So, what is an extraUpdate? Well,   it’s in the name – extra update. Every tick (or 1/60th of a second),   projectiles in Terraria update. This means  moving forward, dealing damage, disappearing,   transforming – whatever is in their AI.  Extra updates just mean that projectile  

Updates extra times. One extra update means  it’ll update twice per tick instead of once;   two extra updates means three per tick, and so on. By the way, this is why it acts as a velocity   multiplier. If you update twice in a tick, you  move twice per tick, and thus move twice the  

Distance per tick. We observe this as a doubling  of speed, since the tickrate is always constant.  So, knowing that, why would we ever use  extraUpdates? Why can’t we just simply   increase the projectile’s velocity instead of  using some dank multiplier? Well, granularity. 

Take, for instance, the High Velocity Bullet.  It has a velocity multiplier of x8, which is   the second highest in the game – only behind the  Shadowbeam Staff, which we’ll talk about later.  When fired from, say, an S.D.M.G., the High  Velocity Bullet fires at an effective velocity  

Of 128, or 8 blocks/tick. Ludicrously fast. But, if we have the High Velocity bullet   move at 128 velocity without extra updates, then  it’ll be here in one tick and eight blocks that   way in the next. Anything in between just gets  skipped over. It’s like the bullet teleported  

Through it, since it’s moving so fast. Instead, if we have 7 extraUpdates,   it only moves a single block per update, so  things in between still have the opportunity   to be hit. This allows us to move our projectile  more continuously without sacrificing the final   speed of the projectile, because  remember, Terraria is discrete. 

Another application of this is in the  Shadowbeam Staff. If you didn’t know,   the Shadowbeam Staff is actually just a single  hyperfast tracer bouncing around, like this. This   tracer bounces around and creates the beam path. This tracer travels so fast that its journey is  

Nearly unnoticeable – completing its  path in under 0.05 seconds – and the   dust it leaves behind is what forms the  “beam” that you and I normally recognize.  This bouncing tracer could only work with  the granularity of extraUpdates. After all,  

The tracer travels 38 blocks in a single tick –  without extraUpdates, the beam would look like   this. If it could only update its position three  times, there’s no way it could bounce at all,   and it would basically teleport through the world. So, Re-Logic gave the Shadowbeam Staff a  

Relatively low velocity of 6, but 100 extraUpdates  – so it updates 101 times per tick. Traveling just   three-eighths of a block per update, it actually  has enough granularity to bounce like a normal,   slower projectile would, and thus, is able  to create the bouncing beam we all recognize.  

Cases like this show that, sometimes,  even 1/60th of a second is too long,   and we need 1/6000th of a second to work better. Besides velocity though, extraUpdates also has   two other effects – damage and immunity frames. After all, updating a projectile twice doesn’t  

Just mean updating position twice,  but running its code twice as well.  For damage, this means that  contrary to popular belief,   you can attack things multiple times in one tick. For example, here’s a bullet I’ve modded to have   zero velocity and 199 extraUpdates. This bullet  alone can and will deal 12,000 ticks of damage  

Per second. Yes, this is an actual thing  that is possible from a single projectile.  As far as I can tell though, the only time this  damage thing has actually made it into the base   game was with the CelebrationMk2 in 1.4.3.6.  This is because normally, immunity frames  

Mean that projectiles can’t hit the same enemy  more than once per X updates, but in this case,   the devs made a little bit of mistake. Re-Logic accidentally fatfingered the Red   Rockets’ immunity frame code, so they had  0 immunity frames instead of 10 like the  

Other rockets. With no immunity frames to block  attacks, and 2 extraUpdates, these red rockets   could effectively hit a target 3 times per tick. Obviously, this led to some balanced engagements.  Fortunately or unfortunately,  this was fixed in 1.4.4.  Speaking of immunity frames, extraUpdates affects  that too. It turns out that local immunity counts  

Down per update, not per projectile. This  means that projectiles with extraUpdates   have shorter immunity than you might think. An example of this is the Zenith. It has 15   local immunity frames, so a single Zenith sword  instance shouldn’t be able to hit the same target  

More than 4 times per second. However, since the  Zenith has one extraUpdate, the period of immunity   is actually 7.5 ticks instead of 15 ticks,  meaning that Zenith sword instance can actually   hit a single target up to 8 times per second.  Double rate countdown, half the immunity frames. 

Now, in this case with the Zenith, it’s likely  that this was intentional, so no worries here.   However, if you’re reading Terraria’s code  for understanding or looking to make a mod,   you should really understand extraUpdates’ effect  on immunity frames. Half the immunity can mean  

Double the damage in certain instances, and that  can really throw off balance. You don’t want that!  So that’s it for this video covering the facets of extraUpdates, one of Terraria’s hidden stats. Its effects   are often quite subtle but are integral to the  functionality of the game. Quite interesting! 

If you enjoyed this video, consider subscribing,  as it helps out the channel. On the left,   you can find a video about my Terraria run  using only the mouse. It’s a weird one.  Either way though, thank you for watching,  and good day and good bye. See you next week.

The Terraria “velocity multiplier” that does so much more
The Shadowbeam Staff… in slow-motion!
100% pointless discord: https://discord.com/invite/yJrCt9YFz5

Chapters:
0:00 Intro
0:59 What is an extraUpdate?
1:39 1 – extraUpdates and movement granularity, in general
2:42 2 – extraUpdates and the Shadowbeam Staff
3:55 3a – extraUpdates and hitting twice per tick
4:28 3b – Celebration Mk.2 from 1.4.3.6 is perfectly balanced
5:43 4 – extraUpdates and Immunity Frames
6:40 Closer

Music:
Terraria Calamity Mod Music – “hesitation” – Theme of the Sulphuric Depths by Heart Plus Up!

Mods and Packs:
Foundry & Alchemy (Pack) – https://steamcommunity.com/sharedfiles/filedetails/?id=2440505684
Fancy Lighting [Ultra Preset] (Mod) – https://steamcommunity.com/sharedfiles/filedetails/?id=2822950837
Stanberry Font (Pack) –
https://steamcommunity.com/sharedfiles/filedetails/?id=2559652586
Stormdark UI (Pack) –
https://steamcommunity.com/sharedfiles/filedetails/?id=2448259079
DragonLens (Cheat Mod) –
https://steamcommunity.com/sharedfiles/filedetails/?id=2939737748

The Terraria “velocity multiplier” that does so much more

14 Comments

  1. For arrows ichor don't have extra updates and seeing that they are probably the most used one it makes magic quivers kind of redundant

    10% additive bow damage is just bad unfortunately (doesn't even increase arrow damage like ranged damage does)

  2. Another fun fact regarding velocity: When a projectile is spawned through Projectile.NewProjectile(), the velocity is automatically fit to have a magnitude of 16f (the maximum velocity before the projectile clips through blocks). The thing is, this is done through truncation and not scaling, which can lead to the projectile velocity being wildly off.

  3. Apparently stinger necklaces' bees cause Iframes on enemies, making shark tooth neckless better.

    Consider making a video about support weapons and accsessories that cause iframes? that would be helpful like your video about minion iframes

  4. Y'know, I always wondered how the Shadowbeam staff worked, I had assumed it was a raycaster of some kind…
    Actually, that leaves me wondering, does the Heat Ray work the same? It's also an instantly-travelling 'hitscan' weapon, maybe it also uses extraUpdates?

Leave A Reply