During my spare time, I have discovered the interesting device Amazon ECHO, which is not yet available outside US as in France. After analyzing some ECHO skills/projects, I have noticed that they are based on predefined/static services for single end-user, so I would like to propose new flexible way to enable multiple players (family, friends) to share the same ECHO device, with possibility to select knowledge / serious games among a list, stored in some database. Each player will then be proposed to play the same game (one user after the other) and MultiPlayer service will also manage automatically the score. The winner order is based on correct answers counter, and for same correct answer number, the player with less questions will get higher rank.
You can find the Alexa Published Skill at : Multi Player
or by typing "Multi Player" in the search box at : Alexa Amazon Skills
MultiPlayer is composed of two subsystems :
- ALEXA SKILL KIT SERVICE : AWS (DynamoDb, Lambda Function) + SKILL
- RESULTS DISPLAY THRU RASPBERRY PI
0.1. DYNAMODB TABLES : GameQuestions, ScoreKeeperUserData
0.2. DYNAMODB TABLE: GameQuestions Details
0.3. DYNAMODB TABLE: ScoreKeeperUserData Details
1.1. Lambda Function blueprint (skip)
1.2. Lambda Configure Trigger > choose Alexa Skill Kit as Event Source
1.3. Lambda Configure Function
1.4. Lambda Function Review
1.5. Lambda Function Confirmation
Please Note the Lambda Function ARN below, which will be used in Skill configuration
2.1. Skill Information
2.2. Interaction Model
2.3. Skill Configuration with above Lambda Function ARN, no Account Linking
2.4. Skill Test Confirmation
2.5. Alexa Skill Certification
Finally, MultiPlayer Skill has been certified beginning of August, as shown by screenshot below
For demo purpose, I find interesting to add a display feature to the MultiPlayer game service :
- option 1 : display regularly scores on 16x2 LCD HD44780 device connected to Raspberry Pi
- option 2 : If displaying on "mini" LCD does not fit, it is also possible to use a "higher" and more comfortable display for group of players, like Raspberry LCD 7" or a PC screen or even a TV screen as shown below
- the scores will be accessed from python code using AWS API Gateway triggering lambda function
3.1. RASPBERRY PI WITH LCD HD44780
The principle of LCD Display with Raspberry Py is described on Internet projects like following one (Contributor : Michael Sklar) : https://learn.adafruit.com/drive-a-16x2-lcd-directly-with-a-raspberry-pi This work is based on some existing code (python) For the moment, I am waiting to receive the components from abroad, before starting the adaptation.
3.2. RASPBERRY PI WITH HIGHER (TV) SCREEN
To enable to see current results about all players at same time/space with higher screen, I decide to implement in python a LeaderBoard, which displays for each player, the current game score, ordered by decreasing score and number of questions. The following screenshot shows a Raspberry PI 1 B+ connected thru HDMI to my TV screen. The Raspberry PI accesses the score data thru WIFI and displays results on some basic terminal (leading player is shown in green), which can be seen by all players around.
3.3. SCORE DATA ACCESS FROM AWS API GATEWAY
Here are some details about API Gateway Lambda Function settings
3.3.1. API GATEWAY LAMBDA FUNCTION SETTING
3.3.1.1. Lambda Function blueprint (skip)
3.3.1.2. Lambda Funct. Configure Trigger > Choose API Gateway as Event Source
3.3.1.3. API Gateway Lambda Funct. Review >
3.2.1.3. API Gateway Lambda Funct. Confirmation
3.3.1.4. API Gateway Lambda Function Test
This hackster.io challenge has enabled me to discover and experiment Amazon technologies (Skill Kit, AWS : Lambda Function, Dynamo DB, API Gateway, CloudWatch, IAM, S3,..) Testing was done only with emulators (echosim.io, service simulator utterance) without real ECHO device. It has provided also opportunity to think about possible interaction with Raspberry Pi on the proposed project MultiPlayer scope
Comments