Chaosforge Forum

  • March 29, 2024, 07:23
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: [0.9.9.6] former human - expert in shrapnel dodging.  (Read 3128 times)

Q2ZOv

  • Elder
  • Sergeant
  • *
  • *
  • Offline Offline
  • Posts: 65
  • Lost Soul
    • View Profile

Sorry, I don't have a screenshot so i may be mistaken in distance between barrel and former human but the rest is exact.

....#...
0...h...
....#@..
....#...

From that position i fired with shotgun aiming the barrel. The result was

....#...
..../h..
....#@..
....#...
Former human was knockbacked by barrel explosion(min 7 dmg) and also should have been hit by my shot(min 8 dmg) but he hadn't died. He also didn't have any armor. It wasn't instant revive too because no drop appeared.

I think that the game calculated that i hit the barrel and its explosion and also knockback caused by explosion before it calculated if i hit the former human.
Logged
0.9.9.7 Imp Corporal
[6/3/2/1/1/0]
0.9.9.6 Cyberdemon God Hand
[24/22/22/17/15]

Klear

  • Elder
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1319
  • Twisted passages carry the smell of dapperness...
    • View Profile
Re: [0.9.9.6] former human - expert in shrapnel dodging.
« Reply #1 on: March 22, 2012, 07:37 »

Hmm... I had a feeling I managed to miss some enemies point-blank with a shotgun as well recently, several times. I didn't note the exact situation and thought that maybe I just didn't aim correctly.

I'll try to take a shot when it next happens.
Spoiler (click to show/hide)
Logged
Arch-Vile Mjr General [24/19/18/8/2] (0.9.9.7)

Quote from: thelaptop
Dude... we need to change your forum handle from "Klear" to "Klear Nukem".

ih8regin

  • Captain
  • *
  • Offline Offline
  • Posts: 294
  • You dodge! The Cyberdemon dies.
    • View Profile
Re: [0.9.9.6] former human - expert in shrapnel dodging.
« Reply #2 on: March 22, 2012, 22:08 »

I expect this to be a feature of the engine, it reads through object left to right and up to down, I remember me nuking some level, and getting 2 exp levels off it, and I saw enemies disappear row by row. Perhaps it did the same, first it lays out the damaged area, then each area square gets damaged separately. So, the barrel was damaged first, knocking the former out of a cell that's yet to be resolved for damage, so he went off the blast.
Logged
0.9.9.6: Cacodemon 2nd Lieutenant, wins 3|5|3|2|0, badges [22|17|7|1|0]
0.9.9.7: badges [21|17|17|10|1|wow,1], quest: UV each challenge (9/16)

Q2ZOv

  • Elder
  • Sergeant
  • *
  • *
  • Offline Offline
  • Posts: 65
  • Lost Soul
    • View Profile
Re: [0.9.9.6] former human - expert in shrapnel dodging.
« Reply #3 on: March 24, 2012, 05:13 »

Well that happened one more time and this time i took screenshot after i killed that imp so i can exactly reconstruct the situation.

                                                 
                                                   ############################
                                                   .........................#
                                                  #0=........................#
                                                  ===.........................#
                                              #=  #..............^.....0.....#
                                             ..=. #...............%...........#
                                            ..=..0#############+#/#############
                                            ==....i................|..........#
                                            .=....#...........................#
                                             =.   #@..........................#
                                                  #................|..........#
                                                  #}..........................#
                                                  ###+###../###########..######
                                                  #........................0..#
                                  ^               ########./#######/#/##/######
                                                  #.........................#
                                                  ################/##/#########
                                                  #==========================   
                                                  #========|=================   
                                                  ###########################   
  Q2Z0v                      Armor : blue armor [1/2] (25%)                     
  Health: 60%  Exp:  3/15%   Weapon: shotgun (8d3) [1/1]                       
  cautious                                                    Phobos       Lev3




he was knockbacked like that and hadn't died
############################
                                                   .........................#
                                                  #0=........................#
                                                  ===.........................#
                                              #=  #..............^.....0.....#
                                             ..=. #...............%...........#
                                            ..=...#############+#/#############
                                            ==..../................|..........#
                                            .=....#...........................#
                                             =.   #@i.........................#
                                                  #................|..........#
                                                  #}..........................#
                                                  ###+###../###########..######
                                                  #........................0..#
                                  ^               ########./#######/#/##/######
                                                  #.........................#
                                                  ################/##/#########
                                                  #==========================   
                                                  #========|=================   
                                                  ###########################   
  Q2Z0v                      Armor : blue armor [1/2] (25%)                     
  Health: 60%  Exp:  3/15%   Weapon: shotgun (8d3) [1/1]                       
  cautious                                                    Phobos       Lev3

Logged
0.9.9.7 Imp Corporal
[6/3/2/1/1/0]
0.9.9.6 Cyberdemon God Hand
[24/22/22/17/15]

tehtmi

  • Programmer
  • Local Inquisitor
  • Lieutenant Colonel
  • *
  • *
  • Offline Offline
  • Posts: 458
    • View Profile
Re: [0.9.9.6] former human - expert in shrapnel dodging.
« Reply #4 on: March 28, 2012, 02:12 »

I can confirm that Q2ZOv is correct about what is happening.  A shotgun can destroy a barrel and thereby knock an enemy out of its cone.

I'm happy to admit that area-damage calculations are weird, but I'm not convinced this particular case needs to be fixed.  If it were to be fixed, I'd say we should wait to expand recursive explosions (from explosions or shotguns) until after the current shotgun/explosion is complete.  This would be a nontrivial change, however.
Logged

skarczew

  • Elder
  • Major General
  • *
  • *
  • Offline Offline
  • Posts: 974
    • View Profile
Re: [0.9.9.6] former human - expert in shrapnel dodging.
« Reply #5 on: March 28, 2012, 05:55 »

It just means that every shrapnel piece, bullet, plasma ball should be calculated and modeled separately :] .
Logged

Klear

  • Elder
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1319
  • Twisted passages carry the smell of dapperness...
    • View Profile
Re: [0.9.9.6] former human - expert in shrapnel dodging.
« Reply #6 on: March 28, 2012, 05:58 »

Wouldn't it be enough to calculate damage done to all affected enemies before barrels? Might be too much work too, though. I have no idea how the engine works.
Logged
Arch-Vile Mjr General [24/19/18/8/2] (0.9.9.7)

Quote from: thelaptop
Dude... we need to change your forum handle from "Klear" to "Klear Nukem".

ih8regin

  • Captain
  • *
  • Offline Offline
  • Posts: 294
  • You dodge! The Cyberdemon dies.
    • View Profile
Re: [0.9.9.6] former human - expert in shrapnel dodging.
« Reply #7 on: March 28, 2012, 07:45 »

it'll require a rework. Apparently right now it's using a recursive algorithm, anything that catches damage runs a recursive resolve procedure, dealing damage and initiating splash as part of the process, if applicable, like for a barrel. In order to rework this one has to devise iterative scalable calculation process which will first distribute damage and then check for any explosions triggered, then process them if there are any, applying more damage, then deliver that damage and check again for explosions, etc. Probably a pseudocode could help:
Code: [Select]
// An object has two additional fields: a boolean flag "damaged interatively" and an integer "damage received"
// A splash damage function has a designated area of tiles which roll for damage, say "apply_damage(dice,sides)"
// This code triggers after something shoots and the shot is getting resolved.
if shot.splash then shot.doSplashDamage;
level.resolveAllDamage;
  while (level.explosionsToProcess>0) do begin
  for each (explosion in level.explosions) explosion.doSplashDamage;
  level.resolveAllDamage;
end;
...
procedure doSplashDamage;
begin
  for each (tile in this.splashArea) if tile.occupied then begin
    tile.occupied.takeDamage(this.dice,this.sides,this.sourceTile);
end;
...
procedure object.takeDamage(dice:integer,sides:integer,sourceTile:Tile);
begin
  var rolled:integer;
  damageToResolve:=true;
  rolled:=roll(dice,sides);
  inc(damage,rolled)
  addKnockback(rolled,source); // this accumulates knockback similarly to damage. Yes, barrels can get knocked back with this as well, get knocked into lava, etc etc. BTW, it'll allow barrels to move from floor to normal objects.
end;
...
procedure level.resolveAllDamage;
begin
  explosions:=0;
  for each (object in level) if object.damaged then object.processDamage;
  // this is as normal, sets damaged to false, applied accumulated damage to HP, processes knockback, calls level.thereWasAnExplosion in case a barrel gets damaged or knocked into lava/acid so the level will know that the process has to be iterated again.
end;
Logged
0.9.9.6: Cacodemon 2nd Lieutenant, wins 3|5|3|2|0, badges [22|17|7|1|0]
0.9.9.7: badges [21|17|17|10|1|wow,1], quest: UV each challenge (9/16)

ih8regin

  • Captain
  • *
  • Offline Offline
  • Posts: 294
  • You dodge! The Cyberdemon dies.
    • View Profile
Re: [0.9.9.6] former human - expert in shrapnel dodging.
« Reply #8 on: April 02, 2012, 00:59 »

BTW, the same effect is noticed if you cornershot-kill the last monster in Hell Arena while shooting downwards (direction 4 o'clock to 8 o'clock), and the game spawns monsters in your shotgun blast, they immediately get hurt, and you largely get screwed if you're not prepared.
Logged
0.9.9.6: Cacodemon 2nd Lieutenant, wins 3|5|3|2|0, badges [22|17|7|1|0]
0.9.9.7: badges [21|17|17|10|1|wow,1], quest: UV each challenge (9/16)

Klear

  • Elder
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1319
  • Twisted passages carry the smell of dapperness...
    • View Profile
Re: [0.9.9.6] former human - expert in shrapnel dodging.
« Reply #9 on: April 02, 2012, 04:42 »

and you largely get screwed if you're not prepared.

Hey, it's free damage. As long as you are not surrounded, you can still retreat/fire as you'd normally do. The only difference is that the enemy will chase you, but that's often desirable.
Logged
Arch-Vile Mjr General [24/19/18/8/2] (0.9.9.7)

Quote from: thelaptop
Dude... we need to change your forum handle from "Klear" to "Klear Nukem".
Pages: [1]