README.md 1.55 KB
Newer Older
Tom Pillot's avatar
Tom Pillot committed
1
# Thymio Game
Tom Pillot's avatar
Tom Pillot committed
2
3
4

A competitive game in groups with Thymio.

Tom Pillot's avatar
Tom Pillot committed
5
## Running the game
Tom Pillot's avatar
Tom Pillot committed
6
7
8
9
10
11

The game needs at least Python 3.6.

```bash
git clone https://gitlab.laas.fr/tpillot/thymio-game.git
cd thymio-game
Tom Pillot's avatar
Tom Pillot committed
12
python -m venv venv
Tom Pillot's avatar
Tom Pillot committed
13
14
15
. venv/bin/activate
pip install -r requirements.txt
python main.py
Tom Pillot's avatar
Tom Pillot committed
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
```

## Preparation

Print the tags provided in [apriltags.pdf](apriltags.pdf) and put a tag on each
Thymio with the corresponding color. The activity is meant to be used with VPL,
or the automated start won't work.

## Register the teams

The first window opened is to register the teams before starting the activity,
each team needs to put its name and scan the tag on its Thymio. Then you can
choose an activity and the time of the activity, and press the start button to show
the scoreboard.

Tom Pillot's avatar
Tom Pillot committed
31
32
![](images/team_chooser.png)

Tom Pillot's avatar
Tom Pillot committed
33
34
35
36
37
38
39
40
41
## Scoreboard

The scoreboard window has a timer, an event history, and a webcam highlighting
detected tags in real time. 

To start the scoreboard and all Thymios at the same 
time, you first need to press the blue start button to allow the teams to join the
automated start.

Tom Pillot's avatar
Tom Pillot committed
42
43
![](images/scoreboard.png)

Tom Pillot's avatar
Tom Pillot committed
44
At this point, all teams have to click on the **Join activity** button which will
Tom Pillot's avatar
Tom Pillot committed
45
first ask them to save their work.
Tom Pillot's avatar
Tom Pillot committed
46

Tom Pillot's avatar
Tom Pillot committed
47
48
![](images/vpl.png)

Tom Pillot's avatar
Tom Pillot committed
49
Then VPL should display a message saying that
Tom Pillot's avatar
Tom Pillot committed
50
51
52
the program is waiting for the activity to start. VPL will be unresponsive
until the activty is started.

Tom Pillot's avatar
Tom Pillot committed
53
54
55

![](images/vpl2.png)

Tom Pillot's avatar
Tom Pillot committed
56
57
When all the teams have this message, you can start running all Thymios at the same
time by pressing the green start button.
Tom Pillot's avatar
Tom Pillot committed
58
59

![](images/scoreboard2.png)