raycollider work

Development directions, tasks, and features being actively implemented or pursued by the development team.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: raycollider work

Post by klauss »

Bolts are, I think. It's beams.
I believe beams are attached to their source unit, and that's why they're only simulated when the firing unit is simulated.

Perhaps you're onto the solution. Beams should be scheduled independently, as bolts are. A simple list of actively firing units should suffice, and simulation should be constrained to merely check for collision and re-schedule the firing unit if a hit is detected.

When safemode merges in the bsp stuff I'll take on that ticket ;) (you may have noticed I really like trac :) )
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: raycollider work

Post by safemode »

I think the uniqueness of beams is related to tractor beams.

Either that or the fact that a beam cannot exist in one vector as the ship it's originating from is simulated independently and facing another vector and still firing. Ie, only one beam exists when being fired and that beam has to line up with the source unit. A bolt is fired and then forgotten by the source unit. A beam cannot be. they must always be synchronized.

No, the way a beam is fired is easiest done as a part of the simulation frame of the parent unit.

I think first, the bug regarding beam truncatation at the point of collision needs to be fixed. Then worry about scheduling, but i think you'll just slow things down trying to put beams in the same setup as bolts. They're two different animals.
Ed Sweetman endorses this message.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: raycollider work

Post by klauss »

No, I don't want to simulate them independently, only check for collisions at a higher rate, and independently of AI/physics scheduling of the parent.

Check the newly added ticket: http://vegastrike.wcjunction.com/trac/ticket/31
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: raycollider work

Post by safemode »

a physics frame should look at the last beam state
grow it a certain length based on speed
Then check for collisions, if found, set length to distance from the beam start point and collision point.


the graphics frame should do no manipulation of the physical state of the beam, and just draw it as it is.

This method, no matter how F'd the scheduling is, should never result in beams that pass through a ship. Or bolts for that matter, which also seem to pass through a ship, but are much less noticable. Ie, i've seen turret fire on the fighter barracks passing through parts of the barrracks and hitting my ship.

I think tomorrow, since i have off from one job, I'll have to go follow the code-path much more closely and see exactly what draw is doing so i can find the data member that i need to modify ...then it's only a matter of what to modify it with.


edit: sorry, there is one situation that would result from the most F'd scheduling situation you can imagine, and that's a target ship scheduling much more often than the beam and/or firing ship, and that's by flying into the beam so that it's still being drawn with it's previous state because it hasn't had time to do a physics frame yet.

This is not the case here, both the firer and firee are stationary. Lopsided physics frame scheduling is not an issue here. Neither is some sort of lopsided physics vs draw frames or any other scheduling problem. The single physics frame of a beam should limit it's length appropriately, and the next frame for the draw should see this length and draw it correctly. The physics frame of the beam should never get to a state where it sets a length and direction that passes it through my ship if my ship is correctly detecting the collision (and it does).
Ed Sweetman endorses this message.
Post Reply