Modding, Mission Design, and Coding > The Scripting Workshop

The HUD (Discussion)

(1/8) > >>

WMCoolmon:
Since this is what kicked off scripting in the first place, what are people's current plans or thoughts regarding redesigning the HUD with scripting in FS2_Open?

Wanderer:
Well for 3D HUD.. to be honest unless (certain) current HUD elements can be 'extracted' into scripting and from there via RTT put back on screen a full scripting HUD is going to be pretty massive and probably pretty slowly running monstrosity given that everything that is used in the HUD would have to be rewritten in Lua..

As for 2D.. an option to 'allow' graphics to be drawn 'beyond' the screen limits would be welcome as otherwise moving hud elements either have to be restricted into working only in 'center region' to avoid odd element disappearance (left/top edges) or scaling events (right/bottom edges).

Some new 'gauges' have been tested and also used in some measure (though afaik not in mods or tcs.. just locally either by me or Nuke).. I have made something simple like 'escort reticle' and 'bomb reticle' both to highlight respective objects ingame without actually targetting them.

Snail:
How about 3D targeting brackets? The lead indicator's throwing me off my aim because my HUD is "crapped out."

Nuke:
i havent worked on my hud much lately. but one thing is for certian, we need alot more vars. if experimented with drawing 3d gauges using drawTechModel(), i think. its been awhile sence ive scripted anything. been busy with work and stuff, sisters moving in in a couple weeks and all the preparations are eating up all my time.

3d gauges through drawTechModel can be rather cumbersome, as that was designed for tech room interfaces and loadout screens. not actual hud use. it requires table entries for any models used. also the system for manipulating orientations for the models is kinda wierd. id rather just be able to give it a matrix. id like to be able to give it a pof file directly rather than use up table space. actually a 3d hud element object would be nice with fields such as .Model, .Texture, .ori and so on. should be streamlined to be as fast as possible. defining objects in lua is incredibly slow so having it done in c makes it faster.

im also concerned with the time it takes to render a fully functional hud. ive had cases where calling too many un/rotateVector() functions droppedme to 15-30 fps (on a 8800gts, where i usually get 75). this case was using my remote turret funcs on a deimos, so it called unrotate 6 times per turret, every frame. most of the time this can be avoided but if youre doing something like a custom radar, where you need to call rotateVector() multiple times in a loop, it could drop you to a slide show.

2d huds can probibly be sped up my using more bitmap elements to reduce loops requiring alot of math (drawing curves uses alot of trig functions). bitmaps also look better. is far as 2d rendering goes i think we got everything we need. target boxes can be drawn easily in lua, as we can get an objects radius and distance. though a size on screen var would be better, as it would more accurately conform to the ship's footprint on your screen.

another annoyace is that getScreenCoords doesnt return offscreen coordanates. i want to draw flightpath boxes on the hud (like the kind you see in frontier, orbiter, some flightsims) which indicate a path you must follow. parts of theese boxes may only be partly on the screen in some cases and i still want to draw lines that are at least partly visible. you can also render a scripted subspace node or any line based representations of 3d objects on the hud.

i also want to do rtt panels and animated controls, some of which ive done already. the rtt stuff has given me problems though, usually not working and slowing the game down.

id like to see more hud table-scripting integration. main reason would be to be able to mix and match c based gauges with lua based ones. say i want to keep the com menu, but rework everything else. or what if rendering a radar in lua is too slow and i need to use the orb radar.

takashi:
how about repositioning, redisining? i would like a directive box that looks like a post-it note.

Navigation

[0] Message Index

[#] Next page

Go to full version