{"id":13659087,"url":"https://github.com/jaxankey/Virtual-Game-Table","last_synced_at":"2025-04-24T12:30:46.405Z","repository":{"id":111239770,"uuid":"198053295","full_name":"jaxankey/Virtual-Game-Table","owner":"jaxankey","description":"A general-purpose, browser-based game table for casual games and rapid board game development.","archived":false,"fork":false,"pushed_at":"2023-02-27T01:04:44.000Z","size":29805,"stargazers_count":57,"open_issues_count":0,"forks_count":12,"subscribers_count":0,"default_branch":"VGT3","last_synced_at":"2024-08-02T05:10:15.708Z","etag":null,"topics":["board-game-table","cards-game","checkers-game","chess-game","go-game","poker-game","strategy-game","tabletop","tabletop-gaming","virtual-tables","virtual-tabletop"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaxankey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-07-21T12:26:23.000Z","updated_at":"2024-06-27T20:46:42.000Z","dependencies_parsed_at":"2023-03-13T13:43:12.326Z","dependency_job_id":null,"html_url":"https://github.com/jaxankey/Virtual-Game-Table","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaxankey%2FVirtual-Game-Table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaxankey%2FVirtual-Game-Table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaxankey%2FVirtual-Game-Table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaxankey%2FVirtual-Game-Table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaxankey","download_url":"https://codeload.github.com/jaxankey/Virtual-Game-Table/tar.gz/refs/heads/VGT3","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223952672,"owners_count":17230933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["board-game-table","cards-game","checkers-game","chess-game","go-game","poker-game","strategy-game","tabletop","tabletop-gaming","virtual-tables","virtual-tabletop"],"created_at":"2024-08-02T05:01:05.170Z","updated_at":"2024-11-10T12:31:17.176Z","avatar_url":"https://github.com/jaxankey.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Virtual Game Table\n\n![Aaron Clowning Billy at poker](https://raw.githubusercontent.com/jaxankey/Virtual-Game-Table/VGT3/games/poker/screenshot.png)\n\nVirtual Game Table is a general-purpose, online, multiplayer, browser-based board game table, aimed at online game nights and rapid game development. No rules will be hard coded, so you can play however you like. The goal is to provide an intuitive, synchronized game table in everyone's browser, and an engine that accelerates the creation of new games. Virtual Game Table has been extensively Dad tested and Dad approved™.\n\n\n## Starting and testing a server\n\nThis program runs directly from the source code (see [Releases](https://github.com/jaxankey/Virtual-Game-Table/releases)) so no compiling or binaries are required, other than downloading / installing [Node.js](https://nodejs.org/). This server has been tested on Linux \u0026 Windows, but should work on OSX as well.\n\nLinux\n 1. Install [Node.js](https://nodejs.org/): For me, this meant running the command `sudo apt install nodejs`, but you can also download the binaries, unpack them in a convenient folder, add the binary path to `.profile` (with a line like `PATH=$PATH:/path/to/node/bin`) then log out \u0026 back in.\n 2. From a console in the Virtual-Game-Table folder, run `start-server-linux` from the terminal. You can optionally specify a game and port, e.g., `start-server-linux poker 37000`.\n \nWindows\n 1. Install [Node.js](https://nodejs.org/): Download the appropriate windows installer and run it.\n 2. Double-click `start-server-windows.bat` and optionally type the game name and port when prompted.\n \nYou can also launch a server directly with a command similar to `node server.js cards 37777`. 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 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, click a few things, see what happens. \n\nNote this is the perfect use of the [Amazon Web Services](https://aws.amazon.com/) \"Always Free\" tier, combined with [DuckDNS](https://duckdns.org/). I may write a tutorial on setting this up at some point, given enough interest.\n\n## A Minimal Game\n\nTo give a sense of how the engine works, here is the minimal code required to make the most basic checkers game (see `games/minimal/game.js`):\n\n```javascript\n// Master list of all images with identifiers. \nVGT.images = { paths: {\n  hand          : 'images/hands/hand.png',             // Required for player hands\n  fist          : 'images/hands/fist.png',             // Required for player hands\n  board         : 'images/checkers/board.png',         // Checkered board\n  checker_black : 'images/checkers/checker_black.png', // Black checker\n  king_black    : 'images/checkers/king_black.png',    // Black king\n  checker_red   : 'images/checkers/checker_red.png',   // Red checker\n  king_red      : 'images/checkers/king_red.png',      // Red king\n}}\n\n// Create the Game instance\nvar game = new VGT.Game();\n\n// Add the game board to layer 0, and allow only the manager to move it\ngame.add_piece({layer:0, teams:['Manager']}, 'board');\n\n// Add some checkers with a king symbol on the back to layer 1\ngame.add_pieces(12, {layer:1}, ['checker_red',   'king_red'  ])\ngame.add_pieces(12, {layer:1}, ['checker_black', 'king_black'])\n\n// Define the function that is called when someone clicks the 'new game' button.\n// The file 'setup-standard.txt' was created by manually setting things up in the\n// browser and then pushing the 'save' button.\nfunction new_game() { game.load_state_from_server('setup-standard.txt') }\n```\n\nA more complicated version of this, including a snap grid, is in the `games/checkers` folder. Even for the more complicated games (poker, e.g.), writing the code takes far less time than making / finding the images.\n\n\n## Games\n\nThe games I have coded thus far include some basics:\n * `checkers`: Checkers \u0026 board (double-click pieces to king them)\n * `chess`: Chess pieces \u0026 board\n * `cards`: A standard deck of cards with 8 private viewing zones\n * `poker`: Same as cards, but with poker chips on the table and related functionality\n \nand some more complicated systems:\n * `puerto-rico`: Puerto Rico (can't publish images, but you can find / scan them)\n\n\n## Controls\n\nYou can do most things with the mouse and \"shift\" button, but it is *well* worth your time to learn the keyboard shortcuts; they make navigation and manipulation very smooth and fast.\n\n![Controls](https://raw.githubusercontent.com/jaxankey/Virtual-Game-Table/VGT3/common/images/controls.png)\n\n\n## Roadmap\n * `arkham-horror`: Arkham Horror base set (can't publish images, but you can find / scan them)\n * `pandemic`: Pandemic base set plus some other stuff.\n * Go: Stones and a board\n * Chess clock object for timed games\n\nEach of these games illustrate the functionalities built into the workhorse code in `common/engine.js` and `server.js`. So, if you're interested in writing your own games, I recommend interacting with these examples 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 `minimal/game.js` first, since it's by far the simplest! Then check out `checkers`, `chess`, and (quite complex) `poker` or `puerto-rico`.\n\n\n## Known issues\n * Firefox on Linux has horrible rendering speed that can grind to a halt, likely due to the webGL context being immediately lost for some reason, or the browser thinking things are not hardware accelerated. Recommend using chrome on Linux. Firefox works great on Windows.\n * Looks distorted on phones, not that this is intended for phones (yet?)\n\n\n## Here to Help\nFeel free to pester me (jack.sankey@gmail.com) if something isn't clear. I will likely be a bit slow to respond, but I believe in this project and will gladly update the comments in the code or help out within reason. At some point a larger documentation should occur, but only if this gets popular. For now, learn by example: play with the existing games and check the code to see how different features are implemented.\n\nThings I will _never_ do:\n * Hard-code any rules or anti-cheat measures. You will _always_ be able to look at your oponent's hidden pieces or move them around when they are taking a poo. \n * Convince my friends and family that the games I personally invent are worth playing.\n\nMore to come...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaxankey%2FVirtual-Game-Table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaxankey%2FVirtual-Game-Table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaxankey%2FVirtual-Game-Table/lists"}