[Coding] Realistic Deviation [WIP]
-
PRC_Heavy_Z
- Retired PR Developer
- Posts: 1088
- Joined: 2007-02-25 22:56
Re: [WIP] Realistic Deviation
Have you considered a logarithmic or exponential decrease rate instead of a linear one for the deviation from maximum deviation to minimum deviation?
This would reflect the more time and concentration required to hit a target say 200~300 meters away with a rifle versus hitting something 50~100 meters away.
This would reflect the more time and concentration required to hit a target say 200~300 meters away with a rifle versus hitting something 50~100 meters away.
-
Wolfe
- Posts: 1057
- Joined: 2007-03-06 03:15
Re: [WIP] Realistic Deviation
Not sure if that's even possible, but that would be nice. The only deviation values I'm aware of are those located in the .tweak of each weapon which doesn't allow for exponential recovery times. For example, fire dev only has 3 sets of values: max, per shot, and recovery rate per server frame.PRC_Heavy_Z wrote:Have you considered a logarithmic or exponential decrease rate instead of a linear one for the deviation from maximum deviation to minimum deviation?
This would reflect the more time and concentration required to hit a target say 200~300 meters away with a rifle versus hitting something 50~100 meters away.
If someone knows how to make this logarithmic, post it.
I only know about this much (I'm holding my thumb and index finger 1 millimeter apart) so much of this is new to me and I'm learning as I go.
-
Mosquill
- Retired PR Developer
- Posts: 857
- Joined: 2007-08-12 10:13
Re: [WIP] Realistic Deviation
So.. you would have to wait almost 2 seconds to unzoom the gun. That's unacceptable.Wolfe wrote:The .8 zoom time isn't a big problem for snipers.. in fact i think it enhances it.
-
Wolfe
- Posts: 1057
- Joined: 2007-03-06 03:15
Re: [WIP] Realistic Deviation
.8 is less than a second.
-
Wolfe
- Posts: 1057
- Joined: 2007-03-06 03:15
Re: [WIP] Realistic Deviation
Ran into a problem during testing tonight:
Suppression Effect: pointless when scoped at 65 or closer.
The suppression effect doesn't obstruct your view enough. At 65 meters and closer, scoping in on your target allows you to see him clearly enough to easily kill. This was tested by person A going full auto and suppressing person B. Person B, while in full suppression, calmly scoped his rifle, aimed, and killed person A.
Going full auto from-the-hip may not kill your target, but should suppress them enough to the point they are unable to return effective fire. For this to happen, the suppression effect would have to blur your vision 3x to 10x more than it does now, but reduce the suppression time.
Also,
Suppression Effect: pointless when scoped at 65 or closer.
The suppression effect doesn't obstruct your view enough. At 65 meters and closer, scoping in on your target allows you to see him clearly enough to easily kill. This was tested by person A going full auto and suppressing person B. Person B, while in full suppression, calmly scoped his rifle, aimed, and killed person A.
Going full auto from-the-hip may not kill your target, but should suppress them enough to the point they are unable to return effective fire. For this to happen, the suppression effect would have to blur your vision 3x to 10x more than it does now, but reduce the suppression time.
Also,
You're right.. I tested hitbox detection (using an absolute 0 dev gun) and found the hitbox doesn't extend beyond the body in most areas. My fear was that it did, which could have affected the relative size of soldiers. It doesn't so no worry. I'm using real-life MOA for mindev.[R-CON]Mosquill wrote:Also your deviation should include both human factors and gun's accuracy in moa. And it shouldn't be scaled in any way.
Last edited by Wolfe on 2008-05-13 04:55, edited 4 times in total.
-
Mosquill
- Retired PR Developer
- Posts: 857
- Joined: 2007-08-12 10:13
Re: [WIP] Realistic Deviation
I was talking about sniper rifles with double-zoom. For example you zoom-in on someone in the middle of a firefight, but then you want to quickly unzoom for some reason, and you can't because you have to click double-zoom first, switching to that will take 0.8s, and only then you can unzoom but that will take at least 0.8s more.Wolfe wrote:.8 is less than a second.
Also, I think 0.8s is too much for any gun, not just sniper rifles.
-
Darktrooper
- Posts: 55
- Joined: 2008-02-21 11:08
Re: [WIP] Realistic Deviation
I'm loving that part... I hate how now a minimal movement can make your deviation jump to max giving you no more chance than the one who was running toward you ...Wolfe wrote:[*]Shooting while moving:
- Unsighted:
Walking forward has minimal increase to deviation. Side strafing has moderate increase to deviation. At 20 meters, side strafing while full auto will most likely wound them with has a chance of killing them (less of a chance than if you were standing still).- Sighted:
Walking forward while scoped in allows you to suppress a target while advancing towards it, single shot or full auto. At 100m, your most bullets will hit. Side strafing while shooting scoped decreases that accuracy to 25% chance of hitting your target, but all bullets will land around him. After moving, it takes a moment to regain max accuracy.
Really, really good improvement here. Of course it can't be perfect right now, and a lot of values may need to be changed, but at least it can be done ...
Thanks
-
Cp
- Posts: 2225
- Joined: 2006-04-17 18:21
this:Wolfe wrote:slight animation snag:
M16a4
Try these values:
andCode: Select all
rem ---BeginCompefaultZoomComp --- ObjectTemplate.createComponent DefaultZoomComp ObjectTemplate.zoom.zoomDelay .8 ObjectTemplate.zoom.zoomLod 1 ObjectTemplate.zoom.addZoomFactor 0 ObjectTemplate.zoom.addZoomFactor .25 ObjectTemplate.zoom.changeFovDelay .812 ObjectTemplate.zoom.disableMuzzleWhenZoomed 1 rem ---EndComp ---
Code: Select all
Objects/Weapons/Handheld/usrif_m16a4/animations/1p/1p_m16a2_tozoom.baf animationManager.looping 0 animationManager.length 0.68
Then zoom in the rifle and note the following:
1. Rifle animation begins, rifle moves to eye
2. Screen flickers for an instant, showing scope at the top of the screen.
3. Your are now looking through the scope as normal.
It's that second part, #2, that I want to eliminate. I just want it to start the animation then change to the zoom screen without that flicker.
Code: Select all
ObjectTemplate.zoom.zoomDelay .8Code: Select all
animationManager.length 0.68This is easily fixed by simply changing the animation length of 1p_m16a2_tozoom to 0.8
so dont touch the .tweak but change the AnimationSystem1p.inc to
Code: Select all
Objects/Weapons/Handheld/usrif_m16a4/animations/1p/1p_m16a2_tozoom.baf
animationManager.looping 0
animationManager.length 0.8Theres still some glitching when zooming in, which I dont think can be fixed without altering the animation (nothing hard to do, really, but cant be done with notepad :wink

-
Sabre_tooth_tigger
- Posts: 1922
- Joined: 2007-06-01 20:14
Re: [WIP] Realistic Deviation
[quote=""'[R-CON"]Mosquill;674208']I was talking about sniper rifles with double-zoom. For example you zoom-in on someone in the middle of a firefight, but then you want to quickly unzoom for some reason, and you can't because you have to click double-zoom first, switching to that will take 0.8s, and only then you can unzoom but that will take at least 0.8s more.
Also, I think 0.8s is too much for any gun, not just sniper rifles.[/quote]
Sniper scope should be awkward to use, people try to use them in the wrong places all the time - they should die
[quote="Wolfe""]I would like to have MOA (and recoil) based in realism, but not copy it exactly. Why not? Because in the real world, you have to deal with many known and random factors to shoot accurately. In the game, all I have to do is move my mouse a fraction of an inch. Realism doesn't always translate well to fiction.
For example, the effective range of an abrams tank is 3k-4k meters. That's roughly the size of the entire Kashan map therefore the range of tanks has been reduced. Small arms follows the same principal.[/quote]
Got to say I agree, being literally realistic is a fail when it enables unrealistic tactics
Also, I think 0.8s is too much for any gun, not just sniper rifles.[/quote]
Sniper scope should be awkward to use, people try to use them in the wrong places all the time - they should die
[quote="Wolfe""]I would like to have MOA (and recoil) based in realism, but not copy it exactly. Why not? Because in the real world, you have to deal with many known and random factors to shoot accurately. In the game, all I have to do is move my mouse a fraction of an inch. Realism doesn't always translate well to fiction.
For example, the effective range of an abrams tank is 3k-4k meters. That's roughly the size of the entire Kashan map therefore the range of tanks has been reduced. Small arms follows the same principal.[/quote]
Got to say I agree, being literally realistic is a fail when it enables unrealistic tactics
Last edited by Sabre_tooth_tigger on 2008-05-13 18:27, edited 1 time in total.
-
Wolfe
- Posts: 1057
- Joined: 2007-03-06 03:15
Re: [WIP] Realistic Deviation
Yep, that works.Cp20000 wrote:Code: Select all
ObjectTemplate.zoom.zoomDelay .8 animationManager.length 0.8
-
Wolfe
- Posts: 1057
- Joined: 2007-03-06 03:15
Re: [WIP] Realistic Deviation
Don't get hung up on specific .5, 6, 7, or .8 zoom times. A LOT of squad vs. squad play testing is required to determine what the zoom time will be, not theoretical guessing on the forums.
But there WILL be a delay in the end product. There has to be. Not just for realism sake, but for game mechanics sake. Without a delay, everyone will be able to switch from from a wide cone of fire to a narrow cone of fire near-instantaneously... going prone and scoping in before they hit the ground... then we're right back to v.75 atari-like deviation physics.
But there WILL be a delay in the end product. There has to be. Not just for realism sake, but for game mechanics sake. Without a delay, everyone will be able to switch from from a wide cone of fire to a narrow cone of fire near-instantaneously... going prone and scoping in before they hit the ground... then we're right back to v.75 atari-like deviation physics.
-
Wolfe
- Posts: 1057
- Joined: 2007-03-06 03:15
Re: [WIP] Realistic Deviation
Another known issue:
Medic M16a2 animation: missing graphics
Slowing down the M16a4 (rifleman) animation speed worked perfectly, but it affected the M16a2 (medic). Even though the rifleman and medic have the same zoom delay speed, the medic's rifle dissappears during the zoom animation (pictured below). The M16a2 folder doesn't contain an animation file; it seems to run off the M16a4... any ideas how to fix this?

Update: Fixed.
Medic M16a2 animation: missing graphics
Slowing down the M16a4 (rifleman) animation speed worked perfectly, but it affected the M16a2 (medic). Even though the rifleman and medic have the same zoom delay speed, the medic's rifle dissappears during the zoom animation (pictured below). The M16a2 folder doesn't contain an animation file; it seems to run off the M16a4... any ideas how to fix this?

Update: Fixed.
Last edited by Wolfe on 2008-05-14 00:42, edited 1 time in total.
-
Wolfe
- Posts: 1057
- Joined: 2007-03-06 03:15
Re: [Coding] Realistic Deviation [WIP]
Question:
The simrad (officer's binocs) have a range finder display. I have slowed down the animation of brining the binocs to your eyes, but the range display appears immediately (before the animation is complete). How do I delay the appearance of the range finder so that it displays after the binoc animation is complete?
The simrad (officer's binocs) have a range finder display. I have slowed down the animation of brining the binocs to your eyes, but the range display appears immediately (before the animation is complete). How do I delay the appearance of the range finder so that it displays after the binoc animation is complete?
-
bosco_
- Retired PR Developer
- Posts: 14620
- Joined: 2006-12-17 19:04
-
dbzao
- Retired PR Developer
- Posts: 9381
- Joined: 2006-06-08 19:13
Re: [Coding] Realistic Deviation [WIP]
You can probably put a show delay in the HUD file for that.Wolfe wrote:Question:
The simrad (officer's binocs) have a range finder display. I have slowed down the animation of brining the binocs to your eyes, but the range display appears immediately (before the animation is complete). How do I delay the appearance of the range finder so that it displays after the binoc animation is complete?
Last edited by dbzao on 2008-06-02 23:20, edited 1 time in total.
-
Wolfe
- Posts: 1057
- Joined: 2007-03-06 03:15
Re: [Coding] Realistic Deviation [WIP]
How? Remember, you're talking to a noob coder who knows next-to-nothing about such things.
-
nedlands1
- Posts: 1467
- Joined: 2006-05-28 09:50
Re: [Coding] Realistic Deviation [WIP]
You can find the HUD file here: menu_server.zip\HUD\HudSetup\Weapons\HudElementsLaserPainter
I tried putting in hudBuilder.setNodeInTime X, where X was a number but the rangefinder wouldn't show up.
Code: Select all
hudBuilder.createSplitNode IngameHud LaserPainterHud
hudBuilder.setNodeLogicShowVariable EQUAL GuiIndex 1
hudBuilder.createTextNode LaserPainterHud SimradRangeText 462 400 101 10
hudBuilder.setTextNodeStyle Fonts/vehicleHudFont_6.dif 2
hudBuilder.setTextNodeStringVariable TargetDistanceString
hudBuilder.setNodeColor 0.8 0 0 1
hudBuilder.createTextNode LaserPainterHud TargetLabelOn 476 420 115 10
hudBuilder.setTextNodeStyle Fonts/vehicleHudFont_6.dif 0
hudBuilder.setTextNodeString HUD_TEXT_LASERTARGET_TARGET_AQUIRED
hudBuilder.setNodeShowVariable HasMissileConnection
hudBuilder.setNodeColor 0.7 0.1 0.1 1
hudBuilder.setNodeOutTime 0.1
rem -------------------------------------- Laser Target Indication --------------------------------------
hudBuilder.createObjectMarkerNode LaserPainterHud LaserPainterMarker 120 170 540 230
hudBuilder.setObjectMarkerNodeTexture 0 Ingame\Vehicles\Icons\Hud\Air\Attack\F15\HeatSeeking\lockBoxFriendly.tga
hudBuilder.setObjectMarkerNodeTexture 1 Ingame\Vehicles\Icons\Hud\Air\Attack\F15\HeatSeeking\lockBox.tga
hudBuilder.setObjectMarkerNodeTexture 2 Ingame\Vehicles\Icons\Hud\Air\Attack\F15\HeatSeeking\lockBoxLocked.tga
hudBuilder.setObjectMarkerNodeTexture 3 Ingame\Vehicles\Icons\Hud\Land\Tunguska\rangeLine.tga
hudBuilder.setObjectMarkerNodeTextureSize 0 32 32
hudBuilder.setObjectMarkerNodeTextureSize 1 32 32
hudBuilder.setObjectMarkerNodeTextureSize 2 64 64
hudBuilder.setObjectMarkerNodeTextureSize 3 16 256
hudBuilder.setObjectMarkerNodeObjects 4
hudBuilder.setObjectMarkerNodeLockOnType 1
hudBuilder.setNodeColor 0 0.8 0 1
-
Wolfe
- Posts: 1057
- Joined: 2007-03-06 03:15
That's the target painter (white box/missile connection) which is different (although used simultaneously) than the range finder (numbers that show distance)?
The simrad .tweak file has this line of code:
ObjectTemplate.weaponHud.hasRangeFinder 1
and also has references to:
Ingame\Weapons\Icons\Hud\
So I'm wondering if the range finder is a separately controlled file located there or elsewhere? It must be a separate thing.. because tanks have range finders but don't have target painters.
I would also have to find the range finder code for the HAT (the range finder numbers appear before the animation is complete).
The simrad .tweak file has this line of code:
ObjectTemplate.weaponHud.hasRangeFinder 1
and also has references to:
Ingame\Weapons\Icons\Hud\
So I'm wondering if the range finder is a separately controlled file located there or elsewhere? It must be a separate thing.. because tanks have range finders but don't have target painters.
I would also have to find the range finder code for the HAT (the range finder numbers appear before the animation is complete).
Last edited by Wolfe on 2008-06-03 04:17, edited 1 time in total.

