0.1.1 • Published 7 years ago

browser-wars v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Browser Wars

WARNING: I am NOT liable for any damages inflicted on your device or browser during gameplay. By playing this game, you acknowledge the risks accompanying the game.

Browser Wars is a novelty game made for Javascript programmers. The objective is simply to make your opponent(s) disconnect from the game server in any way.

##Installation Requires Node.js v6+.

npm install -g browser-wars

##Starting the game From the terminal, run:

browserwars

This will set up the game server on port 3000. If you want to run the game at a custom port, use:

browserwars 8080

After running this command, your game will be hosted at localhost.

##Connecting other players There are 2 ways for a user to connect to your game server:

  1. Users on the same wifi network can connect through localhost.
  2. To reach users on different networks, expose your local server using software like ngrok.

##Gameplay Upon reaching the localhost game page, you will see a PLAYERS field and a YOU ARE PLAYER field. The PLAYERS field indicates the number designations of players currently on your game server. The YOU ARE PLAYER field indicates your player designation. Be careful not to reload the page, as this will reassign your player designation.

You will be given one more thing: a Javascript function called exec. It takes in 2 arguments: Javascript code as a string, and a player designation as a number. Use the browser console!

There are no predefined rules. The battle is yours to fight...