{"id":13398719,"url":"https://github.com/giongto35/cloud-game","last_synced_at":"2025-05-13T19:10:28.887Z","repository":{"id":37448315,"uuid":"179312486","full_name":"giongto35/cloud-game","owner":"giongto35","description":"Web-based Cloud Gaming service for Retro Game","archived":false,"fork":false,"pushed_at":"2025-04-17T06:11:28.000Z","size":215391,"stargazers_count":2370,"open_issues_count":7,"forks_count":359,"subscribers_count":68,"default_branch":"master","last_synced_at":"2025-04-27T20:01:49.138Z","etag":null,"topics":["antstream","cloud-computing","cloud-gaming","distributed","game","game-online","gba","go","golang","google-stadia","hacktoberfest","hacktoberfest2021","libretro","microsoft-xcloud","nes","retro-games","retroarch","stadia","webrtc","xcloud"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=GUBrJGAxZZg","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/giongto35.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":"giongto35","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=WMBYQSLAVY2NE\u0026source=url"]}},"created_at":"2019-04-03T14:55:08.000Z","updated_at":"2025-04-27T06:49:27.000Z","dependencies_parsed_at":"2023-02-18T19:15:30.682Z","dependency_job_id":"f5f5efee-ed99-40e1-826d-bbaa0536c249","html_url":"https://github.com/giongto35/cloud-game","commit_stats":{"total_commits":979,"total_committers":18,"mean_commits":"54.388888888888886","dds":0.5720122574055158,"last_synced_commit":"ca64bd127e5f347858c13a1e385fdf24af8bc268"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giongto35%2Fcloud-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giongto35%2Fcloud-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giongto35%2Fcloud-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giongto35%2Fcloud-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giongto35","download_url":"https://codeload.github.com/giongto35/cloud-game/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254010823,"owners_count":21998993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["antstream","cloud-computing","cloud-gaming","distributed","game","game-online","gba","go","golang","google-stadia","hacktoberfest","hacktoberfest2021","libretro","microsoft-xcloud","nes","retro-games","retroarch","stadia","webrtc","xcloud"],"created_at":"2024-07-30T19:00:31.033Z","updated_at":"2025-05-13T19:10:28.866Z","avatar_url":"https://github.com/giongto35.png","language":"Go","funding_links":["https://patreon.com/giongto35","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=WMBYQSLAVY2NE\u0026source=url"],"categories":["Podcast","开源类库","Go","Media API","Open source library","Repositories"],"sub_categories":["游戏相关","Game Related"],"readme":"# CloudRetro\n\n[![Build](https://github.com/giongto35/cloud-game/workflows/build/badge.svg)](https://github.com/giongto35/cloud-game/actions?query=workflow:build)\n[![Latest release](https://img.shields.io/github/v/release/giongto35/cloud-game.svg)](https://github.com/giongto35/cloud-game/releases/latest)\n\n**Open-source Cloud Gaming Service For Retro Games**  \n**Video demo**: https://www.youtube.com/watch?v=GUBrJGAxZZg  \n**Technical wrapup**: https://webrtchacks.com/open-source-cloud-gaming-with-webrtc/  \n**CloudMorph**: [https://github.com/giongto35/cloud-morph](https://github.com/giongto35/cloud-morph): My current focus\non generic solution for cloudgaming\n\nDiscord: [Join Us](https://discord.gg/sXRQZa2zeP)\n\n![screenshot](https://user-images.githubusercontent.com/846874/235532552-8c8253df-aa8d-48c9-a58e-3f54e284f86e.jpg)\n\n## Try it at **[cloudretro.io](https://cloudretro.io)**\n\nDirect play an existing game: **[Pokemon Emerald](https://cloudretro.io/?id=1bd37d4b5dfda87c___Pokemon%20-%20Emerald%20Version%20(U))**\n\n## Introduction\n\nCloudRetro provides an open-source cloud gaming platform for retro games. It started as an experiment for testing cloud\ngaming performance with [WebRTC](https://github.com/pion/webrtc/) and [Libretro](https://www.libretro.com/), and now it\naims to deliver the most modern and convenient gaming experience through the technology.\n\nTheoretically, in cloud gaming, games are run on remote servers and media are streamed to the player optimally to ensure\nthe most comfortable user interaction. It opens the ability to play any retro games on web-browser directly, which are\nfully compatible with multi-platform like Desktop, Android, ~~IOS~~.\n\nIn ideal network condition and less resource contention on servers, the game will run smoothly as in the video demo.\nBecause I only hosted the platform on limited servers in US East, US West, Eu, Singapore, you may experience some\nlatency issues + connection problem. You can try hosting the service following the instruction the next section to have\na better sense of performance.\n\n## Feature\n\n1. **Cloud gaming**: Game logic and storage is hosted on cloud service. It reduces the cumbersome of game\n   initialization. Images and audio are streamed to user in the most optimal way using advanced encoding technology.\n2. **Cross-platform compatibility**: The game is run on web browser, the most universal built-in app. No console,\n   plugin, external app or devices are needed.\n3. **Emulator agnostic**: The game can be played directly without any extra effort to set up the gaming emulator or\n   platform.\n4. **Collaborate gameplay**: Follow the idea of\n   crowdplay([TwitchPlaysPokemon](https://en.wikipedia.org/wiki/Twitch_Plays_Pok%C3%A9mon)), multiple players can play\n   the same game together by addressing the same deeplink. The game experience is powered by cloud-gaming, so the game\n   is much smoother. [Check CrowdPlay section](#crowd-play-play-game-together)\n5. **Online multiplayer**: The first time in history, you can play multiplayer on Retro games online. You can try\n   Samurai Showndown with 2 players for fighting game example.\n5. **Horizontally scaled**: The infrastructure is designed to be able to scale under high traffic by adding more\n   instances.\n6. **Cloud storage**: Game state is storing on online storage, so you can come back and continue playing your incomplete\n   game later.\n\n## Development environment\n\n* Install [Go](https://golang.org/doc/install)\n* Install [libvpx](https://www.webmproject.org/code/), [libx264](https://www.videolan.org/developers/x264.html)\n  , [libopus](http://opus-codec.org/), [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/)\n  , [sdl2](https://wiki.libsdl.org/Installation), [libyuv](https://chromium.googlesource.com/libyuv/libyuv/)+[libjpeg-turbo](https://github.com/libjpeg-turbo/libjpeg-turbo)\n\n```\n# Ubuntu / Windows (WSL2)\napt-get install -y make gcc pkg-config libvpx-dev libx264-dev libopus-dev libsdl2-dev libyuv-dev libjpeg-turbo8-dev\n\n# MacOS\nbrew install pkg-config libvpx x264 opus sdl2 jpeg-turbo\n\n# Windows (MSYS2)\npacman -Sy --noconfirm --needed git make mingw-w64-ucrt-x86_64-{gcc,pkgconf,dlfcn,libvpx,opus,libx264,SDL2,libyuv,libjpeg-turbo}\n```\n\n(You don't need to download libyuv on macOS)\n\n(If you need to use the app on an older version of Ubuntu that does not have libyuv (when it says: unable to locate package libyuv-dev), you can add a custom apt repository: \n`add sudo add-apt-repository ppa:savoury1/graphics`)\n\nBecause the coordinator and workers need to run simultaneously. Workers connect to the coordinator.\n\n1. Script\n\n* `make dev.run`\n* The scripts spawns 2 processes one in the background and one in foreground\n\n2. Manual\n\n* Need to run coordinator and worker separately in two session\n* `go run cmd/coordinator/main.go` - spawn coordinator\n* `go run cmd/worker/main.go --coordinatorhost localhost:8000` - spawn workers connecting to coordinator\n\n__Additionally, you may install and configure an `X Server` display in order to be able to run OpenGL cores.__\n__See the `docker-compose.yml` file for Xvfb example config.__\n\n## Run with Docker\n\nUse makefile script: `make dev.run-docker` or Docker Compose directly: `docker compose up --build`.\nIt will spawn a docker environment and you can access the service on `localhost:8000`.\n\n## Configuration\n\nThe default configuration file is stored in the [`pkg/configs/config.yaml`](pkg/config/config.yaml) file.\nThis configuration file will be embedded into the applications and loaded automatically during startup.\nIn order to change the default parameters you can specify environment variables with the `CLOUD_GAME_` prefix, or place\na custom `config.yaml` file into one of these places: just near the application, `.cr` folder in user's home, or\nspecify own directory with `-w-conf` application param (`worker -w-conf /usr/conf`).\n\n## Deployment\n\nSee an example of [deployment scripts](.github/workflows/cd) if you want to try to host your own cloud-retro copy in the\ncloud. This script (deploy-app.sh) allows pushing configured application to the group of servers automatically. The\ncloud server should be any Debian-based system with the docker-compose\napplication [installed](https://docs.docker.com/compose/install/).\n\n## Technical documents\n\n- [Design document v2](DESIGNv2.md)\n- [webrtchacks Blog: Open Source Cloud Gaming with WebRTC](https://webrtchacks.com/open-source-cloud-gaming-with-webrtc/)\n- [Wiki (outdated)](https://github.com/giongto35/cloud-game/wiki)\n- [Code Pointer Wiki](https://github.com/giongto35/cloud-game/wiki/Code-Deep-Dive)\n\n## FAQ\n\n- [FAQ](https://github.com/giongto35/cloud-game/wiki/FAQ)\n\n## Crowd Play, play game together\n\nBy clicking these deep link, you can join the game directly and play it together with other people.\n\n- [Play Pokemon Emerald](https://cloudretro.io/?id=652e45d78d2b91cd___Pokemon%20-%20Emerald%20Version%20(U))\n- [Fire Emblem](https://cloudretro.io/?id=314ea4d7f9c94d25___Fire%20Emblem%20%28U%29%20%5B%21%5D)\n- [Samurai Showdown 4](https://cloudretro.io/?id=733c73064c368832___samsho4)\n- [Metal Slug X](https://cloudretro.io/?id=2a9c4b3f1c872d28___mslugx)\n\nAnd you can host the new game by yourself by accessing [cloudretro.io](https://cloudretro.io) and click \"share\" button\nto generate a permanent link to your game.\n\n## Credits\n\nWe are very much thankful to [everyone](https://github.com/giongto35/cloud-game/graphs/contributors) we've been lucky to\ncollaborate with and many people for help and inspiration from their awesome works.\n\nThanks:\n\n* [Pion](https://github.com/pion) team for the incredible Golang WebRTC library and their support.\n* [Libretro](https://www.libretro.com) team for the greatest emulation lib.\n* [kivutar](https://github.com/kivutar) for [go-nanoarch](https://github.com/libretro/go-nanoarch)\n  and [ludo](https://github.com/libretro/ludo).\n* [gen2brain](https://github.com/gen2brain) for the [h264](https://github.com/gen2brain/x264-go) and VPX encoder.\n* [poi5305](https://github.com/poi5305) for the [YUV video encoding](https://github.com/poi5305/go-yuv2webRTC).\n* [fogleman](https://github.com/fogleman) for the [NES emulator](https://github.com/fogleman/nes).\n\n#### Art\n\n* [October 2nd - Gameboy poltergeist](https://www.deviantart.com/wanyo/art/October-2nd-Gameboy-poltergeist-707754217)\n  by [Wayne Kubiak (wanyo)](https://www.deviantart.com/wanyo)\n* [1978](http://simoncpage.co.uk/blog/2009/01/retro-art-wallpaper/) by [Simon C Page](http://simoncpage.co.uk/)\n* [Linear Video game controller background Gadgets seamless pattern](https://stock.adobe.com/ru/images/linear-video-game-controller-background-gadgets-seamless-pattern/241143639)\n  by [Anna](https://stock.adobe.com/contributor/208277224/anna)\n\n# Announcement\n\n**[CloudMorph](https://github.com/giongto35/cloud-morph) is a sibling project that offers a more generic to\nrun any offline games/application on browser in Cloud Gaming\napproach: [https://github.com/giongto35/cloud-morph](https://github.com/giongto35/cloud-morph))**\n\n## Team\n\nAuthors:\n\n- Nguyen Huu Thanh (https://www.linkedin.com/in/huuthanhnguyen)\n- Tri Dang Minh (https://trich.im)\n\nMaintainers:\n\n- Sergey Stepanov (https://github.com/sergystepanov)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiongto35%2Fcloud-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiongto35%2Fcloud-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiongto35%2Fcloud-game/lists"}