|
1 | 1 | # Virtual Game Table |
2 | 2 | This is a general-purpose, browser-based board game table, aimed at online game nights and rapid game development. No rules will ever be hard coded, so you can play however you like. The purpose of this is only to provide a simple, intuitive, synchronized game table in everyone's browser. |
3 | 3 |
|
4 | | - |
| 4 | + |
5 | 5 |
|
6 | | -The client software currently requires [Chrome](https://www.google.com/chrome/) to run, and the server has been tested on Linux and Windows (but should work on osx). |
| 6 | +The client software currently requires [Chrome](https://www.google.com/chrome/) to run. |
7 | 7 |
|
8 | | -## Starting a server |
| 8 | +## Starting and testing a server |
9 | 9 |
|
10 | | -### Linux |
11 | | - 1. Install [https://nodejs.org/](Node.js): For me, this meant downloading the binaries, unpacking them in a convenient folder, adding the binary path to `.bashrc`. |
12 | | - 2. Open a terminal in one of the game directories, and run `./start-server-linux`. |
| 10 | +This program runs directly from the source code, so no compiling or binaries are required (other than downloading / installing [https://nodejs.org/](Node.js)!). This server has been tested on Linux & Windows, but should work on OSX as well. |
| 11 | + |
| 12 | +Linux |
| 13 | + 1. Install [https://nodejs.org/](Node.js): For me, this meant downloading the binaries, unpacking them in a convenient folder, adding the binary path to `.profile` (with a line like `PATH=$PATH:/home/jack/Applications/node-v10.16.0-linux-x64/bin`) then logging out back in. |
| 14 | + 2. Run `start-server-linux` from the terminal. |
13 | 15 |
|
14 | | -### Windows |
| 16 | +Windows |
15 | 17 | 1. Install [https://nodejs.org/](Node.js): Download the appropriate windows installer and run it. |
16 | | - 2. Double-click `start-server-windows.bat` in one of the game directories. |
| 18 | + 2. Double-click `start-server-windows.bat` in one of the game directories. |
| 19 | + |
| 20 | +These scripts will prompt you for a game name, and you can type any of the subdirectory names in either `games/` or `private/` (which you must create). They will then ask for a port number, and you can provide any valid port, e.g., `37777`. You can also launch a server directly with a command similar to `node server.js cards 37777`. |
17 | 21 |
|
18 | | -A successfully booted server should declare something like `listening on port 37777`. At this point, open up a few Chrome windows side-by-side and point them at the address `localhost:37777`. Things moving around in one window should also move around in the other. Push a few buttons, click a few things, see what happens. Click the "controls" link in the upper right to see some of the keyboard shortcuts. |
| 22 | +A successfully booted server should declare something like `listening on port 37777` after initializing. At this point, you can test the server by opening a few Chrome browser windows side-by-side and typing in the address `localhost:37777`. Things moving around in one window should also move around in the other. Push a few buttons (especially the `New Game` or `Setup` buttons, click a few things, see what happens. |
| 23 | + |
| 24 | +Definitely take a look at the "controls" link in the upper right to see what kind of keyboard shortcuts you have access to. It is well worth your time to learn a few of these! |
19 | 25 |
|
20 | 26 | ## Games |
21 | 27 | The games I have coded thus far include: |
22 | | - * Checkers |
23 | | - * Chess |
24 | | - * Go |
25 | | - * Cards & Poker |
26 | | - * My own strategy game |
27 | | - * Puerto Rico (can't publish!) |
28 | | - * Arkham Horror (can't publish!) |
29 | | - |
30 | | -Each of these games illustrate the functionalities of the main workhorse code in `browser.js` and `server.js`. So, if you're interested in writing your own games, I recommend playing with these to see what's possible, then looking at the `game.js` code for each to see how things are actually implemented. I'd play with `checkers/game.js` first, since it's by far the simplest! |
| 28 | + * `checkers`: Checkers & board (double-click pieces to king them) |
| 29 | + * `chess`: Chess pieces & board |
| 30 | + * `go`: Go table & board |
| 31 | + * `cards`: A standard deck of cards with 8 private viewing zones |
| 32 | + * `poker`: Same as cards, but with poker chips |
| 33 | + * `roll`: All the nerd-dice and a few more pieces (press / hold `r` to roll) |
| 34 | + * `strategy`: Pieces for my own strategy game |
| 35 | + * `puerto-rico`: Puerto Rico (can't publish images; check vassal and `image_list.txt`?) |
| 36 | + * `arkham-horror`: Arkham Horror base set (can't publish images; check vassal and `image_list.txt`) |
| 37 | + |
| 38 | +Each of these games illustrate the functionalities of the main workhorse code in `browser.js` and `server.js`. So, if you're interested in writing your own games, I recommend playing with these to see what's possible, then looking at the `game.js` code for each to see how things are actually implemented. In particular, I would monkey with `checkers/game.js` first, since it's by far the simplest! |
31 | 39 |
|
32 | 40 | ## Here to Help |
33 | | -Feel free to pester me if something isn't clear. I will be slow to respond, but I believe in this project and will gladly update the comments in the code or help out within reason. |
| 41 | +Feel free to pester me if something isn't clear. I will likely be slow to respond, but I believe in this project and will gladly update the comments in the code or help out within reason. |
34 | 42 |
|
35 | 43 | My next goals (if I ever find time) include: |
36 | 44 | * Pandemic |
|
0 commit comments