Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
This is an Angular web app to let you play BerryBots in a browser. You can try it on the web at: http://playberrybots.com The UI includes: * A code editor with nice colors and Lua syntax highlighting. * A configuration pane for selecting from a few of the sample stages (with pictures!), plus an opponent appropriate for the stage (if any). * A "starter kit", so you can begin by selecting from a few movement and targeting snippets. In a few clicks, you can have a pretty decent bot. * A "sample bots" gallery, so you can begin by browsing some of the sample bots and starting from their code. On submit, a Perl script saves your code, runs the BerryBots match (headless) on a server, saves the replay, and loads the replay URL in an iframe. To set this up yourself: * It's branched from angular-seed: https://github.com/angular/angular-seed So you might want to check its README too. First off, you'll need node.js and its package manager (npm) from http://nodejs.org/. * Once you have that, run: ~> npm install to get the dependencies ("node_modules" and "app/bower_components"). * Then you can do: * "npm start" to run the server locally: http://localhost:8000 * ...or "npm test" to run the unit tests. * ...or "npm run protractor" to run the end-to-end tests. * To actually serve it, copy app/* files to your web server, eg /var/www. * Compile the BerryBots 'webui' Makefile target from source on your server. ~> unzip ~/Downloads/berrybots_src_1.3.2.zip ~> cd berrybots ~/berrybots> ./configure --with-nodeps ~/berrybots> make webui * Copy the latest replay JS from BerryBots to the web UI replays directory. cp ~/berrybots/replays/*.js /var/www/replays * Update /var/www/cgi-bin/runmatch.pl to point to the BerryBots instance and web replays directories. * Modify permissions to ensure your web server can execute BerryBots, that the web replays directory is writeable, and that the files in cgi-bin are executable.