Realm667 / WolfenDoom

"WolfenDoom - Blade of Agony" | Important: This is only meant for development and testing purposes. You are NOT ALLOWED to use material from this repository for your own projects. Important: This repository is for development and testing purposes, you are NOT ALLOWED to use the copyrighted material for your own projects without our permission!
http://boa.realm667.com
253 stars 27 forks source link

[3.2] [Launcher] Multiplayer compatibility for v3.2 #550

Closed Gadgetdan closed 3 years ago

Gadgetdan commented 3 years ago

The Launcher didn't had Polish as alternative language.

mgrinzPlayer commented 3 years ago

Can you check how does it look when I turn off "DPI awareness" and "LCL scaling" I will also try Lazarus 2.0.12 (currently I'm using Lazarus 2.0.10 as the main IDE)

I will upload it here, few minutes (or not :) ) from now.

mgrinzPlayer commented 3 years ago

three binaries: dpi thing.zip

madame-rachelle commented 3 years ago

exe 1: https://i.imgur.com/rUMGowG.png

exe 2: https://i.imgur.com/BZMMmEn.png

exe 3: https://i.imgur.com/4Z8IwRQ.png

mgrinzPlayer commented 3 years ago

OK. Looks like procedure AdjustComboboxSize I wrote has to be executed later. My fault.

Something I just noticed, compiled with Lazarus2.0.12, combobox acts weird, when you click "Displacement" combobox, other comboboxes will refresh itselfs. So, I recommend using "Lazarus 2.0.10" instead of "Lazarus 2.0.12".

mgrinzPlayer commented 3 years ago

https://github.com/mgrinzPlayer/BoaLauncher/releases/tag/demo5

Tormentor667 commented 3 years ago

Looks better now, can you reduce the blank space at the right?

grafik

mgrinzPlayer commented 3 years ago

It is based on language list taken from ipk3 file. I didn't include the ipk3 file in my release files. I will re-upload it with that fake ipk3 file, so you can test it outside WolfenDoom project.

Edit: done. There should be Blade.of.Agony.Launcher+ipk3.7z

Tormentor667 commented 3 years ago

I actually meant the empty space right to the “Exit” button, sorry for not being clearer :)

mgrinzPlayer commented 3 years ago

In your screen-shot, I know that languages are not loaded. I recognize it by Lang combobox small size. Re-download and try again.

mgrinzPlayer commented 3 years ago

https://github.com/mgrinzPlayer/BoaLauncher/releases/tag/demo6

96dpi obraz

Don't know how it looks in higher DPI.

When I set to 175% I only see this: obraz

You can test. Also I made some tests myself. Having 44 addonds will cause addon scanning time (with image searching and loading) to be about 6 to 10 seconds.

Tormentor667 commented 3 years ago

I will test this tomorrow evening, just didn’t have time currently unfortunately

mgrinzPlayer commented 3 years ago

OK. As you can see from my screenshots above, there're still "Description:" and "Requirements:". I want to add "Credits:". Do you want them removed or they can stay?

About this comment: https://github.com/Realm667/WolfenDoom/issues/550#issuecomment-831813450 Do you better background idea? Pixelart? Maybe we can use some textures from the game? Or maybe scrap that idea and keep it as simple as possible? Currently I'm using standard controls from default LazarusIDE.

AFADoomer commented 3 years ago

I would add the credits, but use varied formatting and spacing as a way to show different types of content instead of including the labels. I would also limit the images to icon-sized - maybe 128x128 at most.

For the background image, honestly, I'd like to see just a shorter (in height) graphic header, with more usable space for the controls at the bottom.

Something like this on top: Header

Maybe with detail/displacements/language/dev commentary down the left side and a dedicated add-on frame to the right - we want to highlight these in the 3.1 release, not hide them, right? - and the start/exit buttons at the bottom.

Here's a quick mock-up I pasted together: Mock-up

Not perfect, but I think captures the substance of what I'm suggesting.

Feel free to disregard. Just my thoughts. 😄

EDIT: Is there a way to select more than one add-on at once? Some may not be compatible, but many could be played together.

Tormentor667 commented 3 years ago

This is a very good suggestion by @AFADoomer - I like that approach!

mgrinzPlayer commented 3 years ago

and a dedicated add-on frame to the right - we want to highlight these in the 3.1 release, not hide them, right?

  1. I like this new rearrangement and the header. Can you paste link to the source or taking it from https://user-images.githubusercontent.com/16618820/117227415-5ecf8200-addc-11eb-9e61-22a81f13afbf.png is enough?

  2. will BoA3.1 release have addons included by default?

  3. maybe "scan for addons" button with different background color... I mean: the dedicated add-on frame to the right would not be visible by default. Clicking "scan for addons" will rearrange detail/displacements/language/dev from horizontal to vertical. Currently "scan for addons" clicked second time just hides the pane. I can scrap that second click and just gray it out or change to "refresh".

  4. we can add icon.png (with alpha channel) to the .boa. Clicking it will load preview images and show the bigger window with arrows (when more than one image).

  5. my target launcher width is 900. Of course it can be resized manually.

  6. keep in mind that language control width is based on widest uncommented language description string from: https://github.com/Realm667/WolfenDoom/blob/b79fb639420f319beef556194ee83d562257ce8b/menudef.txt#L730-L754

Tormentor667 commented 3 years ago

Regarding your questions, I can answer at least a few:

AFADoomer commented 3 years ago
  1. Yeah, the .png here looks like it uploaded fine. I can provide the .psd if needed.

  2. Yeah, that would work , I think. My thought was that we should have the add-ons showing at start to show them off, not hide them behind a button... But, either way

  3. That works. Plus an expanded info page means you can include less info in the add-in list, so more compact UI...

  4. Personally, I would make all of the selection controls the same length for uniformity and balance, but that's just me.

Tormentor667 commented 3 years ago

Agreeing with 4 as well

mgrinzPlayer commented 3 years ago

demo 7 (still WIP)

obraz

obraz

I added simple animation to the header image. Leave it?

My to-do list:

Is there a way to select more than one add-on at once? Some may not be compatible, but many could be played together

Didn't know it is possible... I think I can add this functionality later. Maybe "add-on multi-select" checkbox and creating a list...

mgrinzPlayer commented 3 years ago

I sent the link of my demo7 to my brother. I asked him to just launch the launcher and tell me what he sees on his 65″ 4K TV. He said the graphic header is too dark. Even just the image from this https://github.com/Realm667/WolfenDoom/issues/550#issuecomment-833165056 🤷

madame-rachelle commented 3 years ago

Yes, TV's and PC monitors exist in different color space because TV's are designed to provide higher contrast which are friendly to film and TV shows.

Essentially it's the same as running a PC monitor with a lower gamma.

This should not be a really big deal though - but I do worry that upping the gamma on that picture might make it look terrible on real PC monitors. And that is the audience we are targeting the most.

There is a way, using Photoshop, to apply gamma to an image while preserving its color vibrancy - and that is to duplicate the image in two layers, set the upper layer to "color" (which preserves hue and saturation), while running a Levels adjustment layer atop the lower layer, where the gamma can be adjusted in the adjustment layer.

This can still destroy the image, but it should be less likely to, and should give a little more wiggle room with playing with the gamma setting - and, perhaps, even lowering the input white to provide a little more contrast as well.

mgrinzPlayer commented 3 years ago

I forgot to mention, he tried few modes: "game", "movie" and "dynamic", still the image is too dark for him.

AFADoomer commented 3 years ago

Header2 Header3

Two more options...

madame-rachelle commented 3 years ago

I think the bottom one looks great. It might even work as a replacement graphic for the launcher.

Tormentor667 commented 3 years ago

I agree, the bottom one is perfect

Tormentor667 commented 3 years ago

demo 7 (still WIP)

I noticed that only the 32bit version uses the new interface design. 64bit is still as before.

mgrinzPlayer commented 3 years ago

when testing just the visuals, it doesn't matter if 32 or 64 bit. Both uses the same LCLWidgetType obraz obraz

mgrinzPlayer commented 3 years ago

By the way, it is possible to compile the same source files from my project under Lazarus under Linux (Debian, Mint).

It requires a dozen of additional lines in the source code (TProcess class instead of ShellExecute, but it can be handled with "ifdef windows" and "ifndef windows"). I think I can add another commit with those changes.

Here is my project compiled under "Linux Mint 20.1 Cinnamon 64-bit" (can be gtk2 or qt5): obraz Do you plan to release BoA Linux version? Package maker could add few more dependencies and we can add the launcher as well.

Binary which uses qt5 widgetset of course will require qt5 and one special package: "libqt5pas1".

madame-rachelle commented 3 years ago

It certainly can't hurt to have a Linux launcher. One of the reasons why I was switching to CEF originally was to have some sort of portability.

Tormentor667 commented 3 years ago

when testing just the visuals, it doesn't matter if 32 or 64 bit. Both uses the same LCLWidgetType

I can guarantee you it is not :)

2021-05-12_081336

mgrinzPlayer commented 3 years ago

I meant demo7 64 bit application will look the same as demo7 32 bit.

Tormentor667 commented 3 years ago

Now I get it :)

mgrinzPlayer commented 3 years ago

Demo 8

Changes compared to previous demo:

My to-do list:

Need some info about "more than one add-on at once". How do you properly load more? like this: -file boa1.boa -file boa2.boa -file boa3.boa

or maybe I should gather LOAD parts from gameinfo.txt from each selected .boa files, then create the list of all parts, then -iwad boa.ipk3 -file theList

Talon1024 commented 3 years ago

Need some info about "more than one add-on at once". How do you properly load more? like this: -file boa1.boa -file boa2.boa -file boa3.boa

When GZDoom sees the "-file" argument, it takes the rest of the arguments as filenames of mods to be loaded, until it sees another recognized argument. So, the correct way to use the file argument is: gzdoom -file addon1.boa addon2.boa addon3.boa

Do you plan to release BoA Linux version? Package maker could add few more dependencies and we can add the launcher as well.

BoA is already playable on Linux, and there are even Snap and Flatpak packages that Linux users can install in order to get set up right away. Having a launcher for the Linux version would certainly make it easier for Linux users to play BoA, however.

Tormentor667 commented 3 years ago

@mgrinzPlayer this is evolving greatly, awesome work so far! Do you need any help regarding the addons? (e.g. preparing icons?)

mgrinzPlayer commented 3 years ago

I see you use 512x512 PNG icon for boa.exe. If you want the better icons for both Launcher and boa.exe - you can prepare 16x16, 32x32, 48x48, 64x64 and 256x256 png files.

I will combine them into one .ico file with GIMP. PNG files will also be used by package makers. I'm new to creating snap packages, I will try creating it myself locally, based on https://snapcraft.io/boa (https://github.com/mcphail/boa/blob/master/snap/snapcraft.yaml) and will check if my launcher executes on freshly installed, with default options, LinuxMint20.1 Cinnamon on my VMware Workstation 16 Player.

From what I know, the small ones: 16x16 up to 64x64, are designed from the scratch to look good. Other icon sizes, bigger than 64x64, Windows will re-create from 256x256 version.

From what I see inside ResourceHacker by Angus Johnson, applications use many icons: Resource Hacker itself (it even uses other icon sizes like 20x20): obraz

Firefox: obraz

About the add-ons icons/previews.

I'm thinking about the {something to draw attention to the "scan for addons" button}. Maybe another checkbox with "scan for addons on launch" - it will be checked by default.

About combining addons, I'm thinking about making a simple list window which will look more or less like this: This is a "configure a toolbar window" in Lazarus. You choose from the left side and you can adjust the order. obraz

You can design icon/glyph for this window. Maybe a gun pointing to the left or right instead of arrows, gun taken from game textures folder. Up and down arrows also from the game?

mgrinzPlayer commented 3 years ago

and will check if my launcher executes on freshly installed, with default options, LinuxMint20.1 Cinnamon on my VMware Workstation 16 Player.

I found some time to try it under Linux and also to look what's inside snap package.

First I copied from first virtual machine, the one with Lazarus and many other packages installed, to the freshly default installation on my second virtual machine.

Then the only packages I installed were libqt5pas1, plus dependencies: libqt5printsupport5 libqt5x11extras5. They are needed for qt5 binary.

Then I used readelf on both qt5 and gtk libraries: obraz

(text) ``` mgrinzplayer@mgrinzplayer-second-virtual-machine:~/Pulpit$ readelf -d Blade_of_Agony_Launcher_gtk2 | egrep "NEEDED" 0x0000000000000001 (NEEDED) Shared library: [libdl.so.2] 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0] 0x0000000000000001 (NEEDED) Shared library: [libgdk-x11-2.0.so.0] 0x0000000000000001 (NEEDED) Shared library: [libX11.so.6] 0x0000000000000001 (NEEDED) Shared library: [libgdk_pixbuf-2.0.so.0] 0x0000000000000001 (NEEDED) Shared library: [libgtk-x11-2.0.so.0] 0x0000000000000001 (NEEDED) Shared library: [libgobject-2.0.so.0] 0x0000000000000001 (NEEDED) Shared library: [libglib-2.0.so.0] 0x0000000000000001 (NEEDED) Shared library: [libgthread-2.0.so.0] 0x0000000000000001 (NEEDED) Shared library: [libgmodule-2.0.so.0] 0x0000000000000001 (NEEDED) Shared library: [libpango-1.0.so.0] 0x0000000000000001 (NEEDED) Shared library: [libcairo.so.2] 0x0000000000000001 (NEEDED) Shared library: [libatk-1.0.so.0] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] ```

obraz

(text) ``` mgrinzplayer@mgrinzplayer-second-virtual-machine:~/Pulpit$ readelf -d Blade_of_Agony_Launcher_qt5 | egrep "NEEDED" 0x0000000000000001 (NEEDED) Shared library: [libdl.so.2] 0x0000000000000001 (NEEDED) Shared library: [libQt5Pas.so.1] 0x0000000000000001 (NEEDED) Shared library: [libX11.so.6] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] ```

Here both of them side by side (gtk2 on the left) obraz

There are small differences...

Personally I prefer the qt5 one. It looks closest to the windows version. And qt5 has better scaling: https://ibb.co/jgDCwM7 (gtk2) https://ibb.co/0nfHXtz (qt5)

About snap, I extracted boa_217.snap package.... and I think I have to find a good tutorial about creating/developing those. Maybe placing launcher binary next to boa,ipk3 would be enough - I think I only have to change execName to gzdoom and add a few tweaks (like for example "snapmode" argument).

Of course there's this thing:

#!/bin/bash

set -e

GAMEDIR=$SNAP_USER_DATA/saves_and_config
if [ ! -d $GAMEDIR ];
then
  echo "Game directory doesn't exist"
  echo "Creating directory"
  mkdir -p $GAMEDIR
fi

cd ${SNAP}/share/games/doom
${SNAP}/bin/gzdoom -iwad ${SNAP}/boa.ipk3 -file lights.pk3 brightmaps.pk3 game_widescreen_gfx.pk3 -config ${GAMEDIR}/boa.conf -savedir ${GAMEDIR}

Not 100% sure, I will have to analyze it more, we can change it to

#!/bin/bash

set -e

GAMEDIR=$SNAP_USER_DATA/saves_and_config
if [ ! -d $GAMEDIR ];
then
  echo "Game directory doesn't exist"
  echo "Creating directory"
  mkdir -p $GAMEDIR
fi

cd ${SNAP}/share/games/doom
Blade_of_Agony_Launcher_qt5 snapmode

then my launcher will execute:

gzdoom -config ${GAMEDIR}/boa.conf -savedir ${GAMEDIR}  {argumentsBasedOnUserOptions}
Tormentor667 commented 3 years ago

I see you use 512x512 PNG icon for boa.exe. If you want the better icons for both Launcher and boa.exe - you can prepare 16x16, 32x32, 48x48, 64x64 and 256x256 png files.

I just prepared a full set of icons for you here, is that okay? Icons for the launcher: icons.zip

Tormentor667 commented 3 years ago

Blade of Agony — Launcher.exe

Just a small thing: Can you replace the long dash with a normal "-" (minus)?

Tormentor667 commented 3 years ago

@mgrinzPlayer I prepared a new archive for you with all addons, screenshots and icons.

The screenshot is always a .jpg with the same name as the .boa, the icon is always a .png with the same name as the .boa - no need for a second or third screenshot. Can you work with that?

Addons with screenshot and icon: addons.zip

Tormentor667 commented 3 years ago

For those who want to see them in action: addon_behaviour addon_disable_hints addon_efficiency addon_grenades_only addon_instagib addon_lowres_models addon_m2hb addon_melee addon_more_weapons addon_movement addon_score addon_vampire

mgrinzPlayer commented 3 years ago

I was playing with the "snap technology" past few days. I only managed to launch the gtk2 version so far. What a mess - snap, snapcraft and the last and the worst thing from all of this: "multipass VM". Yesterday I launched "snapcraft" maybe 30 times... I don't know why my QT5 launcher doesn't work... Few times I managed to break something and this multipassVM refused to work. I had to start again from the scratch (packages for snapcraft and multipass are downloading with 200-300KiB/s on my 35MiB/s internet connection)

Obviously obraz I think I need a break from snap and snapcraft...

I will move to the "add-on multiselect" feature.

mgrinzPlayer commented 3 years ago

I just prepared a full set of icons for you here, is that okay?

I will try to do something with the smaller ones. From what I know, it is better to do it by hand and not just resize from bigger versions.

Just a small thing: Can you replace the long dash with a normal "-" (minus)?

Cosmetic. For linux versions I used those: Blade_of_Agony_Launcher_qt5 and Blade_of_Agony_Launcher_gtk2

But you can rename them to whatever you want... It won't break launcher functionality (filename is not hardcoded).

mgrinzPlayer commented 3 years ago

Question? All add-ons require starting new campaign? No exceptions?

mgrinzPlayer commented 3 years ago

demo 9, this time with altered .boa files from https://github.com/Realm667/WolfenDoom/issues/550#issuecomment-845282103

https://github.com/mgrinzPlayer/BoaLauncher/releases/download/demo9/Blade.of.Agony.Launcher.7z

todo:

obraz

mgrinzPlayer commented 3 years ago

I made multi add-on selection, simple first draft: obraz

But I have different problem. With simple launching boa.exe with those parameters (from windows command line): obraz -file addon_grenades_only.boa addon_lowres_models.boa

I see this in the console: obraz

Of course "Grenades Only" doesn't work because gzdoom didn't load addons\grenades_only.pk3 . Looks like loading .boa files doesn't work as intended.

Note: I didn't touch addons pk3 files, I didn't touch gameinfo.txt files inside .boa. I only added "preview" folder with images and addoninfo.txt for each.

With this: boa -file addons\grenades_only.pk3 addons\lowres_models.pk3 "Grenades Only" works.       Question. Is "Grenades Only" compatible with "Movement". I tried -file addons\movement.pk3 addons\grenades_only.pk3 only "Grenades Only" works -file addons\grenades_only.pk3 addons\movement.pk3 only "Movement" works

I'm doing something wrong?

mgrinzPlayer commented 3 years ago

demo 10 https://github.com/mgrinzPlayer/BoaLauncher/releases/download/demo10/Blade.of.Agony.Launcher.7z

obraz

Launcher now has it's own command (Linux version): -launcher_mainpath {pathToFolderWithSavesConfigsAndScreenshots}

will be translated into: gzdoom -config path/gzdoom.ini -savedir path/Save -screenshot_dir path/Screenshots -shotdir path/Screenshots' Snap/Flatpak/etc. makers can use this.

Plus, launcher (win/linux) takes care of other arguments. For example, Blade_of_Agony_Launcher_gtk2 +set vid_fullscreen false, last param will be passed to the gzdoom.

Username-N00b-is-not-available commented 3 years ago

@mgrinzPlayer Is it possible to localize the launcher, for example, show it in English/the preferred system language by default, but change the interface to the language which is currently selected (missing lines will be replaced by English ones)?

mgrinzPlayer commented 3 years ago

Lazarus provides such feature - https://wiki.lazarus.freepascal.org/Translations_/_i18n_/_localizations_for_programs

For now, I'm more concerned why "Grenades Only" and "LowRes Models" doesn't work together. Probably because gameinfo.txt from one add-on is concealed by gameinfo.txt from the other and that's why only one from this two: addons\grenades_only.pk3 addons\lowres_models.pk3 will be loaded.

For now, I think the only way would be to read info from gameinfo.txt files from all selected add-ons and combine it into one command line chain.

EDIT: updated demo10 (now multiselect window shows add-on title instead of file name)

EDIT2: Linux binaries: https://github.com/mgrinzPlayer/BoaLauncher/releases/download/demo10/Blade.of.Agony.Launcher.Linux.tar.xz

Blade_of_AgonyLaunchergtk2 depends on:

libatk1.0-0
libc6
libcairo2
libgdk-pixbuf2.0-0
libglib2.0-0
libgtk2.0-0
libpango-1.0-0
libx11-6

Blade_of_AgonyLauncherqt5 depends on:

libc6
libqt5pas1
libgcc-s1
libqt5core5a
libqt5gui5 or libqt5gui5-gles
libqt5network5
libqt5printsupport5
libqt5widgets5
libqt5x11extras5
libstdc++6
libx11-6

Zrzut ekranu z 2021-05-23 17-59-11 Zrzut ekranu z 2021-05-23 18-00-01

Tormentor667 commented 3 years ago

This is getting better and better, really good @mgrinzPlayer, it works like a charm and looks awesome :) For the model lowres addon you can use me as the one being credited for. For the explanation text you can use:

If you are a big fan of pixelated art and want to have all those high-resolution models adjusted to this blocky look, you might want to load these model textures with reduced texture resolution.