Author Topic: Internal Cockpit - Need HUD Layout Feedback  (Read 59320 times)

0 Members and 2 Guests are viewing this topic.

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: Internal Cockpit - Need HUD Layout Feedback
I could probably give the console screens a background of the standard menu backdrop - the faint greebly thing. I can't really put much else in without it likely overlapping something in an ugly way.

And UT: Yeah - there's a fair bit of screen area down there already (see the first pic in the thread) but probably not enough to fit everything. :\
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Woolie Wool

  • 211
  • Fire main batteries
Re: Internal Cockpit - Need HUD Layout Feedback
How about a very faint grid of green lines for the backdrop?
16:46   Quanto   ****, a mosquito somehow managed to bite the side of my palm
16:46   Quanto   it itches like hell
16:46   Woolie   !8ball does Quanto have malaria
16:46   BotenAnna   Woolie: The outlook is good.
16:47   Quanto   D:

"did they use anesthetic when they removed your sense of humor or did you have to weep and struggle like a tiny baby"
--General Battuta

 

Offline BloodEagle

  • 210
  • Bleeding Paradox!
    • Steam
Re: Internal Cockpit - Need HUD Layout Feedback
In what way? 'X', '\', '/', '-', '|', or '+'?

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Internal Cockpit - Need HUD Layout Feedback
As to the widescreen (and ratio) dependancy - yeah it's a problem, but again I don't have the means to solve it. We need a coder.

You need a gimmick to get a coder. Coders are always in short supply 'round here, as everything is quickly becoming dated by 'modern' standards. (Take a look at Prey - meanwhile, we can't even get intrasystem warping implemented properly, you need a FRED hack to do it. Don't even mention bumpmapping, shaders are IIRC slated to maybe appear in another year.) There is nothing innovative to attract people, nothing that makes people go "Cool, I want to see how they did that!" or "Cool, I'd love to help out with the AI system, it's so flexible." The last major thread I read about attracting new coders, the guy suggesting a post got shouted down by everyone because he suggested adding new capabilities rather than bugfixing. (The argument being that the engine is so broken/outdated that the new capability couldn't even be added without a lot of bugfixing)

There's the chance that people will crawl out of the woodwork and volunteer to clean up other people's messes because they want the experience it will get them. But, it's very unlikely. Most people seem to want to help out because they see something cool.

So here's my roundabout point. If you get what you want, a coder who visits these forums, somebody else loses out on what they want. Bumpmapping gets pushed back another month. Multiplayer changes get shelved for 3.6.10. One of the big TCs can't implement a critical feature, because the coder who's supposed to be doing it is working on your changes.

The solution: Figure out a way to bring in more resources, or make the gain outweigh the cost. This could be learning to code, figuring out a way to attract coders, figuring out a way to make the HUD without hardcoding. Or you could try to ally yourself with a larger project who might also be interested in the feature you're requesting, whose success could lead to the recruitment of further coders (or who might have 'in house' coders willing to work on it).

"Nothing in life worth doing is easy".
« Last Edit: August 14, 2007, 09:42:38 pm by WMCoolmon »
-C

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: Internal Cockpit - Need HUD Layout Feedback
Err, you make it sound a bit like I'm whinging about there not being a coder who is jumping up and down to work on this - I know there isn't and I'm not really worried. :)

Basically I was looking over the past cockpit implementation argument threads and found that it usually ended with something along the lines of 'build us a cockpit to use, and we'll code it' from a few different people.

So; I've done the freespace version of a cockpit model and texture for use with the FSU project. I know UT has a Viper cockpit in store for BTRL, and if mods like the SWC or WCSaga want to use cockpits I'd imagine they'll all support any coder willing to do the work out a cockpit system.
I know there are portions of the community who do want to see cockpits like this, so I'm quite sure it will come in eventually - which is why this is a 'HUD layout' thread and not a 'Pwese code in cockpits now!' thread. ;)

As such, this cockpit is basically for the community rather than because I want cockpits. Heck, I would originally have been one of the peeps to turn them off. :p (After working on this for the weeks that I have though, I've changed my mind about that. I think it does improve the immersion factor.)

As for the other options, I am currently trying to learn scripting, and I do have every intention of learning C++ eventually. However, remember that we're also somewhat short on HTL modelers/UVmappers/texturers - which are all areas where I've focused my attention over the past years, and so can have more of an impact.
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Cobra

  • 212
  • Snake on a Cain
    • Skype
    • Steam
    • Twitter
Re: Internal Cockpit - Need HUD Layout Feedback
If I could pound it into my thick skull I'd help, but C just looks like a jumble of integers and variables. Yet for some reason I feel like I have some level of understanding it. :wtf:
To consider the Earth as the only populated world in infinite space is as absurd as to assert that in an entire field of millet, only one grain will grow. - Metrodorus of Chios
I wept. Mysterious forces beyond my ken had reached into my beautiful mission and energized its pilots with inhuman bomb-firing abilities. I could only imagine the GTVA warriors giving a mighty KIAAIIIIIII shout as they worked their triggers, their biceps bulging with sinew after years of Ivan Drago-esque steroid therapy and weight training. - General Battuta

 

Offline Unknown Target

  • Get off my lawn!
  • 212
  • Push.Pull?
Re: Internal Cockpit - Need HUD Layout Feedback
Coders are always in short supply 'round here, as everything is quickly becoming dated by 'modern' standards. (Take a look at Prey - meanwhile, we can't even get intrasystem warping implemented properly, you need a FRED hack to do it. Don't even mention bumpmapping, shaders are IIRC slated to maybe appear in another year.)


Semi OT, but wow, that comment made me realize for the first time that FS2 is, well, old.

 

Offline Woolie Wool

  • 211
  • Fire main batteries
Re: Internal Cockpit - Need HUD Layout Feedback
In what way? 'X', '\', '/', '-', '|', or '+'?
A grid of straight vertical and horizontal lines, like graph paper.
16:46   Quanto   ****, a mosquito somehow managed to bite the side of my palm
16:46   Quanto   it itches like hell
16:46   Woolie   !8ball does Quanto have malaria
16:46   BotenAnna   Woolie: The outlook is good.
16:47   Quanto   D:

"did they use anesthetic when they removed your sense of humor or did you have to weep and struggle like a tiny baby"
--General Battuta

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Internal Cockpit - Need HUD Layout Feedback
the way i see it virtual cockpits only require at most a few minor features. view code, a few more script accessible vars, and rtt fixes. with the way im picking up programming il probibly be releasing builds of my own features by next year (that is assuming i can find the time).
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

 

Offline Samuel

  • 23
Re: Internal Cockpit - Need HUD Layout Feedback
Hi,

I just recently stumbled across FreeSpace 2 and absolutely loved it. The space-sim genre has pretty much died in favor of yet another RTS or FPS, so when I stumbled upon this gem I was very happy indeed  :)

I would like to contribute to the project coding wise and I'm still busy familiarizing myself with the code. I'm looking for things to work on and was actually wanting to work on the AI, but having read this thread and seeing that Vasudan Admiral is devoting time to actually drawing cockpit views etc. I would like to try to help out to get the cockpit views implemented.

Quite a few ideas were raised, in terms of how the cockpit views should be implemented. From a fish-eye projection onto a computer player's helmet, to a 3-d holographic projection, to a mouseview system where one can look around the cockpit... and then also some kind of drawing created by an artist that gets overlayed(If I understand correctly, this is what you have done Vasudan Admiral? Or is your cockpit some kind of 3D model? ).

The initial idea I had, was to have each gauge to be a picture that can be arbitrarily placed anywhere on the screen, with some sort of scripting or table editing to specify the coordinates of the gauges. Additionally, I thought that the gauges could be animated and that certain events such as increasing speed, trigger animations (by for example moving to the next frame for an animation) for that particular gauge. The process of bringing  up a communications window for example, could also be an animation albeit a very short one.

What are your thought on that idea?

The problem comes in when you want to have a mouseview in all directions. A fisheye projection of the above gauges etc is a possible solution, but the problem of drawing the main reticle still remains. The reticle can't move along with the visor unless the guns actually move along with the person. A possible solution is to not draw the reticle unless the player is facing the front (with some tolerance).

Personally, I think we should not start off being to ambitious. We should only worry about mouseviews and the like once we can refractor the code so that the placement of new cockpit textures and the scripting thereof is sorted out. Once the basics are in place, then the code can be refractored some more to include new ideas.

I think that once we start seeing some small successes, perhaps more momentum will fall behind this endeavour.



 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: Internal Cockpit - Need HUD Layout Feedback
:welcome:

Another coder would be fantastic. :D
As to the cockpit, since this thread there's been another in the SCP forum: http://www.hard-light.net/forums/index.php/topic,50537.0.html

By the looks of it, 3d cockpits and the appropriate HUD display changes are indeed either planned or in development, so you'd need to ask a coder about where that's up to. According to Taylor, the initial goal is just going to involve the ability to specify a separate cockpit model from the ships table for each ship. In the long run, it will involve being able to render individual HUD elements onto a texture which is then applied to that cockpit model. Doing it that way would allow for correct mouselook views. (Not sure how the system would handle HUDs that have half of the elements done the old way and half on RTT though).

I'm sure everyone would greatly appreciate any help you could provide with any of the planned features. :)
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Backslash

  • 29
  • Bring Our Might To Bear
Re: Internal Cockpit - Need HUD Layout Feedback
Samuel, thank you SO much for bumping this thread, because I never saw it!

Quite a few months ago, even before this thread began, I started work on expanding the hud_gauges.tbl code (originally by WCSaga's request).  I didn't want to say anything yet because I was focusing on the new gliding system and a few other things.  Then in August my RL work began sucking the life out of me, and I kind of vanished from the forums for a while.  Then I had some hardware troubles and nearly lost all my code, but with some clever use of recovery utilities and virtual machines I ended up saving most of it this month.

Long story short: I'm working on expanding the "old method" of the hud_gauges.tbl code and am making progress again!  As Nuke said, it's a lot of unexciting code, but it is not too complicated and I can do it, so I am.  So far I have mostly done:
-the directives (as well as a "$Max Directives:" setting, hooray)
-the talking head window
-the target box and stats
-the flashing threat gauges
-the reticle and arc frames (not the throttle yet)
Halfway done with the radar, but it's being stubborn.  Not looking forward to the complicated weapons selection gauge.

Vasudan Admiral, could you make available those ammo/fuel gauges in some form?  I wanna put them in .ani format for um... testing :D  [it wouldn't be testing anything NEW because weapon / afterburner energy already works in the hud_gauges.tbl ;)]  I'd do it now except I don't know what they look like empty...

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: Internal Cockpit - Need HUD Layout Feedback
That's great. :D
My desktop is currently mid-render so it'll have to wait till that's done, but I'll put them together as soon as I can. Do you want the HUD elements each as a set of images that matches how the current guages are set up? Ie, one frame for each 'incriment' of the speed indicator?
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Backslash

  • 29
  • Bring Our Might To Bear
Re: Internal Cockpit - Need HUD Layout Feedback
That'd be perfect.  Like that they would already work as drop-in replacements, since those gauges are already in the code.  No rush -- it's just eye candy as I fiddle around with the rest of the stuff.

Hey you OTHER coders out there, testing this stuff would be a bit easier if we had a command-line way to immediately launch a specific mission ;)

An interesting observation:  Turns out the retail code doesn't use the hi-res images for the escort, directive, comm window, minishield, and target box gauges.

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: Internal Cockpit - Need HUD Layout Feedback
lol, that's interesting - I suspected something was amiss when I was first making these templates. I pasted all the high res ones over a template hud screenie, and then was like 'Hey....they don't fit.'
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 

Offline Samuel

  • 23
Re: Internal Cockpit - Need HUD Layout Feedback
Having read the thread

http://www.hard-light.net/forums/index.php/topic,50537.0.html

I see that the decision is to move away from a fish-eye kind of effect, to complete 3D models for cockpits which would then allow a mouseview inside it. I'm not sure how it is planned, but I anticipate that most of the current code (the current way of doing HUD's) is going to be ripped out. It also looks like a long term goal (6-9 months), and since Backslash has already expanded the flexibility of the current HUD method, perhaps it would be worthwhile to finish this before we embark on the long term goal of 3D cockpits. This would at least give modders a little more flexibility and the look of the game could be enhanced quite a bit, while we work on the more long term 3D cockpits.

What is your view on it backslash? I'm sure you wouldn't want all your work to go to waste ;)





 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Internal Cockpit - Need HUD Layout Feedback
The current HUD code is a mishmash of animated clipping, multi-frame animations with individual frames overlaid over each other and gamma-controlled to show information, and other very interesting but somewhat obscure tricks.

I really think if you do anything with the HUD, you should aim to go far beyond what's in there now. The HUD is such a total waste of potential, because there's a lot of great bizarre gauges you could do with a little 2D knowledge and some 3D functions. It also practically hasn't been changed since Freespace 2 was released...even though the majority of it simple 2D functions. It's hard to deal with "the HUD" because it's so scattered and intertwined with the rest of the code, and incredibly hardcoded to boot. (Just check out the section of the code where it deals with the options screen for adjusting the brightness and settings of the various gauges....yuck.)

I wouldn't mind seeing any of that being changed. The current hud_gauges stuff is mostly a hack that tries to get around the convolutedness of the current code by just defining values to replace the ones that the original code uses. But it's not expected to be real consistent or flexible. If you add a 'text' field to the shield gauge, where ought it go? Should it be the same color? What font should it use? What coordinates should it use - relative to the gauge, relative to some corner of the screen, relative to another gauge? Pretty soon you have enough options to use a significant number of variables and require a lot of code to deal with, none of which is really supported by the current HUD.

I think one way of dealing with this would be to define a standardized method for dealing with screen events that might impact the HUD, then develop some way of piping these events into gauges. That would be a ***** to do properly, but could be done cleverly...for example, a pipe to a text object generator that's connected to an autoscroller, so that the end result is to copy the current messaging window. That sort of thing would let you do HUD stuff in C space, rather than scripting or SEXP space, so you could work with what was coded in more efficiently.

Another route to go is with predefined gauge types (eg variable-height image, variable-transparency image, text, etc) whose attributes are settable via scripting, or SEXPs.

I think the base thing, though, is that I would hate to see something designed that's based on the current HUD. If it's flexible enough people will redesign the retail HUD. In fact, that's kind of ideal, because then you could distribute the scripting or configuration or whatever-file to people and they could tweak something that they're already familiar with. You could include it with the code, so you didn't have to rely on the hardcoded stuff and wouldn't have two separate ways of doing the same thing. Actually, I do think it's possible to convert a lot of the hardcoded stuff to use dynamic gauge names and such that would still be compatible with all missions.

Anyway, it's painful to me to read those threads because people get all worked up about things. "We're going to add in separate cockpit models" - that's about 15 lines of code. "We need to rip out the current way of doing cockpit models because it's stupid" - that's about 25 lines of code. The crux of that is 1 line in an if statement's conditional, the rest is just dealing with resetting the clipping plane and the code to toggle it from the table. Now, when you talk about all the nice little spoofs, showing damage and stuff, then you can add enough features to your heart's content and add as many lines of code as you want.

And when you talk about 3D hud gauges, you're talking about something else entirely different from 3D cockpits.

That last thread especially really bugs me because it should not take 6-8 months to implement separate cockpit models. It probably literally took me longer to write this post than it would take to implement that feature. The only saving grace is that taylor talks about adding in LOD scaling and other nice features like that.

So detailed summary:

3D Cockpits as separate models:
So easy that it's not even worth talking about anymore. I think after I finish this post, I'm just going to do it because I'm sick of people talking about it.

3D HUD Gauges:
Also pretty easy. Freespace already has functions for drawing dots and lines and stuff in mission space for use with FRED. And obviously it can draw models in mission space too. So with a little use of model_find_world_point and some code in ship_render, after the ship- and cockpit- rendering stuff, you render your 3D gauges and presto! You can look around the cockpit and you have fixed 3D gauges (fixed relative to the ship, not to your view) floating in the air. If you're not happy with that, you just ignore the zbuffer and render them on top of whatever's there, and you can get 3D hud items much like the ship models in the targeting computer.

HUD gauges on 3D cockpits:
bm_make_render_target. bm_set_render_target. Render gauge to your heart's content. bm_set_render_target(-1). Replace a texture on the 3D cockpit model with the render target texture. Rinse and repeat. (In fact you don't have to repeat bm_make or the texture replacement, just keep the texture handle around and re-render to it every time)

Another HUD management system:
Priceless. And this is where the pain starts. Actually rendering 3D HUD gauges is already possible. But this is where you have to figure out how you're going to let the modder connect the data to the HUD gauges, and you have several options that involve tradeoffs between ease of use vs potential vs processing power.

This would be a perfect place for dual core stuff, in fact it may be the only place in Freespace 2 that dual core stuff would be practical to add, because the display is mostly passive and if it's off by even a half-second nobody cares.

You also have to figure out how to handle the retail HUD gauges. Are you going to leave them hardcoded and rewrite a completely new system that ignores the old code? Are you going to leave them hardcoded but integrate them into the new system? Or are you going to write the new system and then rewrite the retail gauges using the new system? How are you going to handle the options screen? What aspects will you give users to control vs modders vs mission-makers? Will you let any of these groups control what another group can do?

Will you allow interactivity with the HUD? How? Mouse/joystick/keyboard/TrackIR/speech?

How will you let people specify where HUD gauges go? Percentages? Pixels? Or will you let them use both? How will you let people specify if they need a hud gauge to move around, or be offset from a 3D object that may or may not be on the screen at a given time (eg the missile lockon indicator).

OK, I'll stop there so I don't scare you off. If I haven't already. ;)
-C

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Internal Cockpit - Need HUD Layout Feedback
And...time! (Working test completed)

Hmm...so about an hour. Although I did implement a scripting variable too, I couldn't resist. :p

EDIT:
The implementation

Basically it displays a model using the current FOV, assuming that the camera is located in the exact center of the model. I've added padlock & slew view support, as well as an 'offset' parameter.

What does concern me a bit is that right now, I'm resetting the projection matrix to get the right clipping distance. From what I understand from taylor, this is costly in terms of time. If I don't set the projection matrix, it will force all cockpit polygons to be at least 1 meter from the camera at all times, which would probably break scaling.

EDIT 2:
Release
« Last Edit: December 30, 2007, 09:32:59 am by WMCoolmon »
-C

 

Offline Samuel

  • 23
Re: Internal Cockpit - Need HUD Layout Feedback
Thanks for you valuable input WMCoolmon. The freespace community is very fortunate to have someone of your calibre on the team, not only because of your coding talent and knowledge of the source code (1 hour lol!!!) but because you have an incredible knack of presenting the issues and problems in a very clear and concise manner.

I'd like to pick your brain a little more on this issue  ;)

Another HUD management system:
 From your discussion, clearly this is the way forward. You point out the different possibilities and the various design decisions that have to be made. I'm very new to the source code, and also don't know what process you as developers follow. So my question is: who is going to make some of those key design decisions? Is it up to the person who decides to tackle this? Is the design discussed in the internal forum? I think whoever starts working on it would do well with periodic feedback from you or others who are more experienced.

Personally, I think that the HUD management system should be totally redesigned and the existing HUD reimplemented in the new system. You have already alluded to the benefits of this. Firstly it will make debugging the system easier since we KNOW what and how things are supposed to function. Also, the resulting scripts, tables or whatever will make more sense to modders since they know how the existing HUD behaves and could act as a sort of tutorial for the new HUD management system.

To summarize, my key question is can you offer some way forward for someone who wants to help code the new HUD system.
 

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Internal Cockpit - Need HUD Layout Feedback
Thanks. :)

Whoever designs the system generally gets ultimate power in the design. The only hard limitations are that you maintain backwards compatibility - so the existing HUD uses the same external media files and acts the same way in-game as it does now - and don't degrade overall performance in backwards compatibility mode.

Since you're not in the SCP, the code will probably be scrutinized before it's committed, so if there are obvious mistakes or serious improvements that could be made, you'll probably be asked to attend to them before it's added. Most likely these would all be related to performance/stability. If there are issues people have with the design, they might complain, but I doubt your code would be outright rejected over opinions over design.

So as far as a way forward, it's entirely up to you up until you decide that the code is submitted to be committed to CVS. You might want to fix some bugs or add some small features to get familiar with the code before you embark on a project as large as this. You'll probably want to make new .cpp and .h files for the main portion of the code, and familiarize yourself with def_files.cpp so you can add the default table when you're ready.

You might want to do a little design first before you start a thread devoted to talking about the system, so that people have something more concrete to talk about.

You'll probably want to start coding from the unstable branch, since that will be the base for future SCP releases in the longer-term. You should familiarize yourself with SEXPs, if you haven't already, look over the basic table parsing functions and check out the scripting section of the code. hudparse.cpp could also be valuable. There's actually portions of an incomplete alternate HUD system in there under the NEW_HUD defines, besides the hud_gauges stuff. It's not well-commented but I can probably explain anything you have questions about.

And finally, you should know about the HUD gauges already implemented in the HUD, so you know the minimum feature set you need to implement. :p Stuff like the comm menu, for instance, will require responding to keyboard events and knowing the key bindings.
-C