Web-based Cloud Gaming service for Retro Game
Find a file
2019-04-08 21:32:06 +08:00
nes Remove gl 2019-03-31 23:54:02 +08:00
static Add 2 players 2019-04-08 17:28:11 +08:00
ui Add 2 players 2019-04-08 17:28:11 +08:00
util Remove unnecessary code 2019-04-06 01:05:07 +08:00
vpx-encoder Remove gl 2019-03-31 23:54:02 +08:00
webrtc Add 2 players 2019-04-08 17:28:11 +08:00
Dockerfile Update pion package 2019-04-07 02:12:10 +08:00
main.go Add 2 players 2019-04-08 17:28:11 +08:00
README.md Add REAME WIP 2019-04-08 21:32:06 +08:00

Cloud Gaming Service Lite

Cloud Gaming Service is an open source Cloud Gaming Service building on WebRTC.

With Cloud gaming, you can play any of your favourite NES game directly on your browser without installing it on your machine. It also brings modern online multiplayer gaming experience to NES game, so two people can play the game together . Joystick gaming is the past :P.

Feature

Try the game

For the best gaming experience, please select the closest region to you.
Southeast Asia:
nes.webgame2d.com
nes.playcloud.games
US West:
usw.nes.webgame2d.com
usw.nes.playcloud.games
US East:
use.nes.webgame2d.com
use.nes.playcloud.games
Europe:
eu.nes.webgame2d.com
eu.nes.playcloud.games

Development environment

You can host the server yourself by running ./run_local.sh. It will spawn a docker environment and run it on localhost:8000.

Architecture

Techstack

Code architecture

Document

Frontend

Backend

AIEnvironment

Codebase

.
├── cs2dclient
│   ├── index.html
│   ├── src
│   │   ├── config.js: javascript config
│   │   ├── index.html
│   │   ├── main.js
│   │   ├── sprites
│   │   │   ├── Leaderboard.js: Leaderboard object
│   │   │   ├── Map.js: Map object
│   │   │   ├── Player.js: Player object
│   │   │   └── Shoot.js: Shoot object
│   │   ├── states
│   │   │   ├── Boot.js Boot screen
│   │   │   ├── const.js
│   │   │   ├── Game.js: Game master
│   │   │   ├── message_pb.js: Protobuf Message
│   │   │   ├── Splash.js
│   │   │   └── utils.js
│   │   └── utils.js
├── cs2dserver
│   ├── buildwall.js
│   ├── cmd
│   │   └── server
│   │       └── server.go: Entrypoint running server
│   ├── game
│   │   ├── common
│   │   ├── config
│   │   │   └── 1.map: Map represented 0 and 1
│   │   ├── eventmanager
│   │   ├── gameconst
│   │   ├── game.go
│   │   ├── mappkg
│   │   ├── objmanager
│   │   ├── playerpkg
│   │   ├── shape
│   │   ├── shootpkg
│   │   ├── types.go
│   │   └── ws
│   │       ├── types.go
│   │       ├── wsclient.go
│   │       └── wshub.go
│   ├── generate.sh: Generate protobuf for server + client + AI environment
│   ├── message.proto
│   └── Message_proto
│       └── message.pb.go
├── gym: Training script for game (IN PROGRESS)
│   ├── cs2denv.py: Agent to communicate with server. Can connect to localhost or prod server
│   ├── lib
│   │   ├── common.py
│   ├── loadtest.py: Load test script to server
│   ├── message_pb2.py
│   ├── messenger.py
│   ├── test_env.py
│   ├── train2.py
│   └── train.py
├── Dockerfile
└── run_local.sh

Credits

Pion Webrtc team for the incredible Golang Webrtc library and their supports https://github.com/pion/webrtc/ Fogleman for the awesome nes emulator https://github.com/fogleman/nes poi5305 for the video encoding https://github.com/poi5305/go-yuv2webRTC And last but not least, my longtime friend: https://github.com/trichimtrich for his

Contributor

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

Tri Dang Minh https://trich.im