[TIP] Splash Damage "Bug" -- What It Is & How To Avoid It

Discussion in 'Tutorials & Resources' started by tyler, Jan 15, 2013.

  1. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,035
    Positive Ratings:
    3,992
    First, let's make sure you understand what splash damage is.

    Weapons with splash damage create a sphere of pain from their impact point. Players and buildings take more damage the closer they are to the center of the detonation.

    The way this works is there is a ray trace done from the center of the explosion outward. All explosive weapons have this. Notably, the Direct Hit has a tiny one.

    So what's the bug, and how can you stop it?

    Well, first it's not really a bug, because in reality, everything is working as intended. It's just that people making the maps (ie, you and me) don't always take measures to prevent splash damage breaking.

    Let's have a hypothetical situation. You're a soldier attacking players on a control point. Defending it, maybe. The control point is on a platform raised about 16 units--maybe a block of wood.

    This happens.

    ss+(2013-01-15+at+07.02.17).jpg

    Because the detonation happens below the vertical edge the control point rests on, the ray trace that determines where the sphere of damage should be stops there. And that's all there is to it. The people on the point shoot back at you happily, and you die, and lose.

    The same thing happens on stairs.

    ss+(2013-01-15+at+07.08.00).jpg

    And on cool looking bridges (Badlands, anyone?).

    ss+(2013-01-15+at+07.03.10).jpg

    It doesn't matter what the vertical edge is--if it's solid, the ray trace stops traveling forward. That means even a 1u tall brush textured as a hazard stripe around a control point will do this.

    Now, what can you do about this? It's very simple. Use blockbullets instead of or in addition to playerclip on stairs and bridges and anywhere else this might happen. You can make triangular blockbullets ramps to carry splash up small ledges (like the control point or stairs example), but don't ask me why that works. It just does. Or, simply don't place control points on little raised brushes.

    Bear in mind: blockbullets will cut vvis like any regular brush, so you need to func_detail it in many situations.

    This concludes my splash damage tip.
     
    • Thanks Thanks x 20
    Last edited: Dec 14, 2017
  2. Micnax

    aa Micnax I maek map

    Messages:
    2,062
    Positive Ratings:
    1,397
    Would a clip brush just suffice instead of a playerclip + blockbullets?

    Nice article anyway, I'll be sure to remember this in maps.
     
  3. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,035
    Positive Ratings:
    3,992
    https://developer.valvesoftware.com/wiki/Tool_textures

    No.

    According to this wiki page, which I am pretty sure is accurate, the only thing similar to blockbullets is invisible (identical, except invisible lets bullets through).

    By the way, blockbullets also works as playerclip--so you only need one. I find a lot of people don't realize that.
     
  4. Micnax

    aa Micnax I maek map

    Messages:
    2,062
    Positive Ratings:
    1,397
    Ah, broken in TF2, gotcha.

    The more you know!~
     
  5. nightwatch

    aa nightwatch

    Messages:
    640
    Positive Ratings:
    446
    A good reference tool, but there are different problems associated with using blockbullets as your clipping texture instead of playerclip. First, there is the problem of blast marks - an area that has been textured with blockbullets will not leave a blast mark on that facing, but depending on the type of blast and the angle, it will leave blast marks that do not look particularly realistic - although making sure that your blockbullets is properly aligned and not skimping over areas will help with that, not to mention that blast marks are not always rendered in the most realistic fashion anyway. This is relatively unimportant, but there is another problem: while it may be easier for soldiers to deal damage to enemies on stairs this way, it significantly reduces the damage a demoman is able to put out, in the sense that pipebombs will not be able to rest on stairs and will instead roll down all the time, or deflect upwards depending on the angle they are shot at. This behaviour is uncharacteristic of stairs, and could be confusing to players who make decisions based on the enemy shooting projectiles at them and their surroundings.

    In both the cases of demomen and soldiers, putting blockbullets on your stairs or other surfaces causes the game to perform unrealistically and, if a player is unaware of how the stairs have been clipped, possibly unfairly as well. (This of course does not take into account the fact that explosions are masked as if the stairs are indestructable and block all blast damage through their lips).

    In addition, a soldier can easily recognize that he is shooting at stairs and aim a little higher in order to ensure blast damage, or aim at the wall next to the stairs if there is one, or go for the direct hit on the opposing player.

    Short version: Soldiers will benefit, Demomen will either suffer or be able to exploit it.

    Oh and stickies look stupid on block-bulleted stairs as well. But stickies often look stupid in strange places, so don't mind me.
     
    • Thanks Thanks x 1
  6. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,035
    Positive Ratings:
    3,992
  7. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,219
    Another good reason this game really needs a "staircase" entity as a hint to the game engine to treat them differently from generic brushwork.
     
  8. Blastfrog

    Blastfrog L1: Registered

    Messages:
    5
    Positive Ratings:
    0
    Wow, that's horrible. Valve really ought to change the mechanics, cutting things that short from such a small bit of geometry is absurd. The cutoff should be calculated spherically from the center (think of how shadows are cast), not just using the blocking face's own angle. Man, think how bad it'd look if lightmaps were compiled this way. :p

    Still, I strongly appreciate that this has been pointed out, it'll definitely come in handy if such an issue comes up in a map I'm building.
     
  9. wareya

    wareya L7: Fancy Member

    Messages:
    493
    Positive Ratings:
    173
    Using blockbullets instead of playerclip is definitely a tradeoff, not a direct dis-or-advantage. You have to deal with bullets not... going through gaps in the stairs. Though in this case using playerclip would be more reasonable to begin with, and disbelief isn't suspended when a splash damage glitch happens because In the case of fully solid stairs, blockbullets makes more sense most of the time because you're never going to be shooting through them and it avoids the no splash damage bug (explosions in real life should definitely compress air around corners like that [maybe not as much, but still having an effect]) so the ramp effect is good. My rule of thumb: Like turbine center's stairs or 2fort courtyard? Playerclip. Like badlands last's? Blockbullets.
     
  10. Sergis

    aa Sergis L666: ])oo]v[

    Messages:
    1,871
    Positive Ratings:
    1,131
    since when is yyler a guest
     
    • Thanks Thanks x 1
  11. goatcheese3

    goatcheese3 L1: Registered

    Messages:
    36
    Positive Ratings:
    3
    since he deleted his account
     
  12. ScorpioUprising

    aa ScorpioUprising

    Messages:
    402
    Positive Ratings:
    354
    You raise some reasonable points, but I would point out that it kind of depends on what the primary audience is for your product. If your audience is level designers, then yes, playerclipped stairs rather than bullet blocked is going to make more sense, because stickies/splash/etc work better and things appear closer to how the game intended you to have your levels work. HOWEVER, if your audience is public players, I'm not sure they would even notice the difference, let alone complain about it affecting the map.

    As for comp players, every soldier who ever offered me feedback has pointed out that stairs blow because they absorb splash. Every single one. If they ever see stairs on your map they are immediately going to point it out to you. On the other hand, I don't think I've ever had a demo complain about rollers not staying put on stairs.

    This is the result of a couple of things. First, rollers are huge. Like, massive. it seems almost completely ridiculous to assume in the majority of instances that a roller is going to have the size and shape and inertia to hit an 90 degree angle on a stairway, and not immediately bounce off and roll somewhere else, which is essentially the same sort of behaviour that you would get if you bullet blocked the stairs. To say that it would put demoman at a disadvantage to bullet block stairs, is pretty silly given how often rollers are going to fall off stairs anyway. If anything, bullet block stairs will lead to the rollers "roll" being quite a bit more predictable, rather than essentially random based off the spin from the initial shot and what have.

    As for stickies, I think you pretty much nailed it with regards to the weirdness of sticky traps. You can't expect them to look 100% the way they should, so why complain when a mapper caters to his audience and the only downside is a slightly floaty sticky trap? If you are worried about a demo not being able to sticky trap a stairway, the average 8-4 unit ratio used on the majority of stairways in TF2 is usually not sufficient to hide or conceal the sticky from view, so whats the point to putting it there? Better off putting it up against a corner or over a doorframe for much more reliable results.

    Also, sticky traps nestled into the 90 degree angle of a stairway are still subject to the oddity of splash cut off, so if a demo sees someone walking forward and dets too soon, he might miss the splash entirely, and given how important sticky traps are, that could easily be a lost round right there.

    As for telling soldiers to avoid shooting stairs, thats like telling engies not to build somewhere. In the heat of battle, when you have to make split second decisions, you may decide to shoot the stairs, and it sucks to have that decision punished because some mapper made a different choice than maybe you are used to. You could complain that they aren't as skilled if they get dicked by splash, but ultimately you have to realize that stairs are optional. If you look at the majority of stairs in tf2, the side railing of the stairs is a perfectly serviceable ramp, and if you just copy and paste that section over and delete the stairs VOILA no splash bug at all. It might look worse, but if you want to ensure players don't get screwed by splash a ramp is the perfect way to do it.

    Personally, I like being able to use stairs, and if I can please a certain portion of my audience by ensuring that they don't get pissed by a geometry decision I made, then I'm perfectly happy with bullet blocking stairs.
     
    • Thanks Thanks x 5
  13. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,219
    Shame there's no way to select a bunch of steps and turn them into a func_something that can be set to clip players and projectiles but not block splash damage. That's all we really need.
     
  14. WolfKit

    WolfKit L3: Member

    Messages:
    128
    Positive Ratings:
    51
    Isn't there a material that lets splash damage through? I think it's used for grates/grills.
    I'm not certain about this, but I think I remember a complaint in a gameday about a koth map where demos could place sticky traps on the underside of a grate and kill players above who couldn't do anything about it.
     
  15. phi

    aa phi Let Pain Be Your Guide

    Messages:
    804
    Positive Ratings:
    1,586
    I know that the grate texture used in quite a few maps (such as the notorious grate near C on cp_steel) does let splash damage (at least for stickies) through. Not sure how relevant or helpful this is to the topic at hand, though.
     
    • Thanks Thanks x 1
  16. WolfKit

    WolfKit L3: Member

    Messages:
    128
    Positive Ratings:
    51
    Couldn't one make custom vmts to use that property with any texture they wish, and texture stairs (or whatever) with it to get geometry that doesn't block splash damage, exactly what stevethepocket wanted?
     
    • Thanks Thanks x 1
  17. LeSwordfish

    aa LeSwordfish semi-trained quasi-professional

    Messages:
    4,113
    Positive Ratings:
    6,085
  18. PoignardAzur

    PoignardAzur L2: Junior Member

    Messages:
    92
    Positive Ratings:
    7
    nightwatch answered that : it causes more problems than it solves.

    Wolfkit : nice idea. Guess it would solve everything (except for the fact that it's another issue you've got to take care of when mapping ^^)
     
  19. wareya

    wareya L7: Fancy Member

    Messages:
    493
    Positive Ratings:
    173
    Yes, because there haven't been other posts expanding on the case or anything... It's not about whether it does more or less, it's about what it does: just telling people not to (or to) do it is going to cause more headaches than educating them to the mechanics and telling them to judge for themselves. Scorpio's post is a very nice counterpart to nightwatch's in that regard.
     
    • Thanks Thanks x 3
  20. PoignardAzur

    PoignardAzur L2: Junior Member

    Messages:
    92
    Positive Ratings:
    7
    Sorry, I hadn't read Scorpio's post :(
    However, I didn't actually mean "bulletclip is lame, never use it" but "read nightwatch, you'll see all the supplementary problems it causes".
    Obviously, the best solution would be to make something that let explosion kill through, but block everything else (like the grid thing, if I understood well).