Skip to content

nathanharper/Chiquitita

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chiquitita

Inspired by "TwitchPlaysPokemon", this is a way for multiple users to simultaneously play a remote SNES emulator via a web interface. Invite your friends to join in and try to play the game at the same time, resulting in much confusion and anguish. Screencast the game for even more fun!

Install and Run


To install:

sudo apt-get install nodejs npm zsnes xdotool git
git clone https://github.com/nathanharper/Chiquitita.git
cd Chiquitita
npm install

This command will start up the zsnes emulator, start a server at http://localhost:12345, and open it in a browser window. You can theoretically use other snes emulators, or basically anything that runs in an X window. Should work on Linux and Mac, though dependency installation method will obviously vary.

./run_http.sh super_mario.smc

To just start the server with ZSNES already running, do this (replacing [PORT] with the port to run the server on):

node server/server.js "$(xdotool search --class ZSNES|awk 'NR==1{print $1}')" [PORT] http

Configuration


If you're not using the default ZSNES configuration scheme, or you're trying to configure this for another emulator, you can change the server/keys.json file. It's a straightforward JSON array of char/key codes and the button name associated with each (for more details on the codes, check out jQuery's documentation for event.which).

TODO


  • I'd like to make it so that subsequent keypresses always trump the prior one, to make the multi-player support a bit wackier.
  • Might be worth it to make a native Node binding to libxdo instead of delegating to shell.

Special Thanks


I yoinked the wonderful HTML/CSS snes controller from Tim Pietrusky on Codepen!

About

Hacky attempt to set up a "TwitchPlaysPokemon" style linux server with Zsnes and xdotool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published