a virtual surface in the browser on which you can play board, dice and card games
Go to file
Kok Yong bd76d5eabb
All checks were successful
Publish Docker image / Push Docker image (push) Successful in 2m18s
Merge pull request 'main' (#5) from GitHub/virtualtabletop:main into main
Reviewed-on: #5
2024-09-20 08:34:22 +08:00
.devcontainer added Codespaces support (#2290) 2024-09-06 22:04:54 +00:00
.gitea/workflows fixed build issue by bypassing cloudflare tunnel using internal DNS 2024-09-13 16:02:03 +08:00
.github added link to game (#1908) 2024-01-26 08:59:10 +00:00
.idea add workflow to build docker image 2024-09-03 08:32:20 +08:00
.vscode fixed Gitpod (#2292) 2024-09-06 22:17:10 +00:00
assets Add hex game pieces and auto hex grid calculation (#2127) 2024-06-15 08:55:48 -05:00
client also update dropTarget when a widget id changes (#2316) 2024-09-19 13:13:45 +00:00
library Adds count:"all" and allows count:0 (#1466) 2024-09-13 17:37:31 +02:00
server Adds count:"all" and allows count:0 (#1466) 2024-09-13 17:37:31 +02:00
tests Adds count:"all" and allows count:0 (#1466) 2024-09-13 17:37:31 +02:00
.drone.yml Add Dockerfile and CI 2023-07-11 20:50:02 +08:00
.editorconfig Establish editorconfig; git ignore tgz files 2020-12-29 17:00:39 +01:00
.gitconfig Add scoreboard widget (#1381) 2023-01-04 18:43:42 -05:00
.gitignore Updates to Material Icons and Roboto fonts (#1657) 2023-02-27 14:53:15 +00:00
.gitpod-init.sh fixed Gitpod (#2292) 2024-09-06 22:17:10 +00:00
.gitpod.yml fixed Gitpod (#2292) 2024-09-06 22:17:10 +00:00
CODEOWNERS add UltimateGook as owner of jest.config.mjs 2021-01-09 23:57:53 +01:00
config.template.json added serverName to config (#1832) 2023-09-29 05:50:43 +00:00
Dockerfile upgrade to node.js 21 2024-09-03 09:55:17 +08:00
jest.config.mjs Refactor common test code into reusable files 2021-01-10 15:21:36 +01:00
LICENSE Initial commit 2020-10-27 14:38:49 +01:00
package-lock.json updated dependencies (#2156) 2024-08-12 09:47:00 +02:00
package.json updated dependencies (#2156) 2024-08-12 09:47:00 +02:00
README.md added Android server instructions to the readme (#2223) 2024-08-18 15:13:56 +00:00
SECURITY.md Create SECURITY.md 2020-12-30 18:34:31 +01:00
server.mjs added link to game (#1908) 2024-01-26 08:59:10 +00:00

Gitpod ready-to-code

virtualtabletop.io

VTT is an open-source, free to use platform for creating and playing games. This project aims to create a virtual tabletop in the browser where you can (re)create all board, dice and card games and play them without registration over the internet.

Playing games

We have hundreds of games in our public library that are ready to play right now. That includes classic games like Chinese checkers, backgammon, mancala, Nine Mens Morris, Reversi, tangrams, and hangman. It includes modern games that are similar to many popular card and board games available around the world today. Most of the games are in English, but quite a few are “universal” and require no ability to read or understand English. And a handful are offered in German and Portuguese and a few more in Spanish and French. See Games for more detail.

Creating games

New games may be created in VTT using a combination of drag-and-drop and writing JSON text. Capabilities added in JSON include iterating, conditional evaluations, calculations, and other things you might expect to find in a programming system. (See Functions for more detail.) The game designer can include player seats, action buttons, sound, scoreboards, and drawing canvases, in addition to many other tools. (See Widgets for more detail.)

To understand how to use VTT for playing or creating games, you should start by reading Playing Games. This will give you an overview of how VTT works as a game-playing platform, including information about loading and storing games. If playing games is the only way in which you want to utilize VTT, this should be all you need to read. But in any case we recommend joining our Discord server. There you will be able to ask questions about how VTT works.

If you want to modify an existing game, or do game development, after reading about Playing Games, you should next read Creating Games. This section will give you an overview of how to create a game, and will point you to the other sections in this Wiki that provide more detailed information. In particular, you will want to use the pages in section 2, Developer Documentation, as a reference, and we encourage you to at least read the introductory section to each of those pages.

Contributing

If you want to contribute to VTT development, please read Helping Out.

Finally, we appreciate donations that go towards paying for the domain name, the servers, and additional software supporting game development. You can donate at https://www.patreon.com/virtualtabletop/about.

Enjoy! And don't be shy about asking questions in Discord; you will find a helpful and responsive audience.

Playing offline on Android

You can use an Android phone as the server and play with any devices offline by using its wifi hotspot:

  • Install and open https://termux.dev/ on your Android device.
  • Run curl -L is.gd/vttandroid | sh.

Hosting own server

You can host your own instance or go to VirtualTabletop.io.

This project is inspired by playingcards.io.

This project aims to be able to import PCIO files and have them be immediately playable.

Come join our Discord server if you want to discuss the project.

This project started after a reddit post in our playingcardsio subreddit.

Download this repository and get all dependencies

Follow the steps in Download Repository.

Starting the server

Now you can start the server by typing:

npm start

If that doesn't work, try:

node server.mjs

This will serve the project at localhost:8272.

If you close you terminal and wants to restart you server you will need to get back to you clone folder using cd

Debug

To debug client-side code, first start the server so that it doesn't compress the code:

npm run debug

On windows, enter SET NOCOMPRESS=1 in a terminal prior to starting the server with npm start.

In your browser, refresh to have it re-download the client code. Press F12 to show the developer tools.

In Chromium, select the Sources tab, then the select the file for the room. Press Ctrl-f to search for the code you want to set a breakpoint for an step through.

Testing

To run the unit tests (and get a coverage report):

npm test

To run them continuously (on each save) while you develop:

npm run test-cont

License

The project is licensed under GPLv3.

The cards in assets/cards-default were created by Adrian Kennard and released under CC0 Public Domain license.

The cards in assets/cards-plastic have their own license.txt file.

The icons in assets/icons-white were found at Font Awesome with license CC BY 4.0.

The games in the public library have their license information and attributions inside their attribution metadata field. You can read by adding the game to your game library and clicking Edit.