Playing Dota2 on AWS EC2 with Parsec

Saikumar Chintada
3 min readNov 3, 2019

Cloud Gaming Rig = AWS EC2 + Parsec

Problem statement:

Gaming rigs are costly and buying one doesn’t create any value to me as I don’t spend enough time on playing games. But sometimes I would like to have high end gaming experience without having to buy myself the hardware. So I went on internet for looking for cloud services for gaming, but were not available in my region.

Cloud gaming can be solution for this problem, given you have a good internet connection, especially when you are dealing with multi-player online games.

Solution:

The idea it to stream video from EC2 instance to local machine and push click events back to remote EC2 instance. Parsec is the tool for the job.

Parsec:

People at parsec developed a custom network protocol (BUD protocol) optimised for streaming games.

BUD protocol details : https://youtu.be/VDR8ws0eIbI

capture -> encode -> network -> decode -> render ->capture

My Setup: (go through the resources, in the last, before following the steps for a better understanding)

  1. Set up an AWS instance close to your region (windows server 2016 ami + g4dn.xlarge). (Parsec supports only windows os for being remote client. The local parsec client can be of any OS)
  2. RDP into the above instance. RDP clients are available. (google it)
  3. Run the script in the powershell (https://blog.parsecgaming.com/set-up-a-cloud-gaming-pc-anywhere-with-these-scripts-43ff49bcc468)
  4. Login to parsec client on server and on local machine.
  5. Check that streaming works in local parsec client.
  6. Detach RDP session (https://www.reddit.com/r/cloudygamer/comments/bmwp40/parsec_disconnects_without_rdp_window/)
  7. Use parsec window to download Dota2 from steam and select the location for storage as the EBS volume mounted above.

Tips:

  1. Save each game in a different EBS mount. Create EBS volume with required capacity and attach it to instance.
  2. EBS volume should be in the same zone as the instance.
  3. Parsec has discontinued support for managed cloud service for gaming. So, Some of the documentation/support articles may be outdated at parsec’s site.
  4. Keep an eye on billing. EBS Volume will be charged even if you turn off the EC2 instance. One can delete the EBS volume, when done with playing but have to create volume and download the game again in order to play later.
  5. Download speed (for game download) is not an issue on EC2.
  6. Change the hosting settings in remote parsec client to be 5 Mbps, if you have have low upload speed.

Results:

  1. On demand cloud gaming rig (turn off any time) with below 10ms latency maintaining 60 Hz.
  2. My usage pattern: 4 hr gaming during weekends ~ 4$/week.
  3. Play even on raspberry pi (have not tried yet)
  4. Play any AAA game at max settings.

Todo:

  1. Create service/tool to automate the process.
  2. AWS cost and Game specific optimisations.
  3. Try out other cloud providers like Azure, GCP etc.
  4. Try out AWS Elastic Graphics. (at the time I wrote this article, it is not available in my region)
  5. Try out different AAA Games.

Resources:

  1. https://blog.parsecgaming.com/set-up-a-cloud-gaming-pc-anywhere-with-these-scripts-43ff49bcc468
  2. https://blog.parsecgaming.com
  3. https://github.com/jamesstringerparsec/Parsec-Cloud-Preparation-Tool
  4. https://support.parsecgaming.com/hc/en-us/categories/115000312192-Getting-Startedvery nice
  5. https://lg.io/2015/07/05/revised-and-much-faster-run-your-own-highend-cloud-gaming-service-on-ec2.html
  6. https://lg.io/2015/04/12/run-your-own-high-end-cloud-gaming-service-on-ec2.html
  7. https://blog.parsecgaming.com/3-reasons-why-you-shouldnt-use-a-vpn-with-game-streaming-89153367ecd7
  8. https://youtu.be/VDR8ws0eIbIvery nice, if you re interested in BUD protocol overview.
  9. https://parsecgaming.com (shout out)
  10. https://www.reddit.com/r/cloudygamer/comments/8pvbyp/tutorial_set_up_a_google_cloud_gamming_machine/ — (worth reading, have not tried)
  11. https://www.reddit.com/r/cloudygamer/
  12. https://www.reddit.com/r/cloudygamer/comments/bmwp40/parsec_disconnects_without_rdp_window/ — (RDP closing issue)

Please share your experiences/optimizations/solutions in setting up of your own cloud gaming rig.

UPDATE:

Check out this post by richardneililagan.com which has better approach, where spot instances are used to save costs by almost 50%.
I have also tried AWS Elastic Graphics but was not much of use, as the above parsec scripts cannot access graphics card via device manager. (Limitations of AWS ElasticGraphics)

--

--