The Croquet extension is an online communication system that allows you to create a project that communicates online like chat, video game etc. To avoid interference, a room name has to be chosen for creating a connection between different users.

This extension is based on Croquet.io.

Tutorial

The basic idea of the Croquet extension is to connect several executions of a project based on a global ID in the Croquet.io system, which identifies some kind of “session”. This is done with the “start” block.

Untitled

Once the project is connected to a session, some data can be shared between all projects that are connected to the session using the “set” and “get” blocks.

Untitled

Here is the simplest example showing the use of the Croquet.io extension. In this screenshot, you can see two adacraft projects in parallel (which can be on two different computers), which connect to a Croquet session with ID “some unique ID”, the left project sets a croquet variable to a value (value “42” for variable “x”), and the right one sees the new value for “x”:

adacraft_croquet_tutorial_1.gif

Examples

Chat system

This is an example of a chat system using croquet.

https://www.adacraft.org/project/275651432353366533

Peek 16-12-2021 18-20.gif

Video game “Bounty hunters”.

This example is a two players game using croquet. The two players have to be the first to take the bounty and bring it back to his base. The level is a maze and players can fight each other to reset the position of the other player and drop his bounty.

https://www.adacraft.org/project/302283187431670283

Screenshot 2021-07-01 at 18-03-56 adacraft.png