Gaming in the cloud
A good friend of mine told me how he'd run a cloud GPU to play a game, and I was impressed and asked him to write it up.
Here it is:
I’ve played many, many, many hours of Stellaris. But I’ve always had to keep the size of the universe quite small, the number of players/opponents quite low, and I’ve had to put up with not only the game getting slower and slower as the game nears the end, but also the constant noise of my computer’s fans running at full speed trying to cope with the desired performance. I had tried loads of things to speed it up, including getting rid of all the fancy graphics, reducing the resolution, removing mods, but nothing worked very well.
In the end I started thinking, ‘should I buy a new PC?’, which after a couple of hours looking around, investigating what’s available, and working out a budget. I realised it was completely crazy for me to look at spending £2000 on a PC to mostly play this one game.
So what else, upgrading this PC? Buy the game again for the PS4? Rent a gaming PC?
Streaming games is becoming more and more popular with several mainstream streaming services such as PS Now and Google’s Stadia. So how can I stream Stellaris?
Steam has the option to stream a game from another PC, but if I had a more powerful gaming PC, I’d be using that already!
Enter player 2 (Google Cloud Platform - aka - GCP).
I already have a billing account as I use GCP for other services, but using it for gaming never crossed my mind. These are the steps I took in setting up a gaming server:
I created a new GCP project
Setup the billing, linked to my existing billing account
Modified the GCP firewall, disabling all existing rules for external traffic, and adding a new rule to allow all ports/protocols from my home IP address
Created a new Google Compute Engine instance using a n1-standard-8 (8 vCPUs, 30 GB memory) with a NVIDIA Tesla T4 GPU in the Google region/zone near to my location.
But…. First problem. I can’t set up a new instance with a GPU as I don’t have it allowed in my quota.
So a quick visit to the Quota page, adding the GPU count I need, and submitting it to Google Support, then proceeding to get a cup of tea, I found I was allowed a GPU!
2nd attempt of creating a new Google Compute Engine instance using a n1-standard-8 (8 vCPUs, 30 GB memory) with a NVIDIA Tesla T4 GPU.
Started the instance, reset the password, connected via RDP
Installed Steam, then Stellaris
I also tried to configure Steam to allow me to use it’s built-in streaming service. But I couldn’t get this working as it required a user prompt to be accepted which was not reachable via RDP.
Decided to install Parsec, which requires it to be installed on both local and remote. This gave me really quick remote desktop experience, so I can now close the usual RDP session.
Configured the desktop to run in 4k resolution via Parsec.
I realised that I had no sound. GCP servers do not install any sound devices on their servers, so I installed VB Cable and rebooted the server.
After reconnecting via RDP, starting Parsec on the VM, and signing into Steam, I was finally ready!
Connect via Parsec, close down the RDP connection,
Configured Stellaris to run in 4k resolution with maximum graphics settings.
Success! But boy-oh-boy are the icons and text really small in Stellaris with the default settings. I had to change the UI scale in the game to 125% to make it readable. Quick game restart later and my eyes can see the text!
It was like another world/game. It moved so swiftly, even at 4k resolution, with the maximum galaxy size, maximum number of opponents, etc.
Not only have I got a working solution, but it’s enabled me to play the game like never before! Major success! Is it the same as having an expensive gaming rig next to me, no. But it does exactly what I need.
After a few hours of gaming, which is about all I can get away with in a day, I found it was costing around £1.50 -> £2.00 per day.
£2000 was being planned to be spent on a new gaming PC. £2 per day is what it now costs. I can play for 1000 days (almost 3 years) before this gets to be as expensive.
But that’s not the end!
GCP offers a free trial of $300 for a year with any new Gmail account that hasn’t used it already.
So I sign up for a new Google Account, activate the free trial of GCP, and make my original Gmail account the Billing Administrator of this new Trial Billing Account.
I switched back to my primary Gmail account, managed the old billing account in GCP and from here you can change the billing for this new Gaming Project to use the new Trial billing account, and boom! I have a free gaming server for 3 months!
After 3 months I plan on creating another new GCP free trial, changing the billing over again, and continuing on for another 3 months!
Overall, it was well worth the 2 hours spent in getting this all setup, configured, and tested. Yes I need to keep shutting down the server when I’m not using it, and I need to RDP to it first to login before Parsec becomes an option, but it’s only 30 seconds before and after I want to play a game.
Parsec = https://parsecgaming.com/
VB Cable (audio driver) = https://www.vb-audio.com/Cable/
Test the new higher throughput network card in GCP - https://cloud.google.com/compute/docs/instances/create-vm-with-gvnic#windows_1