luxtorpeda-dev / packages

Package build scripts and support for luxtorpeda client
https://luxtorpeda.org
zlib License
37 stars 28 forks source link

Engine Controller Support #529

Closed d10sfan closed 2 years ago

d10sfan commented 2 years ago

For using controllers in the engine itself, ensure that Steam Input is enabled, that a gamepad profile has been set, and that the Steam Input controller-specific option has been enabled, such as for Xbox or Playstation controllers.

Controller Default Config Improvements To-Do

Jpxe commented 2 years ago

I can test controller support if you want. What information do you need?

d10sfan commented 2 years ago

@ToughGuyKunio

Thanks! Mainly trying to see for each game the following:

If you have any findings of any of the engine games, feel free to comment here.

Jpxe commented 2 years ago

Here's a first quick test, using luxtorpeda runtime (using v37, got error trying to update from AUR) and a Dual Shock 3 controller. This is tested without using steam input, I will try that later.

Works out-of-the-box

Both controller, menus and steam overlay work great

Kinda works

Doesn't work

Not yet tested with steam input emulation

Other errors

d10sfan commented 2 years ago

@ToughGuyKunio Thanks for the information. Let me know what you end up finding out about steam input and their emulation mode as well.

ETQW requires you to manually put the demo in the right place.

Not sure on the other two errors you mentioned. If you could provide what Ion Fury is giving for the error you're seeing and any logs you can provide for tomb raider II.

Jpxe commented 2 years ago

I've made a spreadsheet where I or anyone can enter the results of the testing. I believe the included columns are what needs to be tested to measure good controller support, check it out and edit the spreadsheet or let me know if I should add something else.

Google spreadsheet link

d10sfan commented 2 years ago

Thanks that looks like a good starting point, I'll look through your list when I have a chance

Jpxe commented 2 years ago

Here's more info on the errors I got earlier

Enemy Territory: Quake Wars: I download the demo in steam, I launch it using regular proton and install it and punkbuster, then i enter the game folder, mkdir demo/ and then cp *.* demo/ and then run it with luxtorpeda. It still gives me "demo not in correct location error" so I guess I'm doing something wrong?

Tomb Raider II works, I just didn't get that engines GUI controls (down not working directly, having to press ctrl to select instead of enter)

Ion Fury opens the EDuke32 launcher, when I press start it crashes with "Error compiling CON files" Screenshot_ionfury

Jpxe commented 2 years ago

Here are the log files for every game that won't launch for me.

Jpxe commented 2 years ago

Do you want me to make separate issues for each engine/game perhaps? Let me know what you prefer :smile:

d10sfan commented 2 years ago

This is fine for now, I'll investigate the errors you're seeing when i have a chance.

d10sfan commented 2 years ago

@ToughGuyKunio

For ETQW, you have to download the linux demo and copy the files from it to the right location, that's what that error means. It's described further here: https://luxtorpeda-dev.github.io/

I'll look into the others ones soon.

Jpxe commented 2 years ago

For ETQW, you have to download the linux demo and copy the files from it to the right location, that's what that error means. It's described further here: https://luxtorpeda-dev.github.io/

Okay I got it to work now, thanks! Maybe you could clarify on the webpage that the demo should be downloaded outside of Steam, that's the part that confused me. Also I get black screen after applying settings, like your webpage states, but how do I exit in a way that the settings are saved? the resolution just goes back to low when i restart..

I've updated the spreadsheet with some more games, but I still have more to test.

d10sfan commented 2 years ago

@ToughGuyKunio

I added some additional detail for the ETQW issue and fixed the megaton script here: https://github.com/luxtorpeda-dev/packages/commit/292da912d3458e2e8110612047b42ee371a52e3c

So next time you run you should see that fix. I'll let you know once I have some more information on the rest. On ETQW, you may need to change the settings manually for them to take affect.

d10sfan commented 2 years ago

@ToughGuyKunio

By the way, if you could try to keep the log files to one launch attempt at a time (clearing the Terminal before launching is usually the easiest).

I like the look of your spreadsheet so far, if you could also add a column there if you needed to change the steam input or not to make it work (like switching it from keyboard to controller). Also, for the ones talking about custom steam input, did that mean you had to come up with a whole new layout because the default keys didn't match what was possible with the default keyboard/mouse input?

Jpxe commented 2 years ago

By the way, if you could try to keep the log files to one launch attempt at a time (clearing the Terminal before launching is usually the easiest).

Let me know if it's okay now

Runelite works ok for me, you may want to check the ~/.cache/.luxtorpeda folder for the app id and remove anything there, then try it again.

I removed the 1343370 folder in cache and tested it with "Test Build Luxtorpeda #88" - it downloaded runelite and then crashed. Here's the log: https://gist.github.com/ToughGuyKunio/ecd19ccf9c85f0be3925b8d1b8747a59 I also tested and ran RuneLite.AppImage manually from /home/zorlim/.local/share/Steam/steamapps/common/Old School RuneScape/bin/win64/ and it's there and it works, so something else must be going wrong.

Entropy Zero works fine for me. You could try adding the -novid command to the launch options, although it does not try to play a video for me. These lines are rather interesting. The runtime should mean that there isn't any difference in the environment, so that might mean that you're missing some files somewhere.

 Error 10 occurred attempting to play video file media/bmannew.avi
 Error 8 occurred attempting to play video file media/valve.avi

I uninstalled Entropy Zero, manually deleted the folder from Steam, re-installed and added -novid. It launches to the menu and then crashes. Here's the log: https://gist.github.com/ToughGuyKunio/dc4740c1e9523324d95f174e11a6bfdf

Should I try reinstallting Source SDK maybe?

For Resistance Element, this looks like the log for eduke32, so there should be a different one. Although that error seems to indicate that you are missing files.

I re-installed Resistance Element. It launches to a Half-Life 2 menu, but there's nothing when I press new game. Here's a new log: https://gist.github.com/ToughGuyKunio/d7186dfa6e880668c89f03d80f1913f0 Screenshot attached. Screenshot_20211109_111231

Launching the game with regular Proton 6.3-7 gives a error msg about missing gameinfo.txt, found some info on it here: https://developer.valvesoftware.com/wiki/Missing_GameInfo.txt - I'll try testing some things out and see if I can figure it out.

Ion Fury is fixed, updating to the latest eduke32 fixed that issue.

Ion Fury works for me now.

Retroninja game should be fixed by: 8fb5ba8

Works for me now.

I like the look of your spreadsheet so far, if you could also add a column there if you needed to change the steam input or not to make it work (like switching it from keyboard to controller). Also, for the ones talking about custom steam input, did that mean you had to come up with a whole new layout because the default keys didn't match what was possible with the default keyboard/mouse input?

Okay I'll try adding that. Mostly you can get by using wasd+mouse template and then add some missing buttons and lower the mouse sensativity.

Jpxe commented 2 years ago

I think I've found the issue with Resistance Element. It had created two folders, one called ResistanceElement and one called resistanceelement - all lowercase. By copying the files from one to the other it started working. So I guess it's an issue with Linux being case-sensitive and Windows being case-insensitive? Is it possible to make the runtime case-insensitive?

Jpxe commented 2 years ago

Got a bit further on Entropy Zero, there's a file called startupvids.txt - it contained the following rows:

media/BmanNew.avi
media/Valve.avi

but the actual files are not avi. instead they are .bik, by changing content in the textfile to .bik the videos started playing fine, but it still crashes after that.

New log: https://gist.github.com/ToughGuyKunio/5930509106df4537c3a06119ebac2429

d10sfan commented 2 years ago

@ToughGuyKunio

What file system do you have?

For resistance element, there's a check already in the script for one folder or the other (https://github.com/luxtorpeda-dev/packages/blob/master/engines/source-sdk-2013/assets/resistance-element/run-resistance-element.sh#L138). I've never seen it where there's both. Can you uninstall it, remove every file in the directory and then install it again, picking Luxtorpeda? Then before launching anything, take a screenshot of your directory listing.

It's hard to tell what's going on in the Entropy Zero case, it works fine for me and it's running inside the steam runtime inside runtime soldier, so your system shouldn't affect, but do you have 32-bit libraries installed, such as any graphics ones and the like?

It is looking for ./run-runelite-extract.sh: line 4: ./RuneLite.AppImage: No such file or directory "RuneLite.AppImage", so did you verify if the file is there and with that name? Can you take a screenshot of your directory listing?

Jpxe commented 2 years ago

What file system do you have?

EXT4

For resistance element, there's a check already in the script for one folder or the other (https://github.com/luxtorpeda-dev/packages/blob/master/engines/source-sdk-2013/assets/resistance-element/run-resistance-element.sh#L138). I've never seen it where there's both. Can you uninstall it, remove every file in the directory and then install it again, picking Luxtorpeda? Then before launching anything, take a screenshot of your directory listing.

Screenshot_20211109_144125

It's hard to tell what's going on in the Entropy Zero case, it works fine for me and it's running inside the steam runtime inside runtime soldier, so your system shouldn't affect, but do you have 32-bit libraries installed, such as any graphics ones and the like?

Yes 32-bit should be installed

It is looking for ./run-runelite-extract.sh: line 4: ./RuneLite.AppImage: No such file or directory "RuneLite.AppImage", so did you verify if the file is there and with that name? Can you take a screenshot of your directory listing?

Screenshot_20211109_143844

d10sfan commented 2 years ago

@ToughGuyKunio ok for resistance element, that looks normal. Try launching now and see if it works. Then take another screenshot of the structure if not.

Jpxe commented 2 years ago

Resistance Element works now! Hmm maybe it's depended on if you run it with Proton or Luxtorpeda the first time?

d10sfan commented 2 years ago

@ToughGuyKunio most likely since wine is probably handling some case insensitive issue that windows normally brings. So it sounds like it works as long as you launch it from luxtorpeda first.

d10sfan commented 2 years ago

@ToughGuyKunio I can't replicate that issue you're having with runelite. You may want to change the script as a test to do echo $PWD as part of it's processing (you can edit the one in the cached xz file in ~/.cache/luxtorpeda/appid). That would tell me more about what might be happening.

For Entropy Zero, you may want to try the same thing you did for resistance, where you remove everything, uninstall, and then launch it with lux.

Jpxe commented 2 years ago

@d10sfan

Okay I don't think I understand completely but I did it like this:

cd ~/.cache/luxtorpeda/1343370/
tar xJf runelite-1343370-2.tar.xz    

That created a folder called dist/

I edited the run-runelite.sh from dist/ to include echo $PWD

I ran the script ./run-runelite.sh

Here's the output:

./run-runelite.sh                                                                                              ✔ 
/home/zorlim/.cache/luxtorpeda/1343370/dist
chmod: cannot access 'RuneLite.AppImage': No such file or directory
./run-runelite.sh: line 5: ./RuneLite.AppImage: No such file or directory

I then copyied the run-runelite.sh to /home/zorlim/.cache/luxtorpeda/1343370/ (where the appimage is located) and there it ran fine.


I found a solution!

I opened /home/zorlim/.local/share/Steam/steamapps/common/Old School RuneScape/bin/win64/ and then i ran ./run-runelite-extract.sh from the terminal. That created a squashfs-root folder that wasn't there before and then it launched Runelite. After that it works in Steam

Jpxe commented 2 years ago

@d10sfan

as for Entropy Zero I tried the following:

  1. Uninstall from Steam
  2. Removed Entropy Zero folder from ~/.local/share/Steam/steamapps/common/
  3. Removed 714070 folder from ~/.cache/luxtorpeda/
  4. Checked that it was set to Luxtorpeda in steam
  5. re-downloaded
  6. run
  7. still crashes at menu
##### swap interval = 0     swap limit = 1 #####
Ignoring out-of-date shader cache (glbaseshaders.cfg) with root key glshadercache
Could not find base GL shader cache file
Could not load program cache file glshaders.cfg
Could not find user GL shader cache file
Precache: Took 2 ms, Vertex 0, Pixel 0
ConVarRef mat_dxlevel doesn't point to an existing ConVar
server.so loaded for "Half-Life 2"
crash_20211110111719_2.dmp[26362]: Uploading dump (out-of-process)
/tmp/dumps/crash_20211110111719_2.dmp
crash_20211110111719_2.dmp[26362]: Finished uploading minidump (out-of-process): success = yes
crash_20211110111719_2.dmp[26362]: response: CrashID=bp-34758c40-c4ed-47af-b2a6-40b5c2211110
crash_20211110111719_2.dmp[26362]: file ''/tmp/dumps/crash_20211110111719_2.dmp'', upload yes: ''CrashID=bp-34758c40-c4ed-47af-b2a6-40b5c2211110''
/home/zorlim/.local/share/Steam/steamapps/common/Source SDK Base 2013 Singleplayer/hl2.sh: line 67: 26258 Segmentation fault      (core dumped) ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
d10sfan commented 2 years ago

@ToughGuyKunio

For runelite, the idea would be that you would put that edited file back in the xz file and then have it run through luxtorpeda. That will see where it thinks it is running, which may help to diagnose it.

For Entropy Zero, you may want to make sure you're on source sdk 2013 beta, other than that, not sure what could cause that. Let me know if you end up finding any fixes for t hat.

Jpxe commented 2 years ago

@ToughGuyKunio

For runelite, the idea would be that you would put that edited file back in the xz file and then have it run through luxtorpeda. That will see where it thinks it is running, which may help to diagnose it.

Here's the output:

run: "./run-runelite-extract.sh" with args: [] []
run-runelite-extract is at
/home/zorlim/.local/share/Steam/steamapps/common/Old School RuneScape/bin/win64
./run-runelite-extract.sh: line 6: ./RuneLite.AppImage: No such file or directory
pid 48849 != 48847, skipping destruction (fork without exec?)

For Entropy Zero, you may want to make sure you're on source sdk 2013 beta, other than that, not sure what could cause that. Let me know if you end up finding any fixes for t hat.

Switching to the beta fixed the issue

d10sfan commented 2 years ago

@ToughGuyKunio

See if replacing the script in the archive with the following fixes it:

#!/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$DIR"

chmod +x RuneLite.AppImage
LD_LIBRARY_PATH="" ./RuneLite.AppImage --appimage-extract
./squashfs-root/RuneLite
Jpxe commented 2 years ago

Didn't work

installing: runelite-1343370-2
install: "run-runelite-extract.sh"
install: "run-runelite.sh"
install: "runelite-1343370-2.tar.xz"
copying: RuneLite.AppImage
dropping: "/run/user/1000/luxtorpeda/1343370.pid"
sending close to run context thread
run: "./run-runelite-extract.sh" with args: [] []
pid 7203 != 7202, skipping destruction (fork without exec?)
./run-runelite-extract.sh: line 7: ./RuneLite.AppImage: No such file or directory
pid 7206 != 7202, skipping destruction (fork without exec?)
./run-runelite-extract.sh: line 8: ./squashfs-root/RuneLite: No such file or directory
pid 7207 != 7202, skipping destruction (fork without exec?)
run returned with exit status: 127
Jpxe commented 2 years ago

I've finished testing most of the lux games I have. In preparation for the Steam Deck I've also added the tests from the Steam Deck Verified partner page and also "simultaneous mouse and gamepad support" that seem useful to people with steam controller (and propably steam deck).

Some stuff like "text is legible" have to wait until I get the Steam Deck. Also some fields are not filled in yet, because I've made changes in what I've tested along the way. All the games and engines where tested with the Dual Shock 3 controller, It would propably be useful to test with an Xbox controller and Steam Controller/Steam Deck as well.

Most engines doesn't seem to support native controller, at least not with Dual Shock 3, so I guess there's not much that can be done with configuration file changes. Would it be possible to change steam input from luxtorpeda? That could be useful.

d10sfan commented 2 years ago

@ToughGuyKunio

Thanks for that, that's looking really good. I'll investigate to see if it may be possible to automatically mess with steam input, and see what's possible in terms of any default configurations that have good controller support.

I'll eventually have some controller support notes on the compatibility list page, so this will help alot to get that started.

For the runelite issue, let me know if you end up figuring out a version of the script that works out of the box. Since I can't replicate, it'll be difficult for me to fix.

Jpxe commented 2 years ago

The Switch Pro Controller works as expected with Steam input disabled. When it's enabled the d-pad jumps two rows at a time and it also sometimes brings up the on-screen keyboard.

Here's the output with "Switch Pro configuration support" and "Use Nintendo button layout" enabled:

On the second test it also brought up the on screen keyboard for some reason.


As for the button layout and order, I think it should be either:

Nintendo and Steam uses the first one, Steam can enable the second one when steam input is enabled. My suggestion would be to use the first one as default and maybe allow the second one to be configured like you said on discord.

d10sfan commented 2 years ago

@ToughGuyKunio

Moved your comment here for progress: https://github.com/luxtorpeda-dev/luxtorpeda/pull/122

d10sfan commented 2 years ago

To give an update on this, my plan is to work on the following once I have some time:

d10sfan commented 2 years ago

I've added a cloud icon with this commit: https://github.com/luxtorpeda-dev/packages/commit/352c7a1f5ede7d97ba562e54dd66a526eb3608f3

So far, this only shows if a game supports cloud saves in general or not. Eventually, this will also be added to for the games that do support cloud saves, whether or not the engines provided can interface with that in some way.

I'll be looking at controller support in the future as well.

d10sfan commented 2 years ago

@Jpxe Thanks for the help with the controller support investigation.

I've added metadata for controller support and the web UI (https://luxtorpeda-dev.github.io/) now reflects it. The icon is based on the default controller support for the game and the engine's support. Clicking on a different engine will change the icon. There's the following states for controller support (hovering over the icon will describe it):

The ones with manual in-game settings are where there will be improvements in the future, to try and provide default configurations with valid controller configurations, such as with quake or gzdoom. Any help would be appreciated if anyone wants to help out with that as well. Also, let me know if any of the information does not look correct.

d10sfan commented 2 years ago

Improvements for the Quake engines:

https://github.com/luxtorpeda-dev/packages/commit/2706bc5d6fa51a04bf681e173ef7175cc57c26cc https://github.com/luxtorpeda-dev/packages/commit/21c160cdcc52eb3441c8607cd281801097aab4e6 https://github.com/luxtorpeda-dev/packages/commit/889277c0c7ba62a9a30442488866afdb8d22abd7

d10sfan commented 2 years ago

yquake2 - https://github.com/luxtorpeda-dev/packages/commit/3c0f11a0ea986fe579533db91a1ffe7ccb4132c9

d10sfan commented 2 years ago

Additional improvements for yquake2 - https://github.com/luxtorpeda-dev/packages/commit/516288298400872f5a2c695d68d3b3415c777f2c

gzdoom: https://github.com/luxtorpeda-dev/packages/commit/0023b9e1942d2e19fd954a552f57429a0556f4f2 https://github.com/luxtorpeda-dev/packages/commit/24a4add8132035dd83a31330113a8b3044ee3a54 https://github.com/luxtorpeda-dev/packages/commit/bbc358f55caf51d2fb0a7e2542c998eb783d7f91 https://github.com/luxtorpeda-dev/packages/commit/7e78df388154e969d3e273e55c2c4aadd6999a05

raze: https://github.com/luxtorpeda-dev/packages/commit/dbfd48534133da1a90df1e7eb31e29207bbfcdb7

d10sfan commented 2 years ago

Implemented the configurations and the icons should be accurate towards that. Thanks for the help those who commented here. If anyone has an issue with controller support, feel free to comment here.