Waiting for Player 2
44 |Arrow keys = joypad, X = a, Z = b, Enter = start, Ctrl = select
45 | 46 |├── .gitignore ├── .gitmodules ├── README.md ├── demo.gif ├── go.mod ├── go.sum ├── index.html └── server.go /.gitignore: -------------------------------------------------------------------------------- 1 | *.nes 2 | melody-jsnes 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "jsnes"] 2 | path = jsnes 3 | url = https://github.com/bfirsh/jsnes 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # melody-jsnes 2 | 3 | > Super simplistic Multiplayer NES server in Go. 4 | 5 | melody-jsnes is a demo project showing off Go's real-time web app 6 | capabilities. Its design is straight forward, it just snapshots the 7 | canvas of player one and sends it to player two and sends back inputs 8 | from player two. Images data goes in direction, key codes in the other. 9 | 10 |  11 | 12 | ## Usage 13 | 14 | You will need to have at least one NES ROM with the extension `.nes`. 15 | 16 | $ git clone --recursive https://github.com/olahol/melody-jsnes 17 | $ go get 18 | $ go build 19 | $ ./melody-jsnes game.nes 20 | $ $BROWSER http://localhost:5000 21 | 22 | ## Contributors 23 | 24 | * Ola Holmström (@olahol) 25 | * Chris Cacciatore (@cacciatc) 26 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olahol/melody-jsnes/7acf271737df094a918cea2382f875733ace1c17/demo.gif -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/olahol/melody-jsnes 2 | 3 | go 1.19 4 | 5 | require github.com/olahol/melody v1.1.1 6 | 7 | require github.com/gorilla/websocket v1.5.0 // indirect 8 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 2 | github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= 3 | github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= 4 | github.com/olahol/melody v1.1.1 h1:amgBhR7pDY0rA0JHWprgLF0LnVztognAwEQgf/WYLVM= 5 | github.com/olahol/melody v1.1.1/go.mod h1:GgkTl6Y7yWj/HtfD48Q5vLKPVoZOH+Qqgfa7CvJgJM4= 6 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 7 | github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= 8 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 9 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |Arrow keys = joypad, X = a, Z = b, Enter = start, Ctrl = select
45 | 46 |