Tracer bug

Making or wanting help making your own asset? Check in here
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Tracer bug

Post 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
Image

Mineral: TIL that Wire-guided missiles actually use wire
lucky.BOY
Posts: 1438
Joined: 2010-03-03 13:25

Re: Tracer bug

Post 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 :)
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: Tracer bug

Post 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.
Last edited by Mats391 on 2013-07-12 18:37, edited 1 time in total.
Image

Mineral: TIL that Wire-guided missiles actually use wire
Pvt.LHeureux
Posts: 4796
Joined: 2009-04-03 15:45

Re: Tracer bug

Post by Pvt.LHeureux »

This could change PR's gameplay drastically. No more .50 laser beams.
Image

Chuva_RD : You want to remove bugged thing but dont tell how to fill formed void.
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: Tracer bug

Post 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.
Image

Mineral: TIL that Wire-guided missiles actually use wire
Zander
Posts: 38
Joined: 2013-02-22 19:28

Re: Tracer bug

Post by Zander »

subscribed :)

from scratch
lucky.BOY
Posts: 1438
Joined: 2010-03-03 13:25

Re: Tracer bug

Post 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?
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: Tracer bug

Post 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
Image

Mineral: TIL that Wire-guided missiles actually use wire
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: Tracer bug

Post 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.
Image
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: Tracer bug

Post 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.
Image

Mineral: TIL that Wire-guided missiles actually use wire
qubolo
Posts: 59
Joined: 2010-12-01 23:54

Re: Tracer bug

Post 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.
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: Tracer bug

Post by Mats391 »

tested it now on dedicated and seems to work just like in local.
Image

Mineral: TIL that Wire-guided missiles actually use wire
Pvt.LHeureux
Posts: 4796
Joined: 2009-04-03 15:45

Re: Tracer bug

Post by Pvt.LHeureux »

This is really great news!
Image

Chuva_RD : You want to remove bugged thing but dont tell how to fill formed void.
Gosu-Rizzle
Posts: 610
Joined: 2009-06-06 13:23

Re: Tracer bug

Post 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 :-)
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: Tracer bug

Post 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.
Image
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: Tracer bug

Post 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).
Image

Mineral: TIL that Wire-guided missiles actually use wire
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: Tracer bug

Post 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
Image
Rudd
Retired PR Developer
Posts: 21225
Joined: 2007-08-15 14:32

Re: Tracer bug

Post 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
Image
Heavy Death
Posts: 1303
Joined: 2012-10-21 10:51

Re: Tracer bug

Post 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. *_*
Nicey
Posts: 4
Joined: 2013-03-22 12:47

Re: Tracer bug

Post 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
Post Reply

Return to “PR:BF2 Community Modding”