Web-based Cloud Gaming service for Retro Game
Find a file
2019-08-17 00:13:36 +08:00
.github Create FUNDING.yml 2019-08-04 04:16:47 +08:00
build Introduce Makefile and go vendor directory for faster build (#67) 2019-08-17 00:13:36 +08:00
cmd Introduce Makefile and go vendor directory for faster build (#67) 2019-08-17 00:13:36 +08:00
config Stun turn from worker (#65) 2019-08-05 21:48:19 +08:00
cws Match best worker based on latency + Experiment with Singapore Host (#60) 2019-06-21 03:47:35 +08:00
document Integrate with RetroArch to have Universal emulator. (#64) 2019-08-02 22:06:26 +08:00
emulator Integrate with RetroArch to have Universal emulator. (#64) 2019-08-02 22:06:26 +08:00
games 300th commit: Update REAME + ice timeout 2019-05-29 01:41:54 +08:00
libretro Update cores 2019-08-03 16:23:55 +08:00
overlord Stun turn from worker (#65) 2019-08-05 21:48:19 +08:00
static Stun turn from worker (#65) 2019-08-05 21:48:19 +08:00
util Integrate with RetroArch to have Universal emulator. (#64) 2019-08-02 22:06:26 +08:00
vendor Introduce Makefile and go vendor directory for faster build (#67) 2019-08-17 00:13:36 +08:00
vpx-encoder Optimize 2019-06-06 23:14:29 +08:00
webrtc Integrate with RetroArch to have Universal emulator. (#64) 2019-08-02 22:06:26 +08:00
worker Update cores 2019-08-03 16:23:55 +08:00
.dockerignore Update docker ignore to skip adding games folder to docker, use volume instead 2019-08-03 16:57:37 +08:00
.gitattributes Update new frontend (#38) 2019-05-25 13:16:32 +08:00
.gitignore Introduce Makefile and go vendor directory for faster build (#67) 2019-08-17 00:13:36 +08:00
_config.yml Set theme jekyll-theme-cayman 2019-07-25 15:25:41 +08:00
Dockerfile Update cores 2019-08-03 16:23:55 +08:00
go.mod Integrate with RetroArch to have Universal emulator. (#64) 2019-08-02 22:06:26 +08:00
go.sum Integrate with RetroArch to have Universal emulator. (#64) 2019-08-02 22:06:26 +08:00
LICENSE Update LICENSE 2019-04-11 02:13:48 +08:00
Makefile Introduce Makefile and go vendor directory for faster build (#67) 2019-08-17 00:13:36 +08:00
prometheus.yml Add prometheus yml 2019-06-05 01:57:53 +08:00
README.md Update README.md 2019-08-16 08:14:35 +08:00

Web-based Cloud Gaming Service

Video demo: https://www.youtube.com/watch?v=koqWB1VKflo


CloudRetro, Open source Web-based Cloud Gaming Service building on WebRTC and LibRetro.

This project aims to bring the most modern and convenient gaming experience to user. You can play any retro games on your browser directly, which is fully compatible on multi-platform like Desktop, Android, IOS. This flexibility also enables online gaming experience to retro games.

Note: Due to the high cost of hosting, I will Hibernate the servers for a while. I'm working on a big change and will turn on hosting again. Sorry for that :(
You can try hosting your own service following the instruction in the next session.

screenshot screenshot

Feature

  1. Cloud gaming: Game logic is hosted on a remote server. User doesn't have to install or setup anything. Images and audio are streamed to user in the most optimal way.
  2. Cross-platform compatibility: The game is run on webbrowser, the most universal built-in app. No console, plugin, external app or devices are needed. The device must support webRTC to perform streaming. Joystick is also supported.
  3. Emulator agnostic: The game can be play directly without emulator selection and initialization as long as the its cores are supported by RetroArch.
  4. Vertically scaled + Load balancing: We can add more machines to handle more traffic. The closest server with highest free resource will be assigned to user.
  5. Cloud storage: Game state is storing on online storage, so you can come back to continue playing in a game.

Run on local by Docker

You try hosting the server yourself by running ./run_local_docker.sh. It will spawn a docker environment and you can access the emulator on localhost:8000.

Development environment

Install Golang https://golang.org/doc/install . Because the project uses GoModule, so it requires Go1.11 version.

Install dependencies

# Ubuntu
apt-get install -y pkg-config libvpx-dev libopus-dev libopusfile-dev

# MacOS
brew install libvpx pkg-config opus opusfile

# Windows
... not tested yet ...

And run

  • ./run_local.sh
  • The scripts includes build the binary using Go module

Documentation

FAQ

How does the project start?

  • The project is inspired by Google Stadia. The most important question comes to everyone mind is how good is the latency? Will gaming experience is affected by the network? I did some researches on that topic and WebRTC seems to be the most suitable protocol for that purpose. I limited the project scope and made a POC of Cloud-gaming. The result indeed looks very promising.

Why retroArch?

  • I first started the experiment with NES emulator. After seeing some positive result, I take a step further to integrate with RetroArch to challenge the system with high-end games like Playstation. In my opinion, combining RetroArch and Cloud will bring the best of both world together. The versality of RetroArch and the utility of streaming can deliver the most portable gaming experience to users.

Why is the game lag for some people?

  • Cloud-gaming is very network-sensitive. It requires the server is close to the user, so please pick the nearest server to you. If there is not, you can try hosting the platform on your own machine followed above instruction and test.
  • Cloud-gaming is based on WebRTC peer to peer, so there are some cases direct communication is not possible because of the firewall. In that case, relay communication happens and the game is not smooth. You can find a public network and retry.
  • The current state of project is hosted on a limited resource, so during high traffic, the game might got lag due to CPU is overused, not because of the network. Besides, my memory management is not working properly sometimes and game sessions are not fully separated, so the game session can lag over time. In that case, please reload or continue your game by clicking share and reopen the old game.

If RetroArch is already multi-platform, why do we need to make it cloud?

  • RetroArch is universal emulator but it still faces the issue of performance when running on low end mobile device or web frontend. As the logic is completely handled remotely, there will be no performance issue on the game. Even Playstation can be played smoothly on the service.
  • RetroArch requires loading cores and games but these steps are no longer necessary in Cloud-Gaming service. Games information and cores are stored in cloud storage.
  • However, High-end games requires a lot of computing power and it will involves an upgrade on hardware and infrastructure. Google has a lot of resource and its distributed GPU will enhance this cloud-gaming use case. My resource is not as abundant, so I prefer picking light retro games.

Why Web browser as the main platform?

  • Web browser is most universal built-in app and it will bring the most convenient and modern gaming experience together with cloud-gaming. You can try the platform on Android. Unfortunately, IOS doesn't support WebRTC protocol yet, http://iswebrtcreadyyet.com/

Credits

Contributor

Nguyen Huu Thanh
https://www.linkedin.com/in/huuthanhnguyen/

Tri Dang Minh
https://trich.im