Decentralize Cloud Gaming/Application
Decentralized, Self-hosted cloud gaming/cloud application service.
CloudMorph is a decentralized, self-hosted cloud gaming/cloud application service. User can host their cloud gaming app with minimum configuration. By leveraging the ease of deployment, CloudMorph goal is to build a decentralized cloud-gaming network with app providers and consumers. To bring a scalable and generic cloud gaming solution, CloudMorph has to cope with various challenges in video streaming optimization, Windows application Virtualization in headless server or P2P mesh network structurization.
Video Demo: https://www.youtube.com/watch?v=fkOpOQ-HwFY
| Screenshot | Screenshot |
| :----------------------------------------------------: | :-------------------------------------------------------: |
| Diablo II |
Photoshop |
|
RoadRash |
Starcraft |
Unlike CloudRetro, a Completed Cloud Gaming solution on Retro Game hosted on dedicated cloud infrastructure, CloudMorph generalizes the system to bring any offline Windows application to a cloud mesh network. The deployment is simplified with a concise tech-stack and codebase. The goal is to create a distributed cloud application system when anyone can contribute their offline application on the platform, and other people can consume it.
Foremost, you need an Ubuntu instance with a public network firewall. For example, you can use the given
script/create_do.shto create a digital ocean instance. After that: We need 3 in the same folder: 1.
apps: a folder contains the app you want to deploy. For example,
DiabloII2.
config.yaml: app config, the app configuration on cloud-morph 3.
setup_remote.sh: a script to deploy your application to server
Example: -
setup_remote.sh $ip $mount_path. Ex:
./setup_remote.sh 159.89.146.77 /apps/DiabloII
interactive-wine.sh bash, it will open environment with bash on mounted volume. After we finish initialization, we will push this volume to remote server using the below line.
setup_remote.sh $ip $mount_path syncvolume
There are configuration examples without applications. You can search the app and put it in the same configuration folder.
The service is based on Golang, C++, and Linux X11 utility tools (Xvfb, ffmpeg). You can set up all dependencies with
setup.sh. After that, you can run the go server with
go run server.go
Access to your local at
localhost:8080
Note: the wine application is run in Docker. You can run it without docker by changing
run-wine.shto
run-wine-nodocker.shin
server.gofor easier debugging.
Mesh Network
CloudApp core
When Webserver starts, Wine Application is spawned inside a container at the same time. However, in the future, Wine Application needs to support multiplex to run multiple applications in the same VM.
Input captured from Client is sent to Virtual Machine over Websocket.
A C++ script (syncinput.exe) will listen to the event and simulates Windows OS event to Wine Application through WinAPI.
Application screen is captured in a Virtual Display Frame Buffer, which is later piped to FFMPEG.
FFMPEG will produce the screen stream to a VPX RTP stream.
In the end, the core module receives Input as WebSocket event and Output as RTP stream. You can check the interface at
core/go/cloudapp
Webserver interacts with Virtual Machine using these Input and Output format.