Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: SeanP on May 01, 2006, 04:35:26 pm

Title: Request: Looping Lock Tone
Post by: SeanP on May 01, 2006, 04:35:26 pm
Always catch myself wondering during a dogfight if I still have a missile lock - that little lock-on reticle is just too wimpy to do the job.

Doesn't seem like it should be too difficult to add, but I've seen the horror storys about maintaining the code.

Thanks in advance!
Title: Re: Request: Looping Lock Tone
Post by: aldo_14 on May 01, 2006, 05:07:00 pm
I'd imagine the trick would not be so much adding it, as keeping it optional.  I'd like to see it, though, alongside more audio cues like damage alarms or a *****in' betty effect. (to be fair, I did ask the latter before, and someone agreed to look at it, but I could never really figure out what you'd want as cues; no stall or altitude alarms, after all)
Title: Re: Request: Looping Lock Tone
Post by: Mars on May 01, 2006, 06:10:15 pm
Sounds like a fairly useful feature- don't imagine it would eat up too much proccessing power or memory either.
Title: Re: Request: Looping Lock Tone
Post by: Kaine on May 02, 2006, 08:09:48 am
good suggestion :) yay for this.
Title: Re: Request: Looping Lock Tone
Post by: neoterran on May 03, 2006, 10:16:11 pm
this might be kind of annoying don't you think ?
Title: Re: Request: Looping Lock Tone
Post by: SeanP on May 03, 2006, 10:22:20 pm
I used to play X-wing vs TIE Fighter many many moons ago, and from that experience it proved to be a useful tool, having the missile lock loop - remember, you can replace that little dinky beep with a solid tone.  However, as aldo said, it's something that, if implemented, should definitely be made an option, as many will find it annoying.
Title: Re: Request: Looping Lock Tone
Post by: Backslash on May 04, 2006, 07:50:13 pm
Good point.  The trick would be to come up with a loopable non-annoying sound effect, preferably subdued.  The X-wing / TIE Fighter solid tone one was simple enough, quiet but unmistakable.

I think I could do the code for this eventually (still some learning to do about the involved sections), but for now let's discuss HOW to keep it optional.  Some table file, perhaps hud_gauges or similar?

Come to think of it, wherever we put this might be a good place to add also a new style of locking reticle, one that stays centered on the brackets but gets smaller on all four sides as it locks, much like Wing Commander.

No promises yet, I've got a lot of other stuff to do :p but it's interesting so I'll take a stab some time.

Oooh, and a super-long-range goal: how about different shaped reticles or lead indicators depending on the weapon selected?  :D  (I'm sure that would be a lot of work, so no guessing when... but wouldn't it be cool?)
Title: Re: Request: Looping Lock Tone
Post by: SeanP on May 04, 2006, 09:08:22 pm
1st point, since XvT is getting on in years (C 1997), the tone is very easily reproducible, and doesn't seem to have any sort of ill effects from any compression, I've posted the wave file here - http://www.wedgenet.us/TGT-LP-2.WAV - Opera users make sure to right-click and save as.  If this is outside of legal rights, feel free to edit out this line.

From this point forward, here's a disclaimer: though I'm trying, I'm afraid I'm not up to speed on where everything hides in FS2SCP or how everything works, so it's quite possible I'll make a completely inane suggestion.

For making it optional, would it be possible to implement the following?:
1. Include three new variables in the player file, for instance, bool looping_lock, string ll_string, and bool ll_override.  The first is pretty self-explanatory.  The second would be a filename inside of a data/sounds folder, which would allow the player to specify any sound he or she would like to use and allows the feature to be used on any ship/weapon which did not have this defined.  The third would allow a weapon or ship entry (depending on the implementation) to override the player-defined sound - which leads to part 2.

2. Create a new variable in either a ship or weapon definition called $looping_tone.  Whether this would call to sounds.tbl or straight to the file is not my decision (and, if my assumptions about the format are correct, it'd be to sounds.tbl).  This would allow mod-makers or whomever pleases to customize the interface even more, but since it works in conjunction with ll_override, the player could revert to his/her sound if he/she found the mod-maker's sound to be less than optimal.

As for the WC thing, I'm sure they'd appreciate that :P  I rather prefer the moving reticle now, as it kind of clues me in as to what I need to try to do to gain lock - or at least I think it does!

For the different reticles and such, speaking from the point of view of someone that can get through helloworld.cpp and not much else, wouldn't it be theoretically possible to define the texture/icon to use and the scale with which to use it from inside the weapon definition in weapons.tbl?  At that point I would think it'd be a relatively minor task of simply switching transparencies appropriately.
Title: Re: Request: Looping Lock Tone
Post by: taylor on May 04, 2006, 10:58:15 pm
1. Include three new variables in the player file, for instance, bool looping_lock, string ll_string, and bool ll_override.  The first is pretty self-explanatory.  The second would be a filename inside of a data/sounds folder, which would allow the player to specify any sound he or she would like to use and allows the feature to be used on any ship/weapon which did not have this defined.  The third would allow a weapon or ship entry (depending on the implementation) to override the player-defined sound - which leads to part 2.
Hell no.

2. Create a new variable in either a ship or weapon definition called $looping_tone.  Whether this would call to sounds.tbl or straight to the file is not my decision (and, if my assumptions about the format are correct, it'd be to sounds.tbl).  This would allow mod-makers or whomever pleases to customize the interface even more, but since it works in conjunction with ll_override, the player could revert to his/her sound if he/she found the mod-maker's sound to be less than optimal.
:wtf:

(sorry for the short answers, I hit my constructive criticism quota for the day. ;))


About the only way to do this properly is through sounds.tbl itself.  There is an option to say that a sound is 3d or not, the values being 0, 1 or 2.  Have it be 10, 11 or 12 for the same thing, but looping.  With minor changes to gamesnd.cpp and sound.h this can be easily done and not break anything for backwards compatiblity.  hudlock.cpp would then only need a few minor modifications to play looping or not based on game_snd->looping value status and to manage the looping sound if it is looping.  Rather simple, but I'm not going to do it so don't bother asking.  This kind of stuff is what the rookies are for. :)
Title: Re: Request: Looping Lock Tone
Post by: Trivial Psychic on May 05, 2006, 01:10:02 am
This is perhaps somewhat off-topic, and its not a request for anything specific I have in mind, but to open up an avenue to all mods.  Right now, all missiles supported by FSO are fire-and-forget, be them dumfire, heat or aspect seeking.  It might be useful to have some missiles where you have to keep a full target lock until the missile has hit its target.  It might be of use to TVWP to have missiles with more primitive tracking systems.
Title: Re: Request: Looping Lock Tone
Post by: CaptJosh on May 06, 2006, 10:22:40 am
Missile lock tone...how very...Top Gun.  I like the idea.

"I've got solid tone...Taking the shot...Alpha one, fox two!"
(Kenny Loggins: Danger Zone plays in background)

 :D :nod:
Title: Re: Request: Looping Lock Tone
Post by: Cobra on May 06, 2006, 03:00:26 pm
RIIIIIIDE INTO THE DANGER ZOOOOOONE!

in all seriousness, it should be optional. hardcore gamers like me can tell if we have a lock or not, although the solid tone is a nice touch. :)
Title: Re: Request: Looping Lock Tone
Post by: Woolie Wool on May 17, 2006, 12:10:07 pm
This is perhaps somewhat off-topic, and its not a request for anything specific I have in mind, but to open up an avenue to all mods.  Right now, all missiles supported by FSO are fire-and-forget, be them dumfire, heat or aspect seeking.  It might be useful to have some missiles where you have to keep a full target lock until the missile has hit its target.  It might be of use to TVWP to have missiles with more primitive tracking systems.
Why? We already have missiles that can track independent of the aircraft (AIM-120 AMRAAM, AIM-54 Phoenix), so why would the 24th century lack such weapons?
Title: Re: Request: Looping Lock Tone
Post by: neoterran on May 17, 2006, 12:27:44 pm
Well, you have to ask yourself, why would the 24th century require a human to aim lasers at a target either ? Because otherwise it wouldn't be a very fun game.
Title: Re: Request: Looping Lock Tone
Post by: Trivial Psychic on May 17, 2006, 12:27:57 pm
1- They have dumbfire weapons too, so why would you have dumbfire weapons if you can equip them with tracking technology?

2- You'd suspect that during the T-V War era, the GTA and PVN probably used weapons with inferior tracking capabilities to say the MX-50 and Interceptor, so a more complicated and less effective target tracking system for missiles would be a good way to simulate the lesser sophistication of weapons for that period.

3- Its a game.
Title: Re: Request: Looping Lock Tone
Post by: ARSPR on May 17, 2006, 01:16:58 pm
Well, you have to ask yourself, why would the 24th century require a human to aim lasers at a target either ? Because otherwise it wouldn't be a very fun game.

I do agree. "Realistic" combat flight simulators are usually quite boring because you just fire and forget. Old combat flight simulators (I remember old Red Baron) are much funnier. I mean what makes the sim funny is that you have to hunt down enemies. It isn't funny at all if my computer hunts while I watch.

If you want some explanation to make it realistic, you can say that enemies decoy systems are so powerful that it's very difficult to make a lock with computer aid, or something like that.
Title: Re: Request: Looping Lock Tone
Post by: Flaser on May 17, 2006, 03:04:02 pm
Well, you have to ask yourself, why would the 24th century require a human to aim lasers at a target either ? Because otherwise it wouldn't be a very fun game.

I do agree. "Realistic" combat flight simulators are usually quite boring because you just fire and forget. Old combat flight simulators (I remember old Red Baron) are much funnier. I mean what makes the sim funny is that you have to hunt down enemies. It isn't funny at all if my computer hunts while I watch.

If you want some explanation to make it realistic, you can say that enemies decoy systems are so powerful that it's very difficult to make a lock with computer aid, or something like that.

You never ever had a pair of phantoms bracketing you had you? (....or Eagles to compound the pain)
Realistic jetfighter engagements are far from the simplicity or intensity you depict.

Try Lock-On, it will be an eye opener.