Author Topic: I found a new use for the track ir...turret control!  (Read 4257 times)

0 Members and 1 Guest are viewing this topic.

Offline colecampbell666

  • I See Dead Pictures
  • 212
  • Evolution and ascension.
Re: I found a new use for the track ir...turret control!
I assume that the guns work like flak. Flak is designed to blow at a certain range, which is the range at which the ship is at. The guns probably converge at that range.
Gettin' back to dodgin' lasers.

 

Offline Stormkeeper

  • Interviewer Extraordinaire
  • 211
  • Boomz!
Re: I found a new use for the track ir...turret control!
This could be used as a part of a mission where the player has to man a turret on a capship. Its pretty funky stuff.


By the way, what weapon is that? I've never seen it before.
Ancient-Shivan War|Interview Board

Member of the Scooby Doo Fanclub. And we're not talking a cartoon dog here people!!

 

Offline colecampbell666

  • I See Dead Pictures
  • 212
  • Evolution and ascension.
Re: I found a new use for the track ir...turret control!
http://www.hard-light.net/forums/index.php/topic,53587.0.ht
This could be a good multi thing, have several people in a bomber, each gets a turret/pilot/bombardier.
Gettin' back to dodgin' lasers.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: I found a new use for the track ir...turret control!
Excellent work! This will be really useful for finally creating that elusive gunship class.
thanks, this is one of the reasons im making this script. The GvAf Apis is in essence a mini-gunship. its dual gatling turrets were meant to be aimed. seeing as the ship goes back to retail, im happy to finally give the turrets their proper functionality. but i also plan to use it for other ships like the maelstrom and some bombers too.

Quote
The basic idea is look-and-shoot. The turrets aim where you look. The problem is, where you look is actual a point in space, and this could be anywhere from the tip of your nose to the next galaxy.

So we need to tell the guns the range of where you look and vice-versa tell the player where the guns aim.

thats pretty much how it works now. range is calculated with (enemypos - playerpos):getMagnitude(), before any of the lead calculation is done. this is dependent that a ship is targeted. freelancer seems to make the guns fire in parallel unless a target dot is moused over. i am converging on the target or on a point 10000 meters out. this is sorta accurate. but im still dependant that all the turrets are aligned along the main axes through the turret's center. so to test it on ships like the aeolus, i had to go in and edit all the turrets in the model. well set up turrets are the key to making those aim properly, so not every model works well with it. i could probably improve it by getting the range to the lead position rather than the ship, which im calculating in my own lead function. its not as accurate as the build in freespace lead indicator but its close enough.

Quote
(Your "ghostgun" does a very clever range calculation.  However I have a feeling this data would be also available from the targeting code that generates the shooting reticle, so a code modification - or hook just for your script - would be more than justified in this case).
id love a built in lead function in lua. that would be awesome.

Quote
What we need is a visual cue. The set of cross-hairs should be scaled according to the range (from the ship) the guns bear on. If this crosshair is the size of the average target (fighter for instance) then when you slew your view onto a target you will be assured a hit when it "boxes" the bogey.

i did a lead indicator like that, but it was based on 2d concepts. i figured that the distance between the ship and where the lead indicator would be drawn could be added or subtracted from the screen center and a reticle be drawn there. so that if the reticle is placed directly on the ship, it would be the same as if a fixed reticle was centered on the target's lead. i really haven't a clue if this would work when you're not looking straight forward. i can try but no promises. since i now have bounding box info i can determine how big a ship should appear on screen, and draw brackets accordingly. i could vary the size/color/ect of those depending on hit probability.

Quote
If we want to simulate an actual "lock-up" (which would also be handy as it leaves us time to do a ghost-shot) a different reticle should be displayed while calculating range. So we have a reticle scaled to infinity without a target, a lock-up reticle, and finally an appropriately scaled reticle. This creates a "flashlight" effect, so the player will immediately feel when he has something in his sights.

i thought about a partial blind fire. all you need to do is get the target's lead close to the screen center, and the last 5 or so degrees would auto-lock on for more accurate hits.

Quote
To simulate turrets without infinite tracking speed a different set of cross-hairs could be actually rendered for the guns themselves. This set of cross-hairs should always point at the point where the guns are actually aiming. So by waiting until the second set catches up you can tell the player whether the guns are locked up or not.

thats how the old system worked. im still working out all the bugs, sometimes some turrets don't cooperate (i made left front and side single part turrets work so far). once those are completely squashed i can work on field of fire and track rate. not firing turrets that are not able to go where you're aiming and returning it to ai control when it cant go to where you want it due to field of fire limits.

Quote
If you're firing ballistic (ergo not hitscan) ammunition, the same code could be used to generate a set of similar crosshairs for a set of ranges so they would give the player a bullet trajectory. This could also be done on a per turret basis, so widely spaced turrets could also be visualized.

perhaps. i calculate a different lead indicator per turret because of this. when flying large cap ships, you actually see a string of leads in front of the target. they are partially transparent so when a bunch of them are stacked it sorta highlights the group, marking a sweet spot. auto aim can make each turret line up with its own lead indicator so they all hit accurately.

Quote
Finally the code could be combined with the convergence code - as far as I see it already is in a matter of speaking, since the turrets "auto converge". In a primitive setting - or at a CIC type gamplay - one could set the conversion or target range. By doing so with the mouse wheel and with the above visual cues we have a fast and entertaining gameplay.

manual control of flak range would be a good idea, right now it just sets to the range of the target, and this does not work (should mantis it). we still have very little input however. so for now this is just an idea. i could probably code up some over elaborate auto targeting system, where any ship that finds its way into my crosshair will be auto targeted and range settings applied to convergence and flaks.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 
Re: I found a new use for the track ir...turret control!
ok, i get it now
i was pretty stupid earlier
yeah this sounds cool
and a gunship would be cool with this

  

Offline Azhren

  • 24
Re: I found a new use for the track ir...turret control!
Maybe it could be used in a PSI Cops campaign where you could be a P14 rated PSI Cop (one with strong 'active' abilities) and 'control' your fire onto your target (even make it a 'feature', as in Dark Children).