Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Bullet Drop

Author
Message
DPKW
15
Years of Service
User Offline
Joined: 17th Oct 2009
Location:
Posted: 17th Oct 2009 10:28
I'm new to the forum... i've been going through and reading for a few weeks now and have learned quite a bit. But there is one subject i havn't been able to find any info on here... Bullet Drop over distance... is there a way to code a weapon to fire out to certain distances, for instance handguns shouldn't be able to fire as far out as a rifle. And even rifle depending on type should have a little restriction on distance. You know, for those periodic long distance shots that might need to be made. Also after tinkering with FPSC, has anyone worked on a scope that could be magnified multiple times?

Thanks for any feedback.
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 17th Oct 2009 11:01
There are ways to simulate bullet drop, but it's not a typical feature of FPS games. Players are accustomed to their pistols losing accuracy over a distance, but never the bullet flat-out not getting to the destination area. I realize the question in realism here, but players are interested in having fun, not realism, so there isn't much call for a feature
For an accurate bull drop feature, you would need to modify the source code. And even then, it would be tricky to get the parabolic drop correct. This is especially difficult when you take into account the fact that "bullets" in FPSC are instantaneous, no matter how far away the target is, so the parabolic drop will need to be calculated upon pulling the trigger. And using a direct raycast won't net perfect results. What if the bullet was supposed to fall out over a cliff?


As for multiple maginifications for zoom, try using the tavor, zoom in and then use the mouse wheel to change magnifications.


The one and only,


DPKW
15
Years of Service
User Offline
Joined: 17th Oct 2009
Location:
Posted: 18th Oct 2009 04:34
Thanks Plystire. Much appreciated.
Errant AI
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 18th Oct 2009 11:59 Edited at: 18th Oct 2009 12:14
Quote: "but players are interested in having fun, not realism"


Sorry, Ply but that's a bad generalization, IMO. It's true that pure sims are not so fun but simulation elements do make an FPS more enjoyable. Otherwise, people wouldn't have wanted faster ROFs (firerate) or open/iron sights. Everyone would be running around with no-hands vickers and blasters if realism wasn't important to them or their audiences. This is much the same way CRPGs are boring for most but CRPG elements can set apart a great game from a mediocre one.

I've been wanting bullet drop since day one of using FPSC. I agree it's not practical for machineguns and pistols, from a math/performance standpoint but it would be beyond excellent for sniper rifles.

Imagine... You are viewing a distant enemy through your rifle's scope. The reticle has markings which allow you to judge the distance by aligning with a human-sized target. You can then know exactly where to place your crosshair for a perfect headshot.

For the player, this is a cool, interactive and rewarding "puzzle". For the game designer, you've just increased gameplay time and have a cool gameplay feature.

This could be done by having non-exploding flak! Damage might need to be calculated a bit differently (physics force only or direct damage) and the decals would need to be able to show bullet holes instead of scorch marks, etc.

Here's a super old video from when I first started using FPSC. The only problem was that I didn't realize you could mousewheel scroll to change zoom factor and that ruined the calibration. Also, I think the physics were tweaked at some point which later got things out of joint. This could be achieved nowadays by using fixed simplezoom.

http://www.youtube.com/watch?v=IABGiU1zRpU

edit: the same non-exploding flak ability would also be of great use for arrows, rocks, throwing knives, etc
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 18th Oct 2009 14:24
Sorry, Errant, you're right, I did over-generalize when I said that. But I didn't over-generalize the part about "players are interested in having fun". It's just that some players find that little bit of realism to be entertaining because they understand it.

I know how to calculate my bulletdrop when aiming with a real rifle, so I know where the concept would be applied and how. What I'm saying is... to get this working, you're basically rewriting one of the core systems in FPSC. You're trying to make real bullets when FPSC uses simple raycasts.

The problem, as I see it, is not a question of being ABLE to do it, it's a question of performance. FPSC has enough trouble maintaining a standard framerate when there's more than 5 characters active, but how much trouble would it have if the player and those 5 characters were lighting each other up, filling the room with real bullets, where each bullet is needing to perform a raycast (which can be rather intensive on the CPU) every single frame?

From a development standpoint, I would rather not delve into doing that bit of realism, sacrificing precious performance just to satisfy the few that the feature is actually meaningful to. The developers need to weigh the pros with the cons. If they are targeting the market segment of people who value that realism then I'm willing to bet they'd sacrifice those frames for it, but when it comes to FPSC, we need to look at a broader spectrum of people with different values. There are those who value graphics more than anything, while others value gameplay, while others value PURE performance, while yet still others value realism wherever possible.

Maybe one of these days, when that bit of performance can be sacrificed, we'll see bullet physics come along... but I'm afraid it may be a while before it gets there. I would love to see some realism brought to FPSC, but there's just so many other things that need to be "realistic" before we get into that depth... perhaps starting with character physics... maybe even humans being a tad smarter than a cinder block.


The one and only,


Errant AI
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 18th Oct 2009 15:48
I understand about the performance drain. That's why I'm not advocating it be part of the raycast routine. The conical accuracy and simple accuracy modifiers of simplezoom and in-depth modifiers from scripting in PBUM are more than satisfying, IMO.

It's the non-exploding flak I want
General Jackson
User Banned
Posted: 19th Oct 2009 05:32
DF2 has it and It is more enjoyable i used to just see how far i could get it to go its just so awesome.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 19th Oct 2009 08:25
Haven't exactly tested it, Errant, but have you tried setting the "force" option to 0 in your flakspec? It'll probably still create a flash and make a sound, but it shouldn't cause area damage.


The one and only,


General Jackson
User Banned
Posted: 21st Oct 2009 05:51
Really ply
Im gonna try that!

General Jackson
User Banned
Posted: 21st Oct 2009 06:09
Yep still does area damage

Errant AI
18
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 21st Oct 2009 20:10
Yes, I tried it not long after you added the feature and again somewhat recently. Minimum blast radius is still quite large (4 segments?) for non-explosives. I don't know if damage explicitly is radus'd with force=0 but there is still the concussion which knocks over AI and knocks dynamic objects around.
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 21st Oct 2009 22:02
Hmmm. I have a slightly mroe realistic raycast system where the bullet doesnt just go from the cam out, but from the barrel forward, so it is actually based on where the gun points (thanks errant =3) I plan to incorporate projectiles at some point, so this may happen.


I'm the exception to every rule, that rule withstanding
General Jackson
User Banned
Posted: 22nd Oct 2009 06:18
O.k., I tried it again, but this time I did it with -4, worked, but bullets pass right through enemies.

Fuzz
18
Years of Service
User Offline
Joined: 14th Nov 2006
Location: Tasmania, Australia
Posted: 22nd Oct 2009 06:28
Quote: "It's the non-exploding flak I want "


For some reason my m203 flak dosnt explode.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 23rd Oct 2009 05:34
My bad, Errant, and anyone else trying it.

I have a default for "force" to set it to 1 if it was set to 0. (That way it defaults to 1 if "force" wasn't specified in the file)

What you can also try is something like "force=0.001" since force is allowed to be a decimal value.


The one and only,


Login to post a reply

Server time is: 2024-11-25 07:25:27
Your offset time is: 2024-11-25 07:25:27