Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
invictius

Any way to make bullets behave realistically in train/plane maps?

Recommended Posts

Was thinking of this after playing a couple of train levels, there's no inertia to make your shot go backwards. Is it possible to code this somehow? I don't want to do it myself, just wondered if it can be done.

Share this post


Link to post

Bullets are usually fast enough that you can't really track their movement with your eyes, and in Doom they're instantaneous. Also they have the same inertia as anything else on the train or plane, so you'd need to have the train or plane suddenly accelerate (or decelerate) while the bullet is still flying to have it change its relative trajectory, and again, in something small like a cabin it's going to be pretty much instantaneous as far as human senses are concerned.

Share this post


Link to post

Bullets shots in an enclosed space on a plane (e.g. passenger cabin, cargo bay etc.) would not behave any differently in RL than they do in Doom, as they would have the same inertia as the plane.

If shot in open air however, in RL they would also have to face a super-fast gust of wind deflecting them as soon as they left the weapon's barrel, and despite them starting with additional momentum, the effect of air resistance would be non-linear (the effects of air resistance increase non-linearly with speed).

In any case, modeling wind deflection on bullets is not possible in most ports for hitscan attacks, even for those having extensive scripting systems. "Hitscan" means instantaneous, not just "a very fast projectile".

It might be possible to model the effect of air and wind resistance for standard projectiles, and see e.g. imp fireballs be deflected (in RL, throwing e.g. a basketball against someone sitting e.g. on a 747's wing with an 800 km/h crosswind would result in the basketball just being carried away by the wind, even if the pitcher was standing on the same wing). A pistol bullet would also be significantly affected, making wind aim correction necessary. However modeling this sort of behavior for bullets would require a port with full scripting support and a major change in how bullets physics work in Doom (essentially, modeling quasi-hitscan bullets either with very fast projectile attacks, or with completely new code).

Share this post


Link to post

I think it's less an issue for Doom and similar games where you're a dude with a gun, and more an issue for combat flight sims. In a flight sim you might want to imitate Tom Attridge's exploit of shooting his own plan down by running into his own bullets. In Doom, despite all the jokes about Doomguy's running speed, you're not going to be able to realistically do that -- or you need your bullets to fly really slow, like rockets, but then again they'll just noclip through you harmlessly anyway.

Share this post


Link to post

To add to what Maes and Gez are saying - momentum is completely relative.

Were that not the case, we'd all be in extreme trouble with our spinning planet that's revolving around the sun at thousands of miles per hour. Just something to think about. :)

Share this post


Link to post
invictius said:

Is it possible to code this somehow?

I can imagine that yes, by shifting each spawned bullet's direction vector into a direction opposite to the train's supposed movement. I don't think any current Doom-based engine can do this directly, but since the algorithm exists, a modified engine could potentially implement it, and maybe some complicated ZDoom ACS/DECORATE trickery could implement it too. As others pointed out, it'd actually make the physics less realistic, not more.

Share this post


Link to post

Are there any other conditions to consider, such as wind resistance or low air pressure? Is there a Mythbusters episode about something like this?

Share this post


Link to post
40oz said:

Is there a Mythbusters episode about something like this?

About what? Relativity/inertial invariance is a pretty well-established principle of classical mechanics.

OTOH the one thing you might want for a train/plane level is low-level turbulence, possibly using the ACS earthquake effects. For trains you'd probably want something occurring on a regular interval, while for plane levels you'd want it to occur more randomly.

For a plane level you might want to also consider that damaging the fuselage with a gunshot is a very bad idea. Shooting out windows should perhaps be game over, while maybe the metal walls have a limited amount of health. It could maybe make for an interesting tactical shooter where you have to carefully ensure your bullets all hit targets and nothing else.

Share this post


Link to post

You'd have to code the level so that if any bullet hits a window, oxygen masks drop the ceilings.

But a realistic airplane interior is going to be a really boring Doom map.

Share this post


Link to post
Gez said:

But a realistic airplane interior is going to be a really boring Doom map.

Maybe. But I wouldn't dismiss the concept out of hand. The gameplay certainly needs to be carefully designed.

Large planes can actually have quite complicated interiors, since they have multiple sections and the larger ones have multiple floors too. You'd probably want to build something based on some kind of complicated scripting, rather than relying on "traditional" Doom gameplay. Look to games like Metal Gear Solid for example where it's about sneaking around and not being noticed. Or maybe you can shoot out overhead bins to make heavy bags fall on people :) It doesn't work as a traditional Doom level but you can probably make something out of the concept.

Share this post


Link to post

An airliner would definitely be boring. An old WW2/early cold war bomber could be more interesting, with crawlspaces and stuff, but it'd be extremely cramped so you'd probably need to go Duke Burger and shrunk Doomguy.

Yes I could see a SWAT game recreating a scenario such as this one, but otherwise I'm skeptical.

Jokewad idea: airliner scenario, Doomguy and a number of demons are flying with a company such as RyanAir. No combat takes place because everybody is hopelessly stuck in the geometry.

Share this post


Link to post
Gez said:

Jokewad idea: airliner scenario, Doomguy and a number of demons are flying with a company such as RyanAir. No combat takes place because everybody is hopelessly stuck in the geometry.


That. I always believed that cramped airliners, minimal under-seat luggage space etc. were the best preventative measure against hijackings and terrorism (provided that suspect people get only booked window seats). Because who will take your terrorist threat seriously if you cannot even stand and visibly wave your weapon?

Share this post


Link to post
Gez said:

An airliner would definitely be boring. An old WW2/early cold war bomber could be more interesting, with crawlspaces and stuff, but it'd be extremely cramped so you'd probably need to go Duke Burger and shrunk Doomguy.

Even the insane B-36 has a far less interesting interior than something like a 747 or A-380. Bombers have very narrow fuselages for aerodynamic reasons and a lot of the space is taken up by the bomb bay.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×