Jump to content
The Dark Mod Forums

Powder kegs


VanishedOne

Recommended Posts

When a firearrow hits an exploding crate, it imparts its linear and angular velocities to the flinders.

For the case of the firearrow, this works ok: the flinders fly off, ending up scattered around on the floor.

For the case of holding a torch next to the crate, however, the torch has no velocities, so the crate simply breaks (no explosion) and the flinders fall down to the floor.

I suggest giving random velocities to the flinders rather than taking them from the object that triggered the explosion. This should fling flinders in all directions, regardless of what the activating object was.

Things to check: how do other breakables (fractures, etc.) deal with their flinders. Breaking a window with an arrow might look better if the flinders don't fly away.

Comments?

Link to comment
Share on other sites

1 hour ago, grayman said:

When a firearrow hits an exploding crate, it imparts its linear and angular velocities to the flinders.

For the case of the firearrow, this works ok: the flinders fly off, ending up scattered around on the floor.

For the case of holding a torch next to the crate, however, the torch has no velocities, so the crate simply breaks (no explosion) and the flinders fall down to the floor.

I suggest giving random velocities to the flinders rather than taking them from the object that triggered the explosion. This should fling flinders in all directions, regardless of what the activating object was.

Things to check: how do other breakables (fractures, etc.) deal with their flinders. Breaking a window with an arrow might look better if the flinders don't fly away.

Comments?

I tested this with a sword strike but anyway

The `external` entity in idEntity::SpawnFlinder seems to be fixed to `gameLocal.world` by idPhysics_RigidBody::ApplyImpulse

So not sure how you end up with fire arrow impulse

In any case, idEntity::SpawnFlinder assigns random velocity and impulse but it's not respected per my description above

Did you commit your fix to svn yet?

 

Link to comment
Share on other sites

On 2/21/2020 at 12:39 AM, kingsal said:

Would like to have script support for a better breakable crate, rather than hacking it together with stims and responses and firing invisible explosions to make it flinder.

 

Edit: The basic destructable crate does not send and impulse to the flinders. They just spawn and float mid-air which obviously isnt how that should work. 

Can you test the @grayman changes?

Link to comment
Share on other sites

@duzenko - So I downloaded the latest source code of the SVN and will try to compile it. Do you know where I can grab all the newest content? Do I need any of that for this latest build to work?

Link to comment
Share on other sites

Scratch that- I was able to get it working without needing the new content. 

 

@duzenko @grayman - This looks great! Needs a lot of testing but this is a good start I think. Is it still possible to add an impulse to these flinders? Im thinking it would be beneficial in some cases where a mapper might want to give the illusion of an explosion without having to spawn an explosion and then trigger it. 

Also- Will we be able to add velocity / fall damage to the crate and bottles? So in the case a player throws a bottle or crate hard enough it shatters. 

Link to comment
Share on other sites

4 hours ago, kingsal said:

Is it still possible to add an impulse to these flinders? Im thinking it would be beneficial in some cases where a mapper might want to give the illusion of an explosion without having to spawn an explosion and then trigger it. 

Also- Will we be able to add velocity / fall damage to the crate and bottles? So in the case a player throws a bottle or crate hard enough it shatters. 

Have you looked at idDebris, like I mentioned on the tracker? The powder keg (not your urn, the w.i.p. idExplodingBarrel keg) spawns some as def_debris. Edit: however, just spawning one from the console doesn't 'launch' it. I just had a look for a way to do that at will, and didn't find one.

(Edit2: by the way, my suggestion for creating 'the illusion of an explosion' would be the FX system: you can tie together sound, lights and particles, and there's even a 'launch' command that's supposed to launch projectiles, though it was unused in D3 and I haven't tested it. Maybe launching debris could be added to that.)

https://wiki.thedarkmod.com/index.php?title=Breakable_objects#Todo claims that wine bottles break under force, but I've been throwing one around and it didn't break even after I added "max_stress" and "max_torque" spawnargs.

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

Ill have a look at the def_flinder stuff. Can you send me the .def of the idExplodingbarrel you are talking about?

How in depth mappers want to go with custom explosions is up to them I suppose, but basic flinder chunks with impulse will better sell the illusion. Its hard to do that without custom texture work and fiddling with the fx editor.  

 

Link to comment
Share on other sites

The def in the OP should still be current. There's a test map to go with it here.

One detail: idDebris is intended to have a 'fuse' like a grenade and be removed from the game world when it runs out (optionally with particle effects, and there seems to be shaderparm support for 'burnaway' effects like D3's dead monsters' too). Whereas flinders like those used by the wine bottles are standard moveables, so they persist and can be grabbed.

While getting the links to my previous posts I found this one too, which may be of interest re. mappers' control of collision effects.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

I checked out the powder keg. Thats pretty interesting and seems like a good start. 

I personally like the moveable flinder object method as you get more realistic physics and can  attach more properties to those  ( AI suspicion , or sound prop alerts, ect).  However, maybe idDebris are safer since this is their intended use.  Can idDebris  fly in a random vector when spawned?  Right now they just slide across the floor. This might be because they spawn at the barrels origin. 

 

Either way both solutions  can serve different purposes in my opinion. Maybe for exploding barrels it makes sense to use idDebris, but for breakable crates and bottles its better to leave behind moveable flinders. 

Link to comment
Share on other sites

It might be worth fiddling with the spawnargs, which are possibly just D3 values carried over. If "velocity" "100 100 00" uses the world axis then it's 0 in global z. (Then "random_velocity" is turned on, which apparently semi-randomises the values in all three axes.) Also "gravity" "266" must be pulling them downwards.

Yes, I agree it's good to have both. The flinder system seems to be intended for cases where the direction comes from an external impulse, and spawnargs only determine mass, friction, etc.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...