Make your own Dobble / Spot It game with Google Slides and Apps Script

Upload a few images to Google Drive, press the trigger to start a little Apps Script code and you will get your own Dobble game on Google Slides.

Romain Vialard
4 min readApr 14, 2020
Having been stuck at home for a few weeks now, we bought several board games to entertain our children, including 2 Dobble card decks for 4+ years old children (6 images per card instead of the classic 8).

This tutorial will guide you into creating your own Dobble card deck with Google Slides, which you can easily print for use in your day to day life.

Yes, I made one on the Paw Patrol universe…

Select images for your card deck

Gameplay: any two cards always share one, and only one, matching symbol. The object of the game is to be the first to announce the drawing in common between two given cards (Wikipedia).

To build your card game, you will need at least 13 images / symbols, to create a deck of 13 cards with 4 different symbols. To create cards with 6 different symbols, you will need at least 27 images but this will only give you a deck of 15 different cards. Best is to provide 31 images, generating a deck of 31 cards with 6 different symbols on each card and, as always, only one matching symbol between any 2 cards (and if you want 8 symbols / card, provide 57 images).

It’s also best to select images with a transparent or white background and a square aspect ratio. Otherwise you will get a lot of empty space between each symbols. To find images matching those requirements, you can use this url to search on Google Images:
https://www.google.com/imghp?as_st=y&tbm=isch&safe=images&tbs=ic:trans,iar:s

Search Google for images with transparent background and square aspect ratio

Upload your images to Google Drive

Create a new folder in Google Drive, upload your images and copy the folder ID.

The folder ID is the last part of the url in the address bar of your web browser

Copy and run the script

Update (October ‘20): a Google Drive add-on is now available, making the process way easier than the method described here.
Here’s the installation link:
https://gsuite.google.com/marketplace/app/findtwins_card_game_creator/564048325819

All the steps below are also available as a video tutorial

1- Open the following Google Apps Script project in your web browser: https://script.google.com/d/1_o1COq1Or1IK_26pvRjXy17VXDU8_2iBZ3F-eLajQuBeaif3Sdw_IlR_/edit?usp=sharing

2- Inside this project, click on the menu File > Make a copy:

3- On line 6, replace the ID between the 2 quotes by your Google Drive folder ID, then save (ctrl+s).

4- In the “Select function” dropdown, select “buildCardGame”, then click on the run / play icon. You will be asked to grant a few permissions (to access your Google Drive folder and create a Google Slides presentation) then the script will start running.

5- The script might take a few minutes to run. Once finished, you will find a presentation in your Drive folder.

Fine tune the result

The presentation contains one slide par card. If you are not 100% happy with the cards generated, you can easily change the size & rotation of the different images in each card.

Changing size, rotation and position of each image is super easy (but not required if you are happy with the raw result)

Print your card deck

That’s all, you can now print your deck using the print settings of Google Slides.

On my side, I’ve chosen to use an online photo printing service (some let you print photos with a square aspect ratio and a size quite similar to the standard Dobble cards). But you need to provide a bunch of photos / images, not a Google Slides presentation.

So you can use a second function in the Apps Script project to convert your presentation into images (one image per slide). Select “exportGoogleSlidesAsImages” and click on the run / play icon.

This will create a subfolder in the Google Drive folder you have selected at the beginning and export each slide as images in that subfolder.

You can then download all those images, choose an online photo printing service and order your card deck!

The final result

--

--

Romain Vialard
Romain Vialard

Written by Romain Vialard

Google Developer Expert, creator of several successful add-ons for Gmail, Drive,...

Responses (34)