performance? prop_phys vs (prop_dyn + logic)


Dustin Diamond
08-16-2006, 04:24 PM
I have a question that maybe some of you can offer your opinions on. It has to do with performance when using different model/entity combinations.

I have made a model of a landmine to be used in my map. I want the mine to blow up when stepped on, and also when shot. There are 2 ways to do this:

First, i can compile the model as a prop_physics with explosive prop data (like an explosive barrel), so that when you shot it, it blows up. Motion is disabled on the model. That takes care of shooting it, but to make it blow up when you step on it, i have to use a trigger_once that surrounds the model and that sends the input Break to the model. So that works fine. Total Cost = 1 prop_physics + 1 trigger_once.

The second way to accomplish this is to compile the model as a prop_dynamic. Then i surround the model with a func_button brush that is triggered on touch and also on damage. When the button is pressed (meaning when shot or touched), it explodes an env_explosion, disables/kills the model, and kills itself. Total cost = 1 prop_dynamic + 1 func_button + 1 env_explosion.

So my question is, which way is more efficient? Do i save myself an entity, but use a prop_physics? or do i use a prop_dynamic but use an extra entity?

Probably the difference is negligible, but i'm curious. There's no real way to test this, unless i fill up a giant room full of these things to try and get a noticable difference, but I'm not going to do that.

So, which is it?

Furyo
08-16-2006, 04:45 PM
My guess would be, in a multiplayer map, to stay away from environment entities (env_xxxxx) as much as possible. They can add a lot in your atmosphere, but given we're talking landmines here, I bet there will be more than just one. ie a minefield. And I wouldn't want to experience the FPS drop of having 10+ env_explosion at the same time....

pluckster
08-16-2006, 04:47 PM
another way to do it would take more enities but quite simple setup.

1 - prop_static
1 - trigger(once or multiple, depending on how many times you want it to explode.
1 - env_explosion

i dont think i even need to explain how to put them together

pedroleum
08-16-2006, 04:48 PM
can't you compile the model with something like "break on touch" (besides the xplosive stuff)? so you can shoot it and it blows up when you step on it...

Dustin Diamond
08-16-2006, 04:53 PM
Originally posted by pedroleum
can't you compile the model with something like "break on touch" (besides the xplosive stuff)? so you can shoot it and it blows up when you step on it...
nope.

Well, at least not that I've found. It took me about 3+ hrs just to get the damn explosions working when you shoot it. The documentation is EXTREMELY lacking and what is there is a joke. Plus the added bonus of DODS being different from HL2, so about half the stuff doesnt work. ARGH!!!

Dash
08-16-2006, 04:53 PM
Mines explode. Break on Touch will just generate gibs, not an actual explosion with a sound.

Dustin Diamond
08-16-2006, 04:56 PM
Originally posted by Dash
Mines explode. Break on Touch will just generate gibs, not an actual explosion with a sound.
The prop is coded to make an explosion when broken. No gibs.

I've tested both ways and they both work. That's not the problem. I just want to use the most efficient method. I can already do either one.

Dustin Diamond
08-16-2006, 05:01 PM
Originally posted by Furyo
My guess would be, in a multiplayer map, to stay away from environment entities (env_xxxxx) as much as possible. They can add a lot in your atmosphere, but given we're talking landmines here, I bet there will be more than just one. ie a minefield. And I wouldn't want to experience the FPS drop of having 10+ env_explosion at the same time....

The mines are placed atop poles along the beach. They are tellermines. They are spaced enough so that they dont trigger each other. But the mortars firing can trigger them if they land close enough. It's actually pretty cool. They dont last long, mainly just the first few minutes of the round, but I like the effect.

Furyo
08-16-2006, 05:10 PM
Right, in that case, forget what I said. I guess you'd have to try to be sure, or you could wait for Mugsy to chime in, if he checks these boards :)

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.