Git Product home page Git Product logo

ss14.launcher's Introduction

SS14.Launcher

This is the launcher you should be using to connect to SS14 servers. Server browser, content downloads, account management. It's got it all!

Development

Useful environment variables for development:

  • SS14_LAUNCHER_APPDATA_NAME=launcherTest to change the user data directories the launcher stores its data in. This can be useful to avoid breaking your "normal" SS14 launcher data while developing something.
  • SS14_LAUNCHER_OVERRIDE_AUTH=https://.../ to change the auth API URL to test against a local dev version of the API.

ss14.launcher's People

Contributors

0x6273 avatar 20kdc avatar aerocrux avatar awarefoxy avatar clyybber avatar deathride58 avatar drsmugleaf avatar eoineoineoin avatar hoofedear avatar ike709 avatar injazz avatar lizelive avatar lzk228 avatar metalgearsloth avatar mirrorcult avatar partmedia avatar pjb3005 avatar spacemaniac avatar stellar-novas avatar tomeno avatar vasilisthepikachu avatar veritius avatar visne avatar wereii avatar zoldorfthewizard avatar zumorica avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ss14.launcher's Issues

Server browser features (sorts, filters, flags, official)

Description

As the title suggests there are a few things I think are mandatory for the server browser and some that would be fairly nice to have as the game starts to get more traction.
In order of necessity:

  • Official status tick - A blue tick or badge that shows which servers are official and that are up to date.
  • Game version? - In relation to the above, a game version number or hash which will shown red if out of date and green if up to date. This way new players will know that a server may contain bugs. Can probably be disposed off near release as forks start to appear.
  • Sort function - allows you to sort by clicking arrows at the top of columns. E.g. sort by players, country, gamemode, map, name.
  • Filters - similar to sorts but could filter for no full servers, no empty servers, region only, language only, gamemode only etc
  • Flags - In addition to the server location tag it would be nice to have a small country flag in the server title as an option. Again just adds that little extra flair. Alternatively allow custom flags too for future forks.
  • 18+ flag - Self explainatory. Little 18+ or ERP sticker in line with where the official tick would go just to show servers that are tolerant of it at a glance so it can be filtered out. Not massively necessary but we know a certain amount of the playerbase are into it.
  • Map / Gamemode column - columns for map and gamemode so that you can effectively sort servers running your favourite gamemode or map to the top.

Screenshots

Additional context

Main window not rendering (black screen) on NVidia + Wayland

When running the launcher on an up to date Arch Linux instance using Sway + NVidia Proprietary, the window starts up but the screen stays black. The following is logged repeatedly when running the launcher in debug mode (on release builds there are no useful logs):

[Visual] Exception in render loop: "System.ArgumentException: Invalid create info - no Canvas provided (Parameter 'createInfo')\n   at Avalonia.Skia.DrawingContextImpl..ctor(CreateInfo createInfo, IDisposable[] disposables) in /_/src/Skia/Avalonia.Skia/DrawingContextImpl.cs:line 108\n   at Avalonia.Skia.SkiaGpuRenderTarget.CreateDrawingContext(IVisualBrushRenderer visualBrushRenderer) in /_/src/Skia/Avalonia.Skia/Gpu/SkiaGpuRenderTarget.cs:line 40\n   at Avalonia.Rendering.DeferredRenderer.EnsureDrawingContext(IDrawingContextImpl& context) in /_/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs:line 618\n   at Avalonia.Rendering.DeferredRenderer.UpdateRenderLayersAndConsumeSceneIfNeeded(IDrawingContextImpl& context, Boolean recursiveCall) in /_/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs:line 416\n   at Avalonia.Rendering.DeferredRenderer.Render(Boolean forceComposite) in /_/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs:line 359\n   at Avalonia.Rendering.DeferredRenderer.Avalonia.Rendering.IRenderLoopTask.Render() in /_/src/Avalonia.Visuals/Rendering/DeferredRenderer.cs:line 277\n   at Avalonia.Rendering.RenderLoop.TimerTick(TimeSpan time) in /_/src/Avalonia.Visuals/Rendering/RenderLoop.cs:line 147" (Avalonia.Rendering.RenderLoop #021AF1A5)

This seems to be related to AvaloniaUI/Avalonia#7262 and I can confirm that downgrading Avalonia from 0.10.13 to 0.10.10 allows the screen to render correctly. Happy to provide any more details but this seems to currently be tied to a deeper SkiaSharp situation.

Would downgrading Avalon for the launcher be realistic?

MIDI feedback

The launcher should warn the user (if he is in a GNU/linux distro) that he needs to install the required library and a recomended soundfont to hear/play MIDI

Optimize exports by removing unecessary Avalonia dependencies

Right now we just use .UsePlatformDetect() to run the Avalonia app. This is easy but means that all exports include all platforms permanently. Even worse is that this means that both the D2D backend AND the Skia backend are included at the same time, all the time.

Using some compile-time dependency selection and preprocessor use this can be optimized so that we only ship the necessary components for the platforms we need. This'll save anywhere between 10-20 MB depending on the platform.

Another thing we can look into is removing other assemblies that may be unused such as:

  • Avalonia.DesignerSupport.dll
  • Avalonia.Diagnostics.dll
  • Avalonia.Remote.Protocol.dll

This may require manually including the other avalonia dependencies. We'll have to see.

Launcher ignores paths in connection URI

Hi
I'm using a proxy to convert http to https aswell as allow for subdomains on the same server.
I would like to be able to have it connect at space.domain.tech/play to perform the /info request.
This would allow me to have space.domain.tech itself for information on the server and the current round.
However when entering this into direct connect it removes the path and just attempts to connect to space.domain.tech:1212 or space.domain.tech:443 if using ss14s.

I have included the stack trace though it's just a generic "No such host is known" error.

[18:24:22 ERR] Failed to connect: ConnectionFailed
SS14.Launcher.Models.Connector+ConnectException: Failed to connect: ConnectionFailed
 ---> System.Net.Http.HttpRequestException: No such host is known. (space.domain.tech:1212)
 ---> System.Net.Sockets.SocketException (11001): No such host is known.
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at SS14.Launcher.HappyEyeballsHttp.AttemptConnection(AddressFamily addressFamily, SocketsHttpConnectionContext context, CancellationToken cancellationToken) in /home/runner/work/SS14.Launcher/SS14.Launcher/SS14.Launcher/HappyEyeballsHttp.cs:line 93
   at SS14.Launcher.HappyEyeballsHttp.OnConnect(SocketsHttpConnectionContext context, CancellationToken cancellationToken) in /home/runner/work/SS14.Launcher/SS14.Launcher/SS14.Launcher/HappyEyeballsHttp.cs:line 76
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
   at SS14.Launcher.Models.Connector.GetServerInfoAsync(String address, CancellationToken cancel) in /home/runner/work/SS14.Launcher/SS14.Launcher/SS14.Launcher/Models/Connector.cs:line 212
   --- End of inner exception stack trace ---
   at SS14.Launcher.Models.Connector.GetServerInfoAsync(String address, CancellationToken cancel) in /home/runner/work/SS14.Launcher/SS14.Launcher/SS14.Launcher/Models/Connector.cs:line 227
   at SS14.Launcher.Models.Connector.ConnectInternalAsync(String address, CancellationToken cancel) in /home/runner/work/SS14.Launcher/SS14.Launcher/SS14.Launcher/Models/Connector.cs:line 76
   at SS14.Launcher.Models.Connector.Connect(String address, CancellationToken cancel) in /home/runner/work/SS14.Launcher/SS14.Launcher/SS14.Launcher/Models/Connector.cs:line 58

Improve singleplayer game support

Right now moony is doing some shenanigans to list Robust Sand, a singleplayer game, on the server list. And when it's not listed you can't play it, even if you've already connected before and therefore downloaded it.

It would be nice if the launcher had a "Singleplayer" tab for the singleplayer games, and a saner way to list singleplayer games on it. Or at least a way to easily launch singleplayer games you've downloaded before.

This would also give you something to do if your internet is down.

Crash

  • Launcher crashes if it doesnt get any ping from a server
    Steps to reproduce
  1. Disconnect from internet
  2. Launch the client
  • It crashes if you spam refresh

Provide a flatpak for Linux

Hi! I think it would be really fun if SS14 on Linux was available as a flatpak (and hosted on Flathub). The existing self-contained tarball is really useful, but the advantage to publishing an app this way is it gets full desktop integration (the launcher goes in the right place), it is easy to install in many Linux distributions, and it runs in a lightweight container so we are pretty much guaranteed - if it works on one system - all of the necessary dependencies are there.

In general, especially for a project like this, it makes sense that the flatpak metadata is in another repository, but it is always better when this kind of thing has upstream's blessing :) So I started working on it over here: https://github.com/dylanmccall/com.spacestation14.Launcher. I'm happy with it at the moment. It builds and runs without too much weird stuff. Needs a desktop icon.

I'm happy to maintain this packaging metadata going forward, and if we submit it to Flathub I can grant access to the resulting repository for anyone who has commit access here. For the moment, I'm opening this issue here in order to sanity check, and to make sure I'm not stepping on anyone's toes.

Blocking connection to favorited servers with no status is cringe

Right now I'm messing around with a production OD test server, and I have to Direct Connect every time because when I favorited it it's Unable to connect because it isn't configured to report its status.

Instead of disabling Connect, just make it red or give a notice popup or something.

Nondescriptive error if gamepack file cannot be opened.

What I expect

An error message about not being able to read the game pack file. Can be caused by security programs, windows security, or running another instance of the client.

What Happened

image

2021-04-14 23:32:49.677 -07:00 [ERR] Exception while trying to run updates
System.IO.IOException: The process cannot access the file 'C:\Users\<ME>\AppData\Roaming\Space Station 14\launcher\engines\0.4.37.zip' because it is being used by another process.
   at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
   at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.File.Create(String path, Int32 bufferSize, FileOptions options)
   at SS14.Launcher.Models.EngineManager.EngineManagerDynamic.DownloadEngineIfNecessary(String engineVersion, DownloadProgressCallback progress, CancellationToken cancel)
   at SS14.Launcher.Models.Updater.InstallEngineVersionIfMissing(String engineVer, CancellationToken cancel)
   at SS14.Launcher.Models.Updater.RunUpdate(ServerBuildInformation buildInformation, CancellationToken cancel)
   at SS14.Launcher.Models.Updater.RunUpdateForLaunchAsync(ServerBuildInformation buildInformation, CancellationToken cancel)
2021-04-14 23:32:49.705 -07:00 [ERR] Failed to connect: "UpdateError"
SS14.Launcher.Models.Connector+ConnectException: Exception of type 'SS14.Launcher.Models.Connector+ConnectException' was thrown.
   at SS14.Launcher.Models.Connector.RunUpdateAsync(ServerInfo info, CancellationToken cancel)
   at SS14.Launcher.Models.Connector.ConnectInternalAsync(String address, CancellationToken cancel)
   at SS14.Launcher.Models.Connector.Connect(String address, CancellationToken cancel)

How to reproduce

Run two instances of the launcher, connect both to a live server, one at a time. The error was caused because the first launcher opens the gamepack with an exclusive read lock, causing the second launcher to be unable to open it.

System.InvalidOperationException preventing the Launcher from starting.

I installed the game using Steam, and it didn't start. When I launch it through the terminal I receive the mentioned unhandled exception, after some normal messages:

Unhandled exception. System.InvalidOperationException: Default font family name can't be null or empty.

I am on Arch Linux and I looked up the issue and after skimming a few GitHub issues, it seems possibly related to Avalonia and me maybe missing some fonts or similar, which makes sense, given the error message. The issue-threads would usually recommend installing mscorefonts and trying to launch the applications with LC_ALL=C,
but neither changed the result.

I can provide you with system specs and the terminal output, if needed.

Show Extra Server Metadata

SS14-specific:

  • Round status (Lobby/In-game/Post-round)
  • Time-to-start (in Lobby)
  • Current Map
  • Gamemode?

General:

  • Content/Fork name
  • Server group (i.e. Wizard's Den)
  • Community website URL/Steam group link/Discord link
  • Short free-text blurb about server
  • RTT/Ping meter
  • Player cap
  • Location (US West/Oceania/etc.)
  • Primary language

Download speeds are atrociously slow sometimes

Me and other people have experienced issues with the download speed for server content, this happens seemingly at random, and rarely function normally.

Using a VPN and swapping to random regions works, sometimes it might not work in USA, so switch to germany, or UK.

2022-03-20.23-29-18.mp4

Please consider providing a tar(.gz/.bz2/etc.) archive for Linux

Description

The linux launcher comes in a zip file but zip does not store the file permissions/attributes and thus after unpacking the game won't work. There are 2 (maybe 3) files that need to be executable:

  • bin/SS14.Launcher - started by the shell script SS14.Launcher
  • bin/loader/SS14.Loader
  • probably SS14.Launcher as well (though it's not 100% mandatory, it's easier for the users to figure out if it is)

Additional context

After making bin/SS14.Launcher executable and starting the app, it failed with an exception that was apparently fixed by making bin/loader/SS14.Loader executable too.

System.ComponentModel.Win32Exception (13): Permission denied
   at System.Diagnostics.Process.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)

Servers should show which fork they are running

Kind of a crucial part of any custom game hub. Right now you have to communicate it in the title, and outside of extreme examples like "robust sand" it's hard to tell if servers are running custom content or not.

Can't close launcher normally [Linux, GNOME]

Attempting to close the launcher through normal methods (the 'close' window decoration or the close window shortcut) does not close the program for me; it just makes it hang. I have to do pkill SS14.Launcher to close it. There's nothing in the log when this happens (beyond what happens every time you run the program), so I have decided not to attach one.

Reproduction Steps:

  1. Open the launcher
  2. Attempt to close it using the 'close' button or a close window keyboard shortcut
  3. The launcher does not close but just becomes unresponsive (90% of the time, it very very rarely will actually close for me)

Output of uname -a:
Linux rane-pc 5.15.5-76051505-generic #202111250933~1638201579~20.04~09f1aa7-Ubuntu SMP Tue Nov 30 02: x86_64 x86_64 x86_64 GNU/Linux

Distribution: Pop! OS 20.04
Gnome Version: 3.36.8
X server version: 1.20.13
NVIDIA driver version: 470.86
Graphics: Nvidia MX130 with proprietary drivers for everything, iGPU disabled
CPU: Intel® Core™ i5-7200U CPU

Auto-Selection & Server "Groups"

We should move away from displaying individual servers (by default) in favor of selecting servers automatically from a group.

For example, the official "group" would be the four mainline Wizard's Den servers (currently Miros, Spider, Lizard, and Centipede).

Auto-Selection Strategies

Plenty of ways to go about this.
Off the top of my head:

  • Lowest-population first (makes for better distribution across all servers)
  • Highest-population first (improves round player count)
  • Ping-weighted
  • Starting first (servers in the lobby state get picked first)
  • Piecewise population i.e. bonus for pop. < ~50% capacity, penalty for pop. > ~50% capacity (50% high-water mark is arbitrary)
  • Server delegated (server advertises a weight in its metadata)
  • Most admins online
  • Random
  • ...or a mix of any of the above

If we wanted to be fancy, we could add sliders for each factor and let the player tweak the weights.

Can't connect to servers

The launcher told me it was too old, and I had to download a new one, which I did. Now I get different errors when trying to connect to different servers.

Lizard and Spider give me this:

There was an error while downloading server content. Please ask on Discord for support if the problem persists.

Outer Rim 14 hangs in a screen that reads:

Updating: Storing assets in database...

Miros takes forever to download, then crashes with a floating point exception.

Someone in the forums seemed to have the same issue a couple of weeks ago and someone else said there was a patch on Discord.
https://forum.spacestation14.io/index.php?/topic/538-help/#comment-2038

I'm asking here cause this seems like the proper place. I'm not very excited about having to join yet another walled garden... but I'll do it if I have to.

Join Waitlisting Support

Some launchers (Steam/Source comes to mind) allow you to join a full server as soon as it advertises capacity.

The Steam/Source implementation is one-way only: the server only publishes its player cap and current player count, and clients poll it to see if any slots are open. If the player count drops below the cap, the launcher attempts to join.

Of course, this leads to a window of time when multiple clients will be attempting to join, with potentially too few slots to accommodate them all. This could be improved upon by issuing join tickets and queuing them, or raffling them off whenever slots are opened.

Launcher     Client     Server
    |-----------+-------->|     Join?
    |<----------+---------|     Full. Ticket is 123456. Expires in 30s.
    |           |         |
    |           |         |     (Time passes)
    |           |         |
    |-----------+-------->|     Join? Ticket 123456.
    |<----------+---------|     Full. Ticket kept alive. Expires in 30s.
    |           |         |
    |           |         |     (Time passes)
    |           |         |
    |-----------+-------->|     Join? Ticket 123456.
    |<----------+---------|     Slot reservation open. Expires in 60s.
    |-----------+-------->|     ACK. Launching client.
    |           |         |
    |---------->|         |     ./Content.Client --autoconnect wherever --ticket 123456
    |           |-------->|     Join. Ticket is 123456.
    |           |<--------|     Welcome aboard.

If raffling is preferred, the flow could instead include a list of ticket hashes that may join.

Launcher     Client     Server
    |-----------+-------->|     Join?
    |<----------+---------|     Full. Open tickets are sha1(123451), sha1(123452), sha1(123453).
    |-----------+-------->|     Request Ticket?
    |<----------+---------|     Ticket is 123456.
    |           |         |
    |           |         |     (Time passes)
    |           |         |
    |-----------+-------->|     Join?
    |<----------+---------|     Full. Open tickets are sha1(123453), sha1(123454), sha1(123455).
    |           |         |
    |           |         |     (Time passes)
    |           |         |
    |-----------+-------->|     Join?
    |<----------+---------|     Full. Open tickets are sha1(123456), sha1(123457), sha1(123458).
    |           |         |
    |---------->|         |     ./Content.Client --autoconnect wherever --ticket 123456
    |           |-------->|     Join. Ticket is 123456.
    |           |<--------|     Welcome aboard.

Of course, this could also be accomplished through auth/hub, but that's unneeded centralization.

Background Downloads

Couple of scenarios for this one:

  • Content is connected to a server that receives an update during the round. Robust should provide a mechanism to inform the launcher that a new version is available and will be used soon. In this case, the Launcher should throttle the download so as to avoid messing with the game connection.
  • The Launcher boots up and scans the Favorite servers. If any of the servers are running games or engine versions that aren't currently cached, the launcher should preemptively fetch them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.