Skip to content

Commit

Permalink
feat: Add OBS Game Capture support (and tweak README.md)
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanViknar committed Jan 29, 2024
1 parent 84be422 commit 9bf5b6c
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 39 deletions.
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,27 @@

### Situation

I like [SteamTinkerLaunch](https://github.com/sonic2kk/steamtinkerlaunch), I like it a lot. In fact, I consider it to be one of the most important tools for Linux gaming.
I like [SteamTinkerLaunch](https://github.com/sonic2kk/steamtinkerlaunch). It is for me one of the biggest tools to have ever been created for Linux gaming.

However, it has always been flawed to me : it is *slow*, it is not comfortable to use, and the user interface is very messy.
However, it presents many flaws in my eyes : it is slow, impractical to use, and not user-friendly.

I want Linux Gaming to be for **everyone**. SteamTinkerLaunch, as a tool, ***fails*** to make itself easily usable by non-technical users.
I want Linux Gaming to be available to everyone, including any non-technical users. In my opinion, SteamTinkerLaunch's interface is not friendly to newcomers.

Finally, one time, my curiosity led me to look inside its source code, only to be met with a single Bash script containing 26 000 lines. At that point, I decided there should be an alternative to it.
Finally, my curiosity once led me to look inside its source code, only to be met with a single, extremely long (26k+ lines) Bash script. At that point, I decided there should be an alternative to it.

*And thus came SimpleSteamTinker...*

### Goal

*TL;DR : Simple, Fast, Modern & User-Friendly*
*TL;DR : Simple, Fast, Modern & Friendly*

SimpleSteamTinker aims right now to be only an alternative to SteamTinkerLaunch, not to replace it : I do not intend to implement the more complex features of it that the average user won't need.
SimpleSteamTinker aims to be only an alternative solution to SteamTinkerLaunch, not to replace it : the more complex features it provides that aren't used by the average user won't be implemented.

Using Lua, a fast and simple language, and Adwaita, a modern user-friendly interface system, the goal of this project is to have a clean and easy but *powerful* way of launching Steam games with custom options and tools.

It takes inspiration from [Bottles](https://github.com/bottlesdevs/Bottles) and Adwaita applications in general.

Additionally, I consider SimpleSteamTinker should work *with* Steam rather than hack/replace its features. Anything that can be easily done on the Steam side of things will not be implemented (Proton version management for example. If you want to use Proton-GE, I'd recommend [ProtonPlus](https://github.com/Vysp3r/ProtonPlus) or [ProtonUp-Qt](https://github.com/DavidoTek/ProtonUp-Qt)).
Additionally, it is considered SimpleSteamTinker should work *with* Steam rather than hack/replace its features. Anything that can be easily done through Steam will not be reimplemented (Proton version management for example. If you want to use GE-Proton, [ProtonPlus](https://github.com/Vysp3r/ProtonPlus) and [ProtonUp-Qt](https://github.com/DavidoTek/ProtonUp-Qt) are recommended).

And finally, as a side goal : prove that Lua can *also* be used for developing modern applications, just like for example Python (which I often see in Adwaita apps).

Expand Down Expand Up @@ -110,8 +110,8 @@ If, in the future, LGI becomes stable enough with GTK4 to use it directly to gen
| Development | SteamTinkerLaunch | SimpleSteamTinker |
| --- | --- | --- |
| Language | Bash | Lua |
| Code | 26k lines in a single file | Neatly organised in modules and commented |
| UI definitions | Mashed into the code | (Mostly) done in separate GTK Blueprint files |
| Code | A single file with 26k lines | Organised in modules and commented |
| UI | Directly generated by the code | (Mostly) done in separate GTK Blueprint files |
| Interface system | yad + GTK3 | LGI + GTK4 + libadwaita |
| License | GPL-3.0 | MPL-2.0 |

Expand All @@ -129,9 +129,9 @@ If, in the future, LGI becomes stable enough with GTK4 to use it directly to gen
| Pre-game launch window ||*(Not implemented to speed up game startup and not get in the user's way. Might change in the future.)* |
| Categories |||
| Custom default game config |||
| Game location | ~ *(separate button)* ||
| Game location | ~ *(impractical)* ||
| Compatdata location |||
| Help pages *(ProtonDB, PCGamingWiki, SteamDB)* | ~ *(messy to access)* ||
| Help pages *(ProtonDB, PCGamingWiki, etc.)* | ~ *(impractical)* ||

### Tools, settings, etc.

Expand All @@ -140,39 +140,39 @@ If, in the future, LGI becomes stable enough with GTK4 to use it directly to gen
| Features (tools, settings, etc.) | SteamTinkerLaunch | SimpleSteamTinker |
| --- | --- | --- |
| Non-Steam game support ||*([Bottles](https://github.com/bottlesdevs/Bottles) recommended)* |
| Proton version management ||*([ProtonPlus](https://github.com/Vysp3r/ProtonPlus) recommended)* |
| ~~Proton version management~~ ||*([ProtonPlus](https://github.com/Vysp3r/ProtonPlus) recommended)* |
| dGPU management |||
| GameMode |||
| Custom launch system || 🚧 *(Planned, high priority)* |
| Custom launch system || 🚧 *(Planned)* |
| Winetricks ||*(Planned ?)* |
| Protontricks ||*(Planned ?)* |
| Proton settings |||
| DXVK settings || 🚧 *(Planned)* |
| VKD3D settings || 🚧 *(Planned)* |
| MangoHud |||
| Gamescope |||
| Shader support (ReShade/vkBasalt) || *(Planned, low priority)* |
| Shader support (ReShade/vkBasalt) || 🚧 *(Planned)* |
| SDL Wayland video driver |||
| Zink |||
| PulseAudio latency || 🚧 *(Planned)* |
| Vortex |||
| Mod Organizer 2 |||
| HedgeModManager ||*(Planned ?)* |
| HedgeModManager |||
| geo-11 3D Driver |||
| SpecialK |||
| FlawlessWidescreen |||
| Stereo3D |||
| RADV Perftest Options ||*(Planned, low priority, cannot test properly due to lack of an AMD GPU)* |
| RADV Perftest Options ||*(Cannot test properly due to lack of an AMD GPU)* |
| Steam Linux Runtime toggle |||
| steamwebhelper toggle |||
| obs-gamecapture || |
| Nyrna |||
| ReplaySorcery |||
| Boxtron |||
| Roberta |||
| Luxtorpeda |||
| Network monitoring and control || |
| Discord Rich Presence || *(Planned, low priority)* |
| obs-gamecapture || |
| ~~Nyrna~~ || *(Waiting for Wayland support...)* |
| ~~ReplaySorcery~~ || *(Unmaintaned)* |
| ~~Boxtron~~ || *([ProtonPlus](https://github.com/Vysp3r/ProtonPlus) recommended)* |
| ~~Roberta~~ || *([ProtonPlus](https://github.com/Vysp3r/ProtonPlus) recommended)* |
| ~~Luxtorpeda~~ || *([ProtonPlus](https://github.com/Vysp3r/ProtonPlus) recommended)* |
| Network monitoring and control || 🚧 *(Planned)* |
| Discord Rich Presence || 🚧 *(Planned)* |

## Bug Reports / Contributions / Suggestions
You can report bugs or suggest features by making an issue, or you can contribute to this program directly by forking it and then sending a pull request.
Expand Down
Binary file modified assets/screenshots/ViewLight.ora
Binary file not shown.
Binary file modified assets/screenshots/ViewLight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion install/archlinux/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maintainer: JordanViknar

pkgname=simplesteamtinker-git
pkgver=r35.b0e0272
pkgver=r44.84be422
pkgrel=1
pkgdesc="A work-in-progress simple, fast and modern Adwaita alternative to SteamTinkerLaunch."
arch=('x86_64' 'i686' 'armv7h' 'aarch64')
Expand Down
5 changes: 4 additions & 1 deletion modules/config/defaultConfigTemplate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ return
},
zink = {
enabled = false;
}
},
obs_gamecapture = {
enabled = false;
},
},

-- GameScope
Expand Down
17 changes: 17 additions & 0 deletions modules/tools/obs-gamecapture.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- Internal Modules
local toolObject = require("modules.objects.toolObject")

--[[
I was tempted to separate this tool in 2 options : one for the utility (supports Vulkan & OpenGL),
and another for the environment variable which can be used with Vulkan games.
However, I chose to stay simple and use what works for all : the utility.
This is seemingly also the approach SteamTinkerLaunch goes with, judging from its wiki.
]]

local name = "obs-gamecapture"
local type = "executable"
local usage = function(command)
return "obs-gamecapture "..command
end

return toolObject:new(name, type, usage)
1 change: 1 addition & 0 deletions modules/ui/UItoSettingsList.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ return {
["gamemode_Switch"] = {type= "Switch", tool = "gamemoderun", setting = "utilities.gamemode.enabled"},
["mangohud_Switch"] = {type= "Switch", tool = "mangohud", setting = "utilities.mangohud.enabled"},
["zink_Switch"] = {type= "Switch", tool = "/usr/lib/dri/zink_dri.so", setting = "utilities.zink.enabled"},
["obs_gamecapture_Switch"] = {type= "Switch", tool = "obs-gamecapture", setting = "utilities.obs_gamecapture.enabled"},

-- Gamescope
["gamescope_Switch"] = {type= "Switch", tool = "gamescope", setting = "gamescope.enabled"},
Expand Down
11 changes: 6 additions & 5 deletions modules/utilitiesList.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ return function (gameConfig)
-- Executables are ordered by priority (first only applies to the game, last applies to the whole sequence)

{
{require("modules.tools.zink"),gameConfig.utilities.zink.enabled,"gameConfig.utilities.zink.enabled"},
{require("modules.tools.gamescope"),gameConfig.gamescope.enabled,"gameConfig.gamescope.enabled"},
{require("modules.tools.switcherooctl"),gameConfig.dgpu.enabled,"gameConfig.dgpu.enabled"},
{require("modules.tools.mangohud"),gameConfig.utilities.mangohud.enabled,"gameConfig.utilities.mangohud.enabled"},
{require("modules.tools.gamemode"),gameConfig.utilities.gamemode.enabled,"gameConfig.utilities.gamemode.enabled"}
{require("modules.tools.zink"),gameConfig.utilities.zink.enabled},
{require("modules.tools.gamescope"),gameConfig.gamescope.enabled},
{require("modules.tools.switcherooctl"),gameConfig.dgpu.enabled},
{require("modules.tools.mangohud"),gameConfig.utilities.mangohud.enabled},
{require("modules.tools.obs-gamecapture"),gameConfig.utilities.obs_gamecapture.enabled},
{require("modules.tools.gamemode"),gameConfig.utilities.gamemode.enabled}
}

end
2 changes: 1 addition & 1 deletion ui/definitions/settingsPage.blp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ StackPage settingsPage { //[MODIFIED IN LUA]: This page is only shown if the gam

Adw.PreferencesGroup {
title: "Recommended";
description: _("Settings recommended to be used for the best experience.");
description: _("Settings recommended for the best experience.");
Adw.ActionRow {
title : _("Use dedicated graphics card");
subtitle: _("Use your dedicated graphics card to boost performance by a lot, in exchange for higher power consumption.");
Expand Down
22 changes: 19 additions & 3 deletions ui/definitions/utilitiesPage.blp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ StackPage utilitiesPage {
margin-start: 12;
margin-top: 16;
orientation: vertical;
spacing: 18;
spacing: 24;

Adw.PreferencesGroup {
title: "Recommended";
description: _("Utilities recommended to be enabled for the best experience.");
description: _("Utilities recommended for the best experience.");
Adw.ActionRow {
subtitle: _("GameMode is a tool to optimize Linux system performance on demand.");
title: "Feral GameMode";
Expand All @@ -35,7 +35,7 @@ StackPage utilitiesPage {

Adw.PreferencesGroup {
title: _("Utilities");
description: _("Those are generally safe utilities you may want enabled.");
description: _("Utilities that can be used while the game is running, depending on your needs.");

// Adw.SwitchRow seem to be buggy-ish. The value gets inverted, and clicking directly on the button
// doesn't send the signal I need to run the functions.
Expand Down Expand Up @@ -71,6 +71,22 @@ StackPage utilitiesPage {
valign: center;
}
}

Adw.ActionRow {
subtitle: _("obs-gamecapture is a tool that captures a game window and plugs it into OBS Studio as a source with minimal overhead.");
subtitle-lines: 2;
title: _("OBS Game Capture");
activatable-widget: obs_gamecapture_Switch;
has-tooltip: bind obs_gamecapture_Switch.has-tooltip bidirectional;
tooltip-text: bind obs_gamecapture_Switch.tooltip-text bidirectional;
sensitive: bind obs_gamecapture_Switch.sensitive bidirectional;

Switch obs_gamecapture_Switch { //[MODIFIED IN LUA][INTERACTS WITH LUA]
active: false;
sensitive: false;
valign: center;
}
}
}
}
};
Expand Down
26 changes: 22 additions & 4 deletions ui/main.ui
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ Command may change depending on installation method.</property>
<child>
<object class="AdwPreferencesGroup">
<property name="title">Recommended</property>
<property name="description" translatable="true">Settings recommended to be used for the best experience.</property>
<property name="description" translatable="true">Settings recommended for the best experience.</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="true">Use dedicated graphics card</property>
Expand Down Expand Up @@ -527,11 +527,11 @@ Command may change depending on installation method.</property>
<property name="margin-start">12</property>
<property name="margin-top">16</property>
<property name="orientation">1</property>
<property name="spacing">18</property>
<property name="spacing">24</property>
<child>
<object class="AdwPreferencesGroup">
<property name="title">Recommended</property>
<property name="description" translatable="true">Utilities recommended to be enabled for the best experience.</property>
<property name="description" translatable="true">Utilities recommended for the best experience.</property>
<child>
<object class="AdwActionRow">
<property name="subtitle" translatable="true">GameMode is a tool to optimize Linux system performance on demand.</property>
Expand All @@ -554,7 +554,7 @@ Command may change depending on installation method.</property>
<child>
<object class="AdwPreferencesGroup">
<property name="title" translatable="true">Utilities</property>
<property name="description" translatable="true">Those are generally safe utilities you may want enabled.</property>
<property name="description" translatable="true">Utilities that can be used while the game is running, depending on your needs.</property>
<child>
<object class="AdwActionRow">
<property name="subtitle" translatable="true">A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more... May not work on some native OpenGL games.</property>
Expand Down Expand Up @@ -591,6 +591,24 @@ Command may change depending on installation method.</property>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="subtitle" translatable="true">obs-gamecapture is a tool that captures a game window and plugs it into OBS Studio as a source with minimal overhead.</property>
<property name="subtitle-lines">2</property>
<property name="title" translatable="true">OBS Game Capture</property>
<property name="activatable-widget">obs_gamecapture_Switch</property>
<property name="has-tooltip" bind-source="obs_gamecapture_Switch" bind-property="has-tooltip" bind-flags="sync-create|bidirectional"/>
<property name="tooltip-text" bind-source="obs_gamecapture_Switch" bind-property="tooltip-text" bind-flags="sync-create|bidirectional"/>
<property name="sensitive" bind-source="obs_gamecapture_Switch" bind-property="sensitive" bind-flags="sync-create|bidirectional"/>
<child>
<object class="GtkSwitch" id="obs_gamecapture_Switch">
<property name="active">false</property>
<property name="sensitive">false</property>
<property name="valign">3</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
Expand Down

0 comments on commit 9bf5b6c

Please sign in to comment.