Cross-Platform Startup Window

Moderator: GZDoom Developers

User avatar
Kinsie
Posts: 7402
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33

Cross-Platform Startup Window

Post by Kinsie »

This has been a point of contention for quite a while, so it deserves its own thread. From the SIGIL Feature Request thread, with less relevant stuff edited out.
Graf Zahl wrote:TBH, the entire IWAD selector has become something of a sore spot to me - it's a cluttered mess. This has come to the point that these days I have placed most of the IWADs outside of GZDoom's search path, namely those I do not need for launching PWADs. But even this is too much IMO. In order to load certain PWADS, the IWAD needs to be in the search path - and if it is in the search path it will get shown in the IWAD selector. Worse, there's one more thing that forces itself in here in a way I don't like, and that's the GOG and Steam installations. There's no way to disable these, e.g. for a custom game that ships the engine with its own IWAD. Since such a switch needs to be outside the config file I have no clue how to add it.

So no matter, from where I start GZDoom with whatever setup, there's always that godforsaken IWAD selector listing 'game xyz' (which is supposed to be there) and my Steam based Strife Veteran Edition's IWADs.
Rachael wrote:I agree there, fully, but I have never been a UX designer. I'd be one of those idiots who use electron for the whole thing - not because I love electron (I really don't), but because it'd be the only way I know how to do it. I don't have experience with anything else, and it's always been too bothersome for me to learn it.

This is something where people from multiple platforms need to come together and decide on a standard, and we also need a way to bring it into reality. What we have is unacceptable. Mac has an IWAD list and a command line on their IWAD window. Unix/Linux just has an IWAD list and nothing more. Windows has actually everything except the command line on its IWAD window. Wild inconsistencies across the board, and there's just no real way to unify the code base right now so that a change that happens for one platform is reflected on the other 2(.5?).

Again - this is just something I do not have enough experience in to make any qualified decisions on it.
Graf Zahl wrote:The big problem here, of course, is, that there's no lightweight cross-platform GUI abstraction. The only ones I consider usable (Qt and wxWidgets) are multi-megabyte pieces of bloat that want to take over the entire app logic. Everything else I've ever tried tries to play cheap and as a results looks like garbage.
Another issue, not listed here, is that the unique startup sequences (Heretic, Hexen, Strife) are currently Windows-only and often have weird hardcoded format limitations (for example, the utterly-unholy-by-modern-standards image format used for Hexen startups). A more platform-independent implementation would pave the way to making things more flexible.

As mentioned above, this has been an issue for quite a while, but there hasn't been a lot of movement on it. In part because it's not a "sexy" part of the engine that attracts much attention from players or modders, and in part because getting everyone on the programming side of things to agree on a cross-platform GUI toolkit is a bit like asking everyone on the programming side of things to decide between Vim and Emacs. There needs to be a more focused debate between programmers from multiple platforms (Paging _mental_ and Marisa...) to try and find some form of common ground that can be acted upon, so that this ugly little slice of the engine can be whipped into a more easily-maintainable shape.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49183
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Cross-Platform Startup Window

Post by Graf Zahl »

I'm all with you here - the main issues standing in the way have to do with some very old design decisions ZDoom made, e.g. delaying the video init until the last possible moment, so when the title screens run there is no hardware accelerated surface available and to run the startup log in a system defined control instead of one's own VGA screen that can be rendered onto the 3D window. In short: Before we can even THINK about cleaning all this up, first we need to find a way to handle the system's log output and uncouple it from RichEdit on Windows or whatever else it uses on macOS and Linux. Because unless this is redone in a more platform independent manner, it will become a serious obstacle for the rest of it.

That's also why I never touched this code.

The IWAD picker is yet another story on its own. If there was a decent ready-to-use GUI toolkit that wouldn't bloat the executable size to insane proportions, it'd be easy, but such a thing does not exist.
User avatar
Caligari87
Admin
Posts: 6191
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him

Re: Cross-Platform Startup Window

Post by Caligari87 »

Would there be any way to rearrange the engine startup to allow a minimal "ingame" menu before IWADs and PWADs are loaded? Basically a GZDoom-native picker instead of an OS-native popup picker. (maybe showing the load list as well)

8-)
User avatar
Rachael
Posts: 13793
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: Cross-Platform Startup Window

Post by Rachael »

That's not a bad idea. The only issue is someone will have to design all the widgets and fonts GZDoom would need, since it would not be possible to use game resources before one is loaded.

Definitely good for a community project, though.

(edit: Actually, the fonts are already taken care of, via the VGA BIOS/franken font)
User avatar
Caligari87
Admin
Posts: 6191
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him

Re: Cross-Platform Startup Window

Post by Caligari87 »

That's what I was thinking of. Mostly just text, maybe a generic GZDoom splash and logo and some predefined icons for each IWAD in zd_extra.pk3 (Assuming that can be loaded before game resources are selected).

Hell, it's not like the IWAD selector uses any graphics anyway, so an "in-engine" text-only menu would already be more coherent and unified than what we have now, even without graphics.

8-)
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: Cross-Platform Startup Window

Post by Marisa the Magician »

I have to agree with Graf. There really isn't any sufficiently lightweight cross-platform toolkit for this.
User avatar
Enjay
 
 
Posts: 26573
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Cross-Platform Startup Window

Post by Enjay »

I'm sure some people would object to it going but, honestly, I don't find it useful at all and would be quite happy for it to be removed. I launch everything via ZDL, shortcuts or bat files and I only ever see the IWAD launcher when I don't want to (e.g. starting a stand alone game and seeing the option to play GoG games).

A well set up launcher program does everything that the IWAD picker does and more.
gramps
Posts: 300
Joined: Thu Oct 18, 2018 2:16 pm

Re: Cross-Platform Startup Window

Post by gramps »

I wouldn't miss it either. It's basically just a reminder that I either forgot to type `-iwad` or forgot to specify an iwad in my own pwad. I almost always close it and fix one thing or the other so it won't pop up next time.

If I didn't usually have a shell open, I'd probably create a bunch of shortcuts like "gzdoom.exe -iwad doom2" and drag mods onto those to play them. So maybe another option could be a simple installer that locates the iwads and creates the appropriate shortcuts (I suspect you'd really only need this on Windows).
User avatar
Kinsie
Posts: 7402
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33

Re: Cross-Platform Startup Window

Post by Kinsie »

I'd definitely miss it, as while I use ZDL a lot, I usually run singular mods/mapsets by using a custom "Run in GZDoom..." option I added to the right click context menu. It's pretty slick!
gramps
Posts: 300
Joined: Thu Oct 18, 2018 2:16 pm

Re: Cross-Platform Startup Window

Post by gramps »

That's not a bad idea, but wouldn't it be even better (or at least just as good) to have a menu option for each iwad, maybe all in a submenu, so you could skip the popup? That would be a pretty typical (optional) thing for an installer to set up, and would be more convenient than poking around in the registry or SendTo folder.
User avatar
Kinsie
Posts: 7402
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33

Re: Cross-Platform Startup Window

Post by Kinsie »

Caligari87 wrote:Would there be any way to rearrange the engine startup to allow a minimal "ingame" menu before IWADs and PWADs are loaded? Basically a GZDoom-native picker instead of an OS-native popup picker. (maybe showing the load list as well)
This has a number of pros and cons that I can see.

CONS:
  • Would likely require a lot of engine retinkering to enable a "pre-game" state where a game hasn't been loaded, and new archives and data can be loaded in while the engine is running.
  • Would require reinventing a lot of wheels and basically writing a whole new UI toolkit that no other project is likely to use.
  • Would be very easy to make dog-ugly unless either serious effort is put in by UI/UX designers (of which there aren't many around here), or additional tech is added to emulate certain elements of the existing startup windows (truetype fonts etc.)
PROS:
  • Would get consistent results across all platforms
  • Could reuse stuff from the game side of the engine for special startups
  • Additional launcher-style capabilities could be added during the process
  • UI tech created for it could be potentially made available for usage in mods in some form
  • Could be an excuse to enable changing mods/iwads at runtime ala Quakespasm's "game <foldername>" console command.
In short, it'd take a whole lotta heartache. Whether that's worth it or not when there are hordes of other much desired features (vulkan, client/server etc.) begging for man-hours is up for debate...
gramps wrote:That's not a bad idea, but wouldn't it be even better (or at least just as good) to have a menu option for each iwad, maybe all in a submenu, so you could skip the popup? That would be a pretty typical (optional) thing for an installer to set up, and would be more convenient than poking around in the registry or SendTo folder.
Maybe for some people? Feels a little fiddly to me, though. But I guess workflows are very personal things...

(Also it only took me like two minutes to set up with an old freeware tool, so...)

Either way, I don't think removing the launcher and outright requiring users to work with a third-party launcher for multiple-IWAD setups is a good idea. It'd be kind of a step-back, to be honest. Making it (and the auto-search of Steam/GOG installs) a compile-time option or an option in gzdoom.pk3 would make sense, though.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49183
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Cross-Platform Startup Window

Post by Graf Zahl »

If we do a GUI on OpenGL this should use an external library. Designing this ourselves would be too time consuming.
User avatar
JPL
 
 
Posts: 523
Joined: Mon Apr 09, 2012 12:27 pm

Re: Cross-Platform Startup Window

Post by JPL »

Anyone familiar with imgui and have opinions on its feasibility? https://github.com/ocornut/imgui
Dear ImGui is a bloat-free graphical user interface library for C++. It outputs optimized vertex buffers that you can render anytime in your 3D-pipeline enabled application. It is fast, portable, renderer agnostic and self-contained (no external dependencies).
Personally I think the default styling of its GUIs look pretty good for being obviously non-native.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49183
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Cross-Platform Startup Window

Post by Graf Zahl »

That thing isn't bad - my main gripe is that it's using that stb_truetype library for text output which is entirely useless when having to consider localization and font substitution for missing characters (i.e. I don't think it can support Korean easily in combination with other languages.)

It's really too bad that there is no good cross-platform text formatting library to be found.
gramps
Posts: 300
Joined: Thu Oct 18, 2018 2:16 pm

Re: Cross-Platform Startup Window

Post by gramps »

NanoGUI looks like a good retained-mode alternative: https://github.com/wjakob/nanogui

Not sure what font library they use, though. My favorite font library is currently freetype-gl: https://github.com/rougier/freetype-gl

It probably has the cleanest font rendering I've seen. Missing characters probably wouldn't be an issue if a comprehensive font like BitstreamVeraSans is included, though.

Honestly, though, I'm not sure it's really the job of a program to help the user run it with a valid combination of arguments. This still sounds like a job for an installer or launcher to me.

Return to “Closed Feature Suggestions [GZDoom]”