Integrate games into your chatbotšŸ‘¾

Add some fun to your chatbot!

BOTNATION AI offers several game templates that you can integrate into your chatbot. In this article, we will see how to add and customize them according to your wishes.

āžœ Discover Botnation and launch your chatbot easily!

1. Creating a game

The game creation interface is accessible by clicking on the “Games” icon in the “Exclusive Tools” menu of your chatbot. You will then be offered to choose from a list of already created game templates.

Here is a description of the games currently available:

  • Dotty: this is a game model whose goal is to create as many strings of dots of the same color as possible within a given time.
  • Memory: as the name suggests, this is a model of “memory” games in which the aim is to find as many pairs of images as possible within a given time.

You can test these games before adding them to get a better idea of their gameplay.

If you have already created a game, the interface will directly display the customization module for it. To get back to the game creation interface, you just have to click on the “Add a game” button in the left bar.

2. Customization of the game

After choosing a game template, you can customize it by putting your own images or sounds, replacing existing texts or changing some gameplay parameters.

The customization interface is divided into three parts:

1 – The title bar: here you can rename your game, duplicate it or delete it.
2- The customization area: here you can change the images, texts and gameplay settings of the game model.
3 – The preview area: here you can play the game and see your changes in real time.

We will study in more detail the possibilities offered by the customization area. All the templates have a common module allowing you to modify :

  • the game logo (displayed at the top center)
  • the background image of the game
  • the color of the texts
  • the color of the buttons
  • the duration of the game (minimum 30s, maximum 120s)
  • the texts displayed in the game (both in the menus and in the buttons)
  • sounds of the game

To modify an image, simply drag your file onto the corresponding zone, or click on this zone and then choose your file manually. An ideal size is usually indicated for the image. If your image is of a different size, a cropping tool will be proposed.

To modify a sound you must first delete the existing one by clicking on the delete icon. You can then add your own sound by dragging it onto the corresponding area or by clicking on the area and selecting it. If you leave a zone empty then the game will not play any sound for the associated event. A maximum size is indicated for each sound. The loading time of the game depends greatly on the size of the sounds. The mp3 format is mandatory.

At the bottom of the customization area you will find a specific module for each game model:

Memory

The Memory game model works with a rotation of themes. That is, if the player manages to find all the pairs in the first theme and has time left, the next theme in the rotation will be displayed.
By default there are 3 themes activated in the rotation. You can activate/deactivate a theme by clicking on the associated checkbox.
To customize a theme you need an image representing the back of the card and 8 images representing the pairs to find.

Dotty

The Dotty game model allows you to choose the number of different points that will be displayed to the player (between 3 and 6). The fewer the number of different points, the easier the game. On the contrary, the more different points there are, the more difficult the game is.
For each point you can change its image and the color of the line that will connect them. Note that no matter what image you put in, only the central circular part will be taken into account.
Finally it is also possible to change the image of the point support (as for the points only the central part will be taken into account).

3. Integration of the game in the bot

The integration of the game in the chatbot is done via the “Game” story. This story must be at the end of the sequence.

The story consists of the following elements:

  • A text that will be displayed to the user before launching the game.
  • The title of the button that will launch the game.
  • The selected game from the list of created games.
  • The name of the variable that will contain the user’s score.
  • The name of the sequence that will be launched when the user quits the game.

It should be noted that on Facebook Messenger, if the user quits the game by closing the webview with the cross, the redirection sequence will not be launched. This requires the user to exit the game with the “Back to Bot” button.

Now you’re ready to integrate a game into your chatbot and bring even more fun to your users. Let your imagination run wild!

Plus:
All about {{…}} variables
Import and Export data with the Webhook function
Import and Export data with Google Sheet
A/B Testing Optimizations

āžœ Discover Botnation and launch your chatbot easily!