This repo sets you up to play games like Doom Eternal on your own laptop! You can play with all graphics set to max since you'll be streaming the screen from a beefy gaming PC in Google Cloud.
We just need to set up two things:
- A Parsec account. This lets us stream the screen from the server at super low latency. It's like Google Stadia but better, in my humble opinion.
- A Google Cloud virtual machine with a Telsa P100 GPU running Windows Server 2019
- If you haven't signed up for Google Cloud before, you get $300 in credits for free!
- The virtual machine costs about $1.30/hour to run. Don't worry about getting overcharged — we'll set up your machine to shut down automatically when you're done playing
This should take about 30 minutes to set up. Could take longer depending on how fast Google responds to you via email after step 4.
-
Sign up for Google Cloud. Choose the Google account you'll want to get your bill under.
-
Once you're at the main Google Cloud console page (console.cloud.google.com), let's create a new Project
-
Using the search bar up top, search
vm instances
and click the result labeled "VM Instances"-
You'll be brought to a screen saying
Compute Engine is getting ready.
Wait for this message to go away — this should take a few minutes.
-
Click
Create
but don't do anything else. Move on to the next step.
-
-
Request an increase to your GPU quota. We need to ask Google Cloud to let us create a machine with a GPU attached.
- On the "create an instance" page, click on "GPUs", google should prompt you to upgrade your free account, click on upgrade to unlock it (beware that this will enable your account to spend more than the free 300$).
- Now on the same page, select the "nvidia tesla p100" gpu, google should prompt you with a "You might not have enough quota for this VM", click on "request quota adjustment" to increase your quota.
- Google now has to approve your quota increase. They'll send you an email when they confirm. This may take a while, but in practice it takes less than an hour. Move on to the next step while you wait.
-
Download and install Parsec. Open Parsec and make an account. You'll eventually need to sign in on the cloud machine as well, so remember your username+password!
- Go the the settings of Parsec and disable Vsync, and enable H265.
-
Download the default Service Account key. This will give Terraform permission to create your machine later in step 9.
- Go back to the Google Cloud console
- Search
credentials
at the top and click "APIs & Services" - In the left-hand drawer, click "Credentials"
- Under the "Service Accounts" section, click the one named "Compute Engine default service account"
- Click "Create Key" at the bottom, choose JSON
- Save the key as
account.json
.
-
Wait until Google Cloud approves your GPU quota increase from step 4.
-
Create the virtual machine. You'll need to open the Terminal for this step.
⚠️ ⚠️ ⚠️ WARNING!⚠️ ⚠️ ⚠️ This step will start your cloud machine and you will start getting charged! Don't stop following the guide here, or make sure to stop the machine before leaving!!!- In the Google Cloud console, copy your project ID from the dropdown at the top.
- Click on the "activate cloud shell" on the top right of any google cloud page to open a gcp terminal.
- Use Terraform to automatically set up your machine. Open terminal and run the following
git clone https://github.com/michelraymond/parsec-google-cloud-gaming.git cd parsec-google-cloud-gaming/terraform nano main.tf # change the placeholder at the top with your project ID nano account.json # copy the content of your account.json terraform init terraform apply
- If you want to use another OS than windows server you can alternatively build your image on local first (using microsoft hyper-v or vmware or equivalent), install parsec and everything needed (steps 11-12) on it, and upload the image on gcp on the following page: https://console.cloud.google.com/compute/imagesAdd
- You will then have to edit and run the
existing.tf
file instead of themain.tf
with the image you've created, connect with parsec, install the gpu driver (you can't install it on local) and you'll be done.
-
Set a Windows password
- Go back to the Google Cloud console
- Using the search bar up top, search
vm instances
and click the result labeled "VM Instances" - Click on your newly created instance called
parsec-1
- Near the top of the page, click "Set Windows password"
- Follow the instructions and save the generated password
-
Use RDP to connect to Windows VM
- Click "RDP" near the top of the instance info page
- Click on "Download the RDP file if you will be using a third-party client."
- Install the windows remote desktop app from here: https://www.microsoft.com/store/productId/9WZDNCRFJ3PS
- double click on the downloaded file and connect using the windows password above
-
Once you're on the remote desktop via RDP, let's set up Parsec. This step takes a while.
- Follow steps 3 and 4 at https://github.com/kaktus42/Parsec-Cloud-Preparation-Tool (don't install the GPU driver with the program, you will install it below)
- To Setup Auto Shutdown with the task scheduler just follow this: https://www.makeuseof.com/windows-10-11-shutdown-idle/ just change task trigger as "on idle" (the built-in auto shutdown shortcut on desktop doesn't work)
- Open Google Chrome and download the Google Cloud NVIDIA driver from here: https://cloud.google.com/compute/docs/gpus/grid-drivers-table#windows_drivers
- Run the downloaded
.exe
to install the driver, maybe use an older version if the latest don't work (I used the 538.33 since the 551.61 wasn't working)
-
Last bit of setup. Home stretch!
- From the windows remote desktop app, open Parsec and sign in
- Go to Settings. Scroll to the bottom and check H265 (same as client)
- If needed go to the windows language settings to change the keyboard layout (US qwerty by default)
- You'll need to type your login password with Parsec, if the google generated one is too complicated, you can change it by going in the "sign in options" page of the windows settings. Note that changing the windows password will make you unable to reconnect with RDP. If you need to reconnect using RDP you'll have to reset your windows password using the "Set windows password" button as above.
- Close the windows remote desktop app.
-
On your host, open Parsec and connect to your cloud machine.
- If the display isn't right, right click the desktop and open "Display Settings"
- Adjust the scaling factor, resolution, and other parameters if needed.
- Done!!!
At this point, you can install Steam and whatever games you want. Voila!
Don't forget to turn off your machine when you're not using it, or you'll be charged! Google Cloud charges by the second. You can check how much your instance cost you per day by going to the reports page of the billing section https://console.cloud.google.com/billing/ . If you still have free credits, uncheck the "Promotions and others" on the right to see the graphic.
- Maybe set GPU into WDDM mode: https://docs.nvidia.com/gameworks/content/developertools/desktop/nsight/tesla_compute_cluster.htm