Hacker News new | past | comments | ask | show | jobs | submit login
Sunshine – an open-source gamestream server for Windows and Linux (github.com/loki-47-6f-64)
105 points by jka on June 10, 2022 | hide | past | favorite | 43 comments



URL should be changed to the new repo for it: https://github.com/SunshineStream/Sunshine


Possibly; the original author hasn't abandoned the project (although may contribute to either repository, by the sounds of it).

(ref: https://github.com/SunshineStream/Sunshine/issues/39)


Game streaming always makes me a little sad at what we could've had if latency was as much a priority for ISPs as bandwidth. It's always just bad enough for a noticeably sub-optimal experience.


What could ISPs dl about this?


They can avoid bufferbloat and they can use equipment on the last mile that doesn't add 20-30+ milliseconds of latency. Those are big problems on many ISPs.

Some of that is configuration, some of that is equipment, often you could instantly solve the problem with fiber.


I think the point is this is a server for nVidia Gamestream, which is designed to be a local streaming solution between your PC and a nVidia Shield device connected to your TV. Your ISP has nothing to do with the intended use of this software. I think it can be used over the internet, but that's not the normal use case.


Fiber everywhere is expensive enough that it won't happen instantly.

Low latency DOCSIS is starting to be deployed, though-- which over the next 2-3 years will really chip away at the problem (in addition to fiber rollouts, etc, helping).


Do you have more information about this? I'd love to be able to look forward to streaming services being as good as local gaming.



Can someone please explain what it is?


Server backend for Moonlight. Moonlight is a client that implements the Geforce Experience streaming protocol used by the Nvidia Shield TV to stream your desktop from any Nvidia GPU.

Although the original Nvidia implementations are proprietary, Moonlight + Sunshine work on non-Nvidia and non-Windows machines.


"Sunshine is a Gamestream host for Moonlight"

I had to look up Moonlight because I also had no clue: https://moonlight-stream.org/


Moonlight Internet Hosting Tool

https://github.com/moonlight-stream/moonlight-docs/wiki/Setu...

so.... i can set this up on a vm and get cloud gaming with all the inefficiencies ? nice


In my experience, if you're using a provider like Paperspace it can be a pretty slick experience. Before I had symmetrical upload and download speeds I would use Paperspace with Moonlight and it worked pretty well.


Yeah they probably should have linked Moonlight[1] in the README.

[1] https://moonlight-stream.org/


Seems to me like it’s a service or application for streaming games and controls over LAN. I.e. an OSS alternative to what Steam uses for in-House game streaming.


Think of this as a FOSS self-hosted NVIDIA GeForce Now/shadow.tech/Google Stadia.


I've been using it for some time and it works great but I still find Steam remote working smoother. Especially mouse pointer lag.


I've lost my gaming rig and been toying with the idea of renting an AWS Linux box with a graphics card to play video games on. The one thing I haven't figured out is how to best control it from my laptop.

Could this be it?


You'd be ripping yourself off and paying more money for an inferior experience. Just subscribe to your choice of GeForce Now, Stadia, Xbox Cloud Gaming, PSNow, Amazon Luna, or Shadow.tech. Most of them cost between free and ~$15/mo and handle all the infrastructure and optimizations for you, along with game library syncing, multi-platform support, cross-save and sometimes cross-play, etc.

My suggestion is GeForce Now because it has the best GPUs and supports both Steam and Epic and doesn't lock you in to a third party lib the way Stadia does. And Google seems to be giving up on consumer Stadia anyhow.

Shadow.tech is an actual Windows/Steam VM (but much cheaper than AWS) if you want full control (along with the PITA of having to update Windows, Steam, and your games all the time... something the other services take care of transparently).

Renting GPU hours and running it yourself actually ends up costing a LOT more, last time I checked. Nvidia subsidizes their own service while Amazon has to upcharge you.


A lot of people these days reccomend Parsec. However bear in mind that it is closed source. Personally I was using it to play it takes two with friends and it worked pretty well.


You don't really need this. I've done it with plain Windows VMs, Steam (it has a streaming capability) and a VPN to make it appear as if it was on my LAN (Steam will only stream over LAN). It is super expensive (you pay as much for bandwidth as you do for the actual hardware) but it works well if you have a good internet connection (wired Ethernet backed by real fiber - DSL or HFC won't cut it).



Looks neat! I was hoping to get away without a Windows instance, though...


That seems like an okay situation if you don't play games that are sensitive to input latency and if you hate money.


Counterpoint about the input latency: on a proper internet connection I was able to play competitive shooters just as well as I do now locally. Agreed about the money aspect of it, though surprisingly it's not the hardware that costs the most, it's AWS's price-gouging on egress bandwidth.


"Just as well" is very relative here. For people who are truly competitive 100ms is enough to create a massive disadvantage against someone of similar skill.


That's true, but what makes you think the latency would be 100ms? With a good internet connection and a nearby server you could realistically expect latencies in the single millisecond range (although encoding/decoding might add a frame to that, it'd still be significantly lower than 100)


In my case the Steam overlay reported either 13 or 25ms (can't remember) total latency (including video encoding/decoding) and the latency to the game server was 5ms. This put my total latency at around 30ms max which wasn't too bad and not too different from other players. Granted, it's not a perfect comparison (other players have high network latency while mine was input latency which can't be compensated by the game). It did however impressively exceed my expectations (I expected it to be completely unplayable) so I suggest you try it.


I agree, but I feel like discussions about latency always focus on competitive play, while for me at least, low input latency is important even for single-player FPS games. Before 144hz+ screens were popular, I’d turn off v-sync and deal with tearing just so the mouse movement didn’t feel “mushy”. It didn’t make me a better player, but it FELT better and therefore increased enjoyment.


Yes, same here. I feel I am very sensitive to this (among other sensory things, honestly).


Moving from the East Coast to the West Coast destroyed my ability to be competitive in counterstrike (not counting ranked queues) because the server I used to play on regularly was in Kansas or something and the added 50 ms of ping was enough to throw my aim off.

No offense but either you're at a really low level or else you're playing games that aren't actually very dependent on reaction time.


> the added 50 ms of ping was enough to throw my aim off

On the flip side - if you live in the same city as a stadia server and you have real fibre to your house, you could realistically expect single digit ms latency to the stadia (edit: or knock-off stadia, using a cloud server or similar) box - it would still be noticeable, but 5ms is the same difference in input lag as dropping from 90fps -> 60fps - obviously it's not nothing at all, but if you aren't investing in a dedicated gaming computer it's unlikely it'd annoy you that much


Maybe 5ms of network latency, but it takes a lot longer to encode your mouse movement into a packet and send it over a wire, add 5ms, then wait for the cloud data center to route it to the right VM, decode your packet, send it to the game, capture the framebuffer, and send it back to you. The end to end roundtrip is more than just network latency.

Anecdote: I've used a lot of cloud gaming providers with fiber to the home, and while the experience is great, it's very noticeably laggier in first person shooters compared to going from 90fps to 60fps. It's a different kind of latency... beyond 60+ FPS, there are more frames in between, and so motion is smoother. But even at 60fps, your "time to first frame (update)" is still very low, compared to over the internet (or even to a local Steam remote desktop). Cloud gaming at 100Hz/FPS still feels laggier than 60fps local because of that mouse lag.

Modern graphics cards are very good at rapidly encoding frames using hardware accelerators, but it's still nowhere near as good as drawing directly to the screen. Even the fastest multi-gig networks are orders of magnitude slower than your internal buses and ports, especially in latency.


I'll have to evaluate what the input latency is like -- I'm not that sensitive and I have a good connection to a central location. But I suspect anything above 50 ms would be difficult to live with.

I don't hate money but I love the space and freedom from not having a physical rig at my desk slightly more than money. (Also worth mentioning that I have like an hour a week for video gaming at most.)


Yea I have moved to using GeForce now and am loving it. The one issue I have and that I want to test moonlight for is using mods. I’m even looking at setting up thin clients at home for the wife and myself and just have remote desktops available using moonlight or similar (don’t want to use vnc or Remote Desktop).


Yeah, visual-enhancing mods is in this case the reason I would like something beyond my laptop integrated GPU.


Doesn’t the Steam client support streaming via Steam Link? (Or maybe you’re playing some non-Steam games?)


Non-steam games.

Though technically I should be able to start them through steam, I would like to keep the setup simpler: copy over binary and resources, ./game.

That way I can set it up with a small shell script or Ansible playbook from scratch, and I don't have to rely on Amazon-specific file system images and such. (So I can quickly switch to a different provider if I find a cheaper/easier option.)


Shadow.tech is more what you want then. It's a lot easier to set up, and a lot more affordable, than a GPU VM on big cloud. It's basically a Windows VM with protocol optimizations (so, for example, your mouse cursor isn't lagging)


I think it would be interesting to hear about different application/desktop streaming applications and how to set them up. Does anyone have an article on that? This is cool because it's open source and fast, but I assume that X11 has something broadly similar to this, and I assume that Wayland has something similar to this.


No article, but just some anecdata: There are many ways to do it wrong (like naively encoding the whole desktop as a video stream) and many ways to optimize it. VNC is everywhere and easy to set up but it arguably provides the worst experience using the RFB protocol, sending the raw pixels for the most part.

Microsoft's native RDP, for example, knows to send a window's start location and end location when you move it, and the client just recalculates how it should appear in the new place, with only the x-y coordinate changes needing to be sent over the wire. A naive protocol would instead send every frame in between as though it were a video. On Linux, I think remote X11 operates on similar principles... it might've been designed that way from the start, but that use case never really seemed to gain widespread popularity for some reason. On the enterprise front, I think Citrix has their own protocol (ICA) with heavy optimizations, but I'm not sure how it works.

These days, I think a lot of apps (IDEs, etc.) have real-time collaboration and streaming built-in at the data layer, without needing an actual remote desktop (i.e. they sync state changes, not pixels). VSCode and IntelliJ, for example, can both stream their actual app into a web browser and/or also host your development environment remotely through a transparent tunnel. You don't even have to use VPN or SSH.

We've come to a pretty interest hybrid of thick/thin clients, where apps and UIs can be compactly sent as a javascript package and trivially rendered by any laptop made in the last decade or so, but all the heavy lifting can still be done remotely -- just in the cloud now instead of internal mainframes. (Although I suppose you could run those containers in a LAN too.) I guess there's not much need to stream the desktop anymore when hardly anyone uses the desktop anyway, just specific apps and a ton of websites.


Might be useful even for Nvidia card users, the GeForce implementation has had a unpatched issue where the server will freeze every so often.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: