Page 1 of 3

Tracer bug

Posted: 2013-07-12 13:47
by Mats391
So i guess we all know the bug that stops us from proper bullet drop. Apparently tracers fly slower than normal bullets, but i think i found a fix (hopefully).
This is how it looks like. Every other round is a tracer and gravity modifier is increased. Also deviation and recoil are removed.
[XFIRE]606121[/XFIRE]
As you can see the bullets hit roughly the same spot despite dropping a lot.
W/o fix it looks something like this
[XFIRE]606125[/XFIRE]

What i did:
Since it seems to be a problem with tracers getting a reduced muzzle velocity i tried to speed them up in flight using acceleration.
For the 556x45mm at 940m/s it would look like this:

Code: Select all

ObjectTemplate.create GenericProjectile 556_45_r_940
ObjectTemplate.material 3556
ObjectTemplate.damage 36
ObjectTemplate.minDamage 0.4
ObjectTemplate.DistToStartLoseDamage 400
ObjectTemplate.DistToMinDamage 1000
ObjectTemplate.gravityModifier 30
ObjectTemplate.acceleration 1000000
ObjectTemplate.maxSpeed 940
include projectiles_common.tweak
include projectiles_tracer_r.tweak
I tested around with it a bit and seems to work quite fine, only sometimes a bullet strays away and i dont know why.
So i guess i fixed it, even though i dont trust myself. It just seems to be to easy to be true :S

Re: Tracer bug

Posted: 2013-07-12 17:46
by lucky.BOY
does it work on all distances, with normal gravity? I dont know much about this stuff, but it seems to me that giving the bullet an acceleration would fix it only for particular range, but not if the target is farther or closer than that. Certainly looks good, though :)

Re: Tracer bug

Posted: 2013-07-12 17:54
by Mats391
lucky.BOY wrote:does it work on all distances, with normal gravity? I dont know much about this stuff, but it seems to me that giving the bullet an acceleration would fix it only for particular range, but not if the target is farther or closer than that. Certainly looks good, though :)
i dont know alot about this stuff either, was just playing around and it seemed to work :D
From what i understand the bullet gets accelerated till it reaches the maxspeed after that it stays at that speed since no friction/drag is specified. So i guess it should work on longer ranges.
Edit:
I just tested it for longer ranges, here is a video of it at ~400m distance.
[XFIRE]6061db[/XFIRE]
I also found a solution to the random stray bullets that i experienced before. I got rid of the initial velocity(initial velocity 5) and now have all bullets accelerated not only the tracers, works better this way.

Re: Tracer bug

Posted: 2013-07-13 23:14
by Pvt.LHeureux
This could change PR's gameplay drastically. No more .50 laser beams.

Re: Tracer bug

Posted: 2013-07-14 11:04
by Mats391
Pvt.LHeureux wrote:This could change PR's gameplay drastically. No more .50 laser beams.
hopefully, but im still waiting for a CON/DEV to show up and ruin this dream :D
Also i tested a bit more and it seems the acceleration is not really needed. At a speed of 2000 the bug seems to disappear, this is twice as fast as current ones.

Re: Tracer bug

Posted: 2013-07-14 11:25
by Zander
subscribed :)

Re: Tracer bug

Posted: 2013-07-14 12:12
by lucky.BOY
Posted in Ask the devs a ?:
[R-DEV]Rhino wrote:I do keep an eye on the community modding forums you know... But ye I would have thought the guys working on this before would have tested trying to speed up the rounds. Iirc they said it was a drag problem which if so, speeding up the round will only correct it at certain ranges I'm pretty sure, but ye, needs more testing so am going to keep an eye on that and see what it turns up but so far, only some low quality videos tested at shortish range.
Please show us more :)

EDIT: Maybe a test on all possible ranges (up to VD) in single vid?

Re: Tracer bug

Posted: 2013-07-14 13:00
by Mats391
lucky.BOY wrote: Please show us more :)

EDIT: Maybe a test on all possible ranges (up to VD) in single vid?
In this the target is 1400m away. Projectile velocity is 2000 and tracerinterval 6
[XFIRE]606709[/XFIRE]
Can get any higher quality, just try it out yourself :D

Re: Tracer bug

Posted: 2013-07-14 14:40
by Rhino
Looks good so far :D
Three things thou.
1. can you get a video with sound? hard to tell when your firing etc...
2. can you also shoot at targets at different ranges with also showing the range of each target in one video with the same code etc?
3. Are you testing on a dedicated server? Some stuff in BF2 behaves totally differently on dedicated than it dose on local.

Re: Tracer bug

Posted: 2013-07-14 15:05
by Mats391
[R-DEV]Rhino wrote:Looks good so far :D
Three things thou.
1. can you get a video with sound? hard to tell when your firing etc...
2. can you also shoot at targets at different ranges with also showing the range of each target in one video with the same code etc?
here you go. targets range from 300m to 950m
[XFIRE]606760[/XFIRE]
Values:
Velocity: 2000
gravity modifier: 0.5
rest just like in PR
3. Are you testing on a dedicated server? Some stuff in BF2 behaves totally differently on dedicated than it dose on local.
no, i didnt test on dedicated yet. But since i only change bullet speed i hope it works.

Re: Tracer bug

Posted: 2013-07-14 16:52
by qubolo
Not to be mean or anything, but aren't the tracers suppose to fly slower and fall short of normal bullets? This is due to loss of mass during flight thus increased deceleration cause of air friction.

Re: Tracer bug

Posted: 2013-07-14 18:26
by Mats391
tested it now on dedicated and seems to work just like in local.

Re: Tracer bug

Posted: 2013-07-14 18:41
by Pvt.LHeureux
This is really great news!

Re: Tracer bug

Posted: 2013-07-15 00:10
by Gosu-Rizzle
Its awesome if it actually works like it seems to be doing!
The lack of bulletdrop is one of the last big annoyances i have with PR. And this looks to me like an easy fix, good job :-)

Re: Tracer bug

Posted: 2013-07-15 01:40
by Rhino
Mats391 wrote:here you go. targets range from 300m to 950m
[XFIRE]606760[/XFIRE]
Values:
Velocity: 2000
gravity modifier: 0.5
rest just like in PR

no, i didnt test on dedicated yet. But since i only change bullet speed i hope it works.
Cool, but can you shoot at targets 1km away, and 3km away (edge of the VD), with super high zoom? If there is any diffidence we will be able to see it then.

And ye, test on dedicated, you just need to run your bf2_w32ded.exe with a shortcut so it runs PR and change the maplist.con in your mod\settings\ folder to have the map and layer at the top of the list then launch the game and join it though local games.

Re: Tracer bug

Posted: 2013-07-15 07:41
by Mats391
[R-DEV]Rhino wrote:Cool, but can you shoot at targets 1km away, and 3km away (edge of the VD), with super high zoom? If there is any diffidence we will be able to see it then.

And ye, test on dedicated, you just need to run your bf2_w32ded.exe with a shortcut so it runs PR and change the maplist.con in your mod\settings\ folder to have the map and layer at the top of the list then launch the game and join it though local games.
Cant get the 3000m shots since the impacts dont even render for me on that distance, but here you have 1500m on a dedicated server:
[XFIRE]6069ba[/XFIRE]
this was tested with velocity of 2000 and gravity modifier 0.05 (otherwise they dropped out of scope).

Re: Tracer bug

Posted: 2013-07-15 11:46
by Rhino
Cool well hopefully one of our coders will look more into this to confirm it dose work, but if the solution is this simple I'm amazed that the guys working on the problem didn't think about it before as its pretty obvious thing to try :p

Re: Tracer bug

Posted: 2013-07-15 12:02
by Rudd
No one is perfect :P I wish Sniperdog was here, he was the guy who did most of teh experiments afaik and would be best placed to provide info on why it wasn't working before

Re: Tracer bug

Posted: 2013-07-15 15:42
by Heavy Death
Even if the tracers fall short a bit, its realistic. This is promissing. How wpic would be to implement ballistics in 1.0. *_*

Re: Tracer bug

Posted: 2013-07-16 21:06
by Nicey
Can u implement bullet-air friction and this together ? From what I understand 5.56 will keep its velocity of 940 m/s at 1.5km distance with your code