Scripting has arrived

Welcome to the largest feature update yet: Tabletop Playground now has scripting support using JavaScript!

Scripts bring a whole new level of possibilities for creating games in Tabletop Playground. You can use them to automate tasks, help with counting and bookkeeping, enforce game rules, or even create AI opponents. The rest of this post will become a bit technical, so if you’re more interested in playing than creating, rest assured that better and more complex games are now possible!

Tabletop Playground offers three ways to use scripting: When creating a game using the Editor, you can define a global script, you can attach scripts to objects, and you can use the in-game scripting console to execute code immediately. You can also activate the scripting console if you’re hosting a multiplayer game, giving you scripting superpowers! But remember that with great power comes great responsibility…

You can write script files in the text editor of your choice, we recommend Visual Studio Code: it’s fast, free, and gives you lots of useful features when editing Tabletop Playground scripts. There’s syntax highlighting, autocompletion, and direct access to the API documentation. You can even debug your scripts with breakpoints and inspect the contents of variables!

JavaScript is one of the most popular programming languages today. That comes with many advantages: you may already know how to code in JavaScript, and if you don’t, there’s lots of resources online to help you learn. There are also many existing modules that can be used to make scripting easier and enhance what you can do.

The JavaScript engine used is the same as the one in the Google Chrome browser. That means it’s very fast, allowing complex computations even while running the game. It also supports the Chrome debugger and console – if you have used JavaScript before, you will know how useful they can be!

The current beta release contains a lot of scripting functionality already, but we won’t stop there: we plan to continue to improve and enhance the API until release and beyond. With your feedback helping shape what features we add for scripting!

Start testing out the scripting in Tabletop Playground right now through our early access Creator’s Program. Join our Discord server to become part of our growing tabletop gaming community and to get the latest updates on development as we work towards release.

You can wishlist Tabletop Playground on Steam and follow us on itch.io, Facebook, Twitter and IndieDB to be the first to know when it launches in 2020.

Close Menu