Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: The E on September 29, 2022, 11:27:54 am

Title: Time to head back into the lab!
Post by: The E on September 29, 2022, 11:27:54 am
or: The Assassination of the Hero wmcgui by the coward The E

Okay, so, one thing that has been a constant source of annoyance with the lab has been the fact that the UI toolset used to build it (wmcgui, a toolset created by WMCoolmon back in the olden days) was lacking in a few things (namely, scrollable controls).
I have found a solution to that in the form of a library called Dear ImGui (https://github.com/ocornut/imgui), which is a pretty well-established industry standard for building non-skinned interfaces in games for debug purposes.
So I started rebuilding the lab using it.

(https://media.discordapp.net/attachments/223511391531827200/1023585067743842344/screen0035.png)

But here's the thing.

Because Dear ImGui is built on a very different paradigm, I had to throw away literally all the code for the old dialogs, meaning I have to rebuild it all from scratch, and that is as good a time as any to rethink a few things.

As you can see by the screenshot above, I've already remade the render options dialog and organized the various switches and things into new categories. That was the easy bit. I am now in the process of rebuilding the entire dialog structure related to objects, and I kinda want to make this a bit more useful than it currently is by adding more table info and putting in convenience functions like subsystem highlighting (in this current iteration I am using a debug function to draw a sphere over the selected subsystem, this will look better when it's done):

(https://i.imgur.com/66KwZsy.png)

What else would you like to see, beyond the current functionality of the lab and a few already existing feature requests like LOD switching or tech room model displays?
Title: Re: Time to head back into the lab!
Post by: Iain Baker on September 29, 2022, 02:10:27 pm
Damn fine coffee work there.  :) :yes:

If you are taking requests, then may I suggest:

1) Better controls for positioning the ship would be very welcome. In particular, the ability to drag and drop the whole ship in three dimensions so you can focus and zoom in on a specific section. (Basically what you can do in p3d.in)

2) Capital ships being able to fire their weapons would also be extremely cool, and potentially quite useful. If this could include a fully-3D positional virtual target for them to shoot at (actually two - one a virtual capship, one a virtual fighter) this might be handy for highlighting any 'turrets shooting through their own ship's hull' issues, *cough* Raksashsa *cough* and identifying blind spots in turret coverage. This could be helpful for mission designers, and could serve as a form of training aid. "Ah, so THAT'S how I can approach an (INSERT) without getting skewered by AAA or pummeled by flack." or "Now I know where all those bloody missiles are coming from ;-) "
Title: Re: Time to head back into the lab!
Post by: 0rph3u5 on September 29, 2022, 03:39:54 pm
2) Capital ships being able to fire their weapons would also be extremely cool, and potentially quite useful. If this could include a fully-3D positional virtual target for them to shoot at (actually two - one a virtual capship, one a virtual fighter) this might be handy for highlighting any 'turrets shooting through their own ship's hull' issues, *cough* Raksashsa *cough* and identifying blind spots in turret coverage. This could be helpful for mission designers, and could serve as a form of training aid. "Ah, so THAT'S how I can approach an (INSERT) without getting skewered by AAA or pummeled by flack." or "Now I know where all those bloody missiles are coming from ;-) "

That wouldn't even require a practice target - just a function for the turret to shoot on a vector, and maybe some output if said vector is in the turret's FOV
Title: Re: Time to head back into the lab!
Post by: EatThePath on September 29, 2022, 03:47:27 pm
I'll second Iain's second thing, especially when I come around to incorperating all the lighting profiles controls to a debug panel it would be very useful to be able to have a big ship fire weapons, or just have a ship and weapons fire coexist at all.

A button somewhere for Qaz's envmap dump feature would be good

Weapons in general are hard to preview in the current lab, especially anything that uses trails.

Fireball testing might also be handy.
Title: Re: Time to head back into the lab!
Post by: Mito [PL] on September 29, 2022, 03:55:24 pm
FOV cones for turrets?
Title: Re: Time to head back into the lab!
Post by: mjn.mixael on September 29, 2022, 05:37:41 pm
Turret fire would be useful. I know that has a whole set of complications, though.
Title: Re: Time to head back into the lab!
Post by: The E on October 01, 2022, 10:04:12 am
Ever wanted to look at a table entry while in FSO?

(https://i.imgur.com/rRiNbta.png)
Title: Re: Time to head back into the lab!
Post by: Admiral Nelson on October 01, 2022, 10:18:22 am
That is super useful!
Title: Re: Time to head back into the lab!
Post by: Trivial Psychic on October 01, 2022, 11:16:06 am
Will it identify which tbms are currently overriding which entries?  FRED does this by just tacking on the tbm data at the bottom.
Title: Re: Time to head back into the lab!
Post by: The E on October 01, 2022, 11:24:24 am
Will it identify which tbms are currently overriding which entries?  FRED does this by just tacking on the tbm data at the bottom.

This is using the same method to generate the consolidated table entry that FRED uses, so yes.
Title: Re: Time to head back into the lab!
Post by: Nohiki on October 02, 2022, 01:49:56 am
This is sort of begging to have an edit function as well, if not the file itself, then loaded data in the game memory or however that works. It would make balancing a bit easier if one could tweak the values on the fly and then screenshot the final settings (or export if you're feeling generous) instead of quitting the game, making the edits and relaunching. Not sure about the feasibility of this.
Title: Re: Time to head back into the lab!
Post by: The E on October 02, 2022, 03:31:28 am
This is sort of begging to have an edit function as well, if not the file itself, then loaded data in the game memory or however that works. It would make balancing a bit easier if one could tweak the values on the fly and then screenshot the final settings (or export if you're feeling generous) instead of quitting the game, making the edits and relaunching. Not sure about the feasibility of this.

That would be cool, it's even somewhat feasible, but for the sake of being able to get this finished in a reasonable timeframe I'm going to veto that one.
Reason is that Ship_info (the internal struct that ship table entries get parsed into) and Weapon_info (the analog thing for weapon classes) are both very big structures, and creating editors for every value in them is extremely time-consuming.

Similarly, adding a table edit function is also more complex than it might initially seem. I can see some possibility to do this, especially given the recent merge regarding the load_last folder structure, but it too is something that we can look into once the major rewrite is done.

And speaking of that rewrite, the thing I am currently looking into is camera controls: There are some 3D object and view manipulation gizmos (https://github.com/CedricGuillemet/ImGuizmo) available as an imgui extension that look very appealing....
Title: Re: Time to head back into the lab!
Post by: The E on December 08, 2022, 01:51:22 pm
Despite appearances, this idea isn't dead yet! It just got held up in a mess of me being depressed, then breaking an arm; but there is progress!

In fact, I would very much appreciate it if people out there could give this test build (https://www.dropbox.com/s/p2rijegrlkf16yx/new%20lab%20builds.7z?dl=0) a whirl: It is not feature-complete yet, but should be enough to give all y'all an idea of the direction I want to go into with this thing.