Sarge
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > barrel explosion radius?
 
Author
All times are GMT. The time now is 10:34. Post New Thread    Post A Reply
Soundblock
Junior Member


Posts: 217
Registered: 12-08


Anyone ever calculate the exact outer limit of the barrel explosion's effective radius? I've been to http://doomwiki.org/wiki/Barrel but it doesn't go there. The number and nature of the gradients of damage as you stand closer to the erupting barrel is also of interest.

I guess I could set up a test map but I'm currently busy finale stages testing of Plasmaplant so I thought I'd just throw the quick question out there...

Old Post 12-21-13 07:20 #
Soundblock is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
RjY
anARCHy


Posts: 953
Registered: 05-02


code:
dx = abs(thing->x - bombspot->x); dy = abs(thing->y - bombspot->y); dist = dx>dy ? dx : dy; dist = (dist - thing->radius) >> FRACBITS; if (dist < 0) dist = 0; if (dist >= bombdamage) return true; // out of range
which means it looks at the larger of the two differences in coordinates between you and the barrel. I forget what they call this metric (supremum metric is it?) but for an "explosion radius" I think it gives you a square of side 2*bombdamage centred on the barrel.

(At least that's the ideal case. There are probably complications introduced by scanning the blockmap...)

Edit: I should say, in the case of a barrel, bombdamage is 128

Old Post 12-21-13 08:04 #
RjY is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Soundblock
Junior Member


Posts: 217
Registered: 12-08



RjY said:
code:
dx = abs(thing->x - bombspot->x); dy = abs(thing->y - bombspot->y); dist = dx>dy ? dx : dy; dist = (dist - thing->radius) >> FRACBITS; if (dist < 0) dist = 0; if (dist >= bombdamage) return true; // out of range
which means it looks at the larger of the two differences in coordinates between you and the barrel. I forget what they call this metric (supremum metric is it?) but for an "explosion radius" I think it gives you a square of side 2*bombdamage centred on the barrel.

(At least that's the ideal case. There are probably complications introduced by scanning the blockmap...)

Edit: I should say, in the case of a barrel, bombdamage is 128



Texels?

Danx dyde!

Old Post 12-21-13 08:36 #
Soundblock is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Memfis
Forum Spammer


Posts: 5587
Registered: 04-07


Cybermind from the Russian forums calculated this a long time ago and somehow I still had that *.txt on my drive:

this is assuming that the player and the barrel are on the same X or Y coordinate. first number is the distance but I'm not sure if it's the distance from the center of the barrel to the center of the player or maybe the distance between their bounding boxes?

136 - 8 damage
140 - 4 damage
142 - 2 damage
143 - 1 damage
144 or more - no damage

Old Post 12-21-13 12:44 #
Memfis is online now Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Soundblock
Junior Member


Posts: 217
Registered: 12-08



Memfis said:
Cybermind from the Russian forums calculated this a long time ago and somehow I still had that *.txt on my drive:

this is assuming that the player and the barrel are on the same X or Y coordinate. first number is the distance but I'm not sure if it's the distance from the center of the barrel to the center of the player or maybe the distance between their bounding boxes?

136 - 8 damage
140 - 4 damage
142 - 2 damage
143 - 1 damage
144 or more - no damage



Wow, if that's true it peters out rather abruptly. I thought it might have a randomizer added on the end of that - like the weapons damage... I mean sometimes shots seem to "crit", like when you one-shot a lost soul with a singlebarrel...

EDIT: Uhm, I meant two singlebarrel shots to down a lost soul, not one. My apologies, I blame my brain being sweaty at the time, from pre-christmas level design crunch.

Last edited by Soundblock on 12-27-13 at 17:55

Old Post 12-21-13 13:05 #
Soundblock is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Gez
Why don't I have a custom title by now?!


Posts: 11109
Registered: 07-07


Basically, the maximum damage is equal to the maximum distance, which is 128 units. If you are 128 units away from the exploding barrel, you take 128-128=0 damage. 127 units away? 1 damage. 8 units away? 120 damage.

Your radius is taken into account, and a player's radius is 16. So your player's center point needs to be 128+16=144 units away to get no damage.

And the distance being computed simplistically only as the greater of the two distances on the X and Y axes means that if you are 100 units away on the X axis and 100 units away on the Y axis, you aren't further away than if you are 100 units away on either axis and 0 units away on the other, even if trigonometry would tell you that in the former case, you are actually 141 units away from the center of the explosion. So the apparent distance, depending on the angle, can be greater than the effective distance.

Note that 128 damage/128 distance means that this is identical to a rocket's splash damage. This is the standard splash damage in Doom, only the arch-vile's blast differs. The rocket does deal an additional amount of random damage, but only if you get a direct hit -- the splash damage itself is never random and depends only on the distance.

Of course, some ports allow to change that. For example, ZDoom allows to define a distance within which full damage are applied, and you can use random values for the parameters.

Old Post 12-21-13 14:13 #
Gez is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
purist
Senior Member


Posts: 2051
Registered: 04-04


Is the barrel's own radius taken into account and could you therefore increase the damage range of the explosion in vanilla by increasing the radius?

Old Post 12-21-13 15:04 #
purist is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 10:34. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > barrel explosion radius?

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.