SlideShare ist ein Scribd-Unternehmen logo
1 von 13
And the making of
Math Contest – Online multiplayer
An Alexa Skill
Real-time Gaming on Alexa
bowdenCloud.com
The opportunity
Imagine being able to play against
other Alexa users all around the
world at the same time
Alexa Skill breakdown Math Contest – Online multiplayer
bowdenCloud.com
The problem
How to get multiple Alexa devices
tuned in and interacting with the
same game at the same time
Alexa Skill breakdown Math Contest – Online multiplayer
bowdenCloud.com
The constraints
• Not many ways to push data into a skill session at
a specific time
• Keeping multiple skill sessions from drifting apart
is problematic
• Most players do not have a visual interface for
guidance
• Working with external event sources
• Serverless architecture and distributed runtimes
Alexa Skill breakdown Math Contest – Online multiplayer
bowdenCloud.com
A solution that works
• Using the intra-session timeout
functionality of the Alexa Game Engine
• Running a central game controller to
process the inputs and inform the output
Alexa Skill breakdown Math Contest – Online multiplayer
bowdenCloud.com
Basic Example – A math contest
• A new maths question is announced to all players approx.
every 30 seconds
• Everyone gets the same question
• Player answers the question and the time is recorded
• If the player gets it right then they get a point plus another
point for every player they beat
• Alexa summarises the results and leaderboard status
before the next question arrives
• Rinse and repeat 
Gameplay
Alexa Skill breakdown Math Contest – Online multiplayer
bowdenCloud.com
Basic Example – Math Contest
High level design
Storage
Game Agent
Skill Skill
Alexa Game Engine Alexa Game EngineAlexa Game Engine
Skill
Synchronize Run the Quiz Synchronize
Skill
User answer
Time
Alexa Skill breakdown Math Contest – Online multiplayer
bowdenCloud.com
Storage
Game Agent
Skill Skill
Alexa Game Engine Alexa Game EngineAlexa Game Engine
Skill
Synchronize Run the Quiz Synchronize
Skill
User answer
Time
1
1 Customer launches skill, skill calculates sync timeout to next question.
2 Game engine is launched and the timeout sends a failed response to skill.
2
3 Skill launches, customer given question, each player is enrolled into the game (storage) and ‘thinking time’ timeout sent to game engine.
3
4
4 The Game Agent (a single long running Lambda function) is kicked off and waits until just before the question ‘thinking time’ is over.
5
5 The user answers the question, correct answers are saved into storage along with the timestamp.
Alexa Skill breakdown Math Contest – Online multiplayer
bowdenCloud.com
Storage
Game Agent
Skill Skill
Alexa Game Engine Alexa Game EngineAlexa Game Engine
Skill
Synchronize Run the Quiz Synchronize
Skill
User answer
Time
1
6 Game agent collates the enrolled players and correct answers. It then calculates scores and leaderboard positions and saves to storage.
7 Game Engine times out and invokes the skill. Results are now in. Skill gets the results and reads them to user, then calculates the sync time
2
8 Game Engine is launched and the timeout sends a failed response to skill which kicks starts the next qustion.
3
4
9 Repeat from Step 3
5
6
7
8
9
Alexa Skill breakdown Math Contest – Online multiplayer
bowdenCloud.com
Lessons learned
• To avoid certification issues, ensure that Echo buttons are
appropriately catered for in the skill since we are leveraging
the button input handler functionality
• Set aside plenty of time for debug and testing since there are
so many steps and moving parts, you also have to use a Beta
tester account to simulate multiple players
• Think about scaling issues and Lambda concurrency, since
real-time often involves multiple simultaneous invocations.
• Use the Game Agent function to do grunt work that would
otherwise be duplicated in the Skill functions (e.g. preparing
leaderboards etc.)
Alexa Skill breakdown Math Contest – Online multiplayer
bowdenCloud.com
Cool tricks
• The Game Engine timeout feature as a callback to a skill session is by far the coolest
trick you can take away from this
• Using a Lambda Game Agent reduces cost since it only runs when players are using
the game. If operating large consistent loads then consider using 24/7 instances to
manage the games.
• Setting the Lambda concurrency to a value of 1 enables the Game Agent function to
be invoked by the first player to enrol in the game and subsequent players can’t
trigger new Game Agents.
• The Math Contest questions are derived from the hash of question group time plus a
salt. You could also do this for randomizing an array lookup position for trivia
questions.
Alexa Skill breakdown Math Contest – Online multiplayer
bowdenCloud.com
Future ideas
• This method can easily be applied to trivia questions, I
only did math because it was easier to automate
questions.
• With enough players, groups and tournaments can be
created to enable a ‘last-person-standing’ type of
competition
• This methodology could also be used to enable one-on-
one battles back and fourth between players all over
the world
Alexa Skill breakdown Math Contest – Online multiplayer
So get creative and bring new types of games to Alexa!
bowdenCloud.com
Please check out
Math Contest – Online multiplayer
In the Alexa Skill Store
Thankyou
https://amzn.to/2QIhraX
bowdenCloud.com

Weitere ähnliche Inhalte

KĂźrzlich hochgeladen

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 

KĂźrzlich hochgeladen (20)

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 

Empfohlen

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data ScienceChristy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slidesAlireza Esmikhani
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

Empfohlen (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Real-time Gaming on Alexa : Math Contest - Alexa skill breakdown

  • 1. And the making of Math Contest – Online multiplayer An Alexa Skill Real-time Gaming on Alexa bowdenCloud.com
  • 2. The opportunity Imagine being able to play against other Alexa users all around the world at the same time Alexa Skill breakdown Math Contest – Online multiplayer bowdenCloud.com
  • 3. The problem How to get multiple Alexa devices tuned in and interacting with the same game at the same time Alexa Skill breakdown Math Contest – Online multiplayer bowdenCloud.com
  • 4. The constraints • Not many ways to push data into a skill session at a specific time • Keeping multiple skill sessions from drifting apart is problematic • Most players do not have a visual interface for guidance • Working with external event sources • Serverless architecture and distributed runtimes Alexa Skill breakdown Math Contest – Online multiplayer bowdenCloud.com
  • 5. A solution that works • Using the intra-session timeout functionality of the Alexa Game Engine • Running a central game controller to process the inputs and inform the output Alexa Skill breakdown Math Contest – Online multiplayer bowdenCloud.com
  • 6. Basic Example – A math contest • A new maths question is announced to all players approx. every 30 seconds • Everyone gets the same question • Player answers the question and the time is recorded • If the player gets it right then they get a point plus another point for every player they beat • Alexa summarises the results and leaderboard status before the next question arrives • Rinse and repeat  Gameplay Alexa Skill breakdown Math Contest – Online multiplayer bowdenCloud.com
  • 7. Basic Example – Math Contest High level design Storage Game Agent Skill Skill Alexa Game Engine Alexa Game EngineAlexa Game Engine Skill Synchronize Run the Quiz Synchronize Skill User answer Time Alexa Skill breakdown Math Contest – Online multiplayer bowdenCloud.com
  • 8. Storage Game Agent Skill Skill Alexa Game Engine Alexa Game EngineAlexa Game Engine Skill Synchronize Run the Quiz Synchronize Skill User answer Time 1 1 Customer launches skill, skill calculates sync timeout to next question. 2 Game engine is launched and the timeout sends a failed response to skill. 2 3 Skill launches, customer given question, each player is enrolled into the game (storage) and ‘thinking time’ timeout sent to game engine. 3 4 4 The Game Agent (a single long running Lambda function) is kicked off and waits until just before the question ‘thinking time’ is over. 5 5 The user answers the question, correct answers are saved into storage along with the timestamp. Alexa Skill breakdown Math Contest – Online multiplayer bowdenCloud.com
  • 9. Storage Game Agent Skill Skill Alexa Game Engine Alexa Game EngineAlexa Game Engine Skill Synchronize Run the Quiz Synchronize Skill User answer Time 1 6 Game agent collates the enrolled players and correct answers. It then calculates scores and leaderboard positions and saves to storage. 7 Game Engine times out and invokes the skill. Results are now in. Skill gets the results and reads them to user, then calculates the sync time 2 8 Game Engine is launched and the timeout sends a failed response to skill which kicks starts the next qustion. 3 4 9 Repeat from Step 3 5 6 7 8 9 Alexa Skill breakdown Math Contest – Online multiplayer bowdenCloud.com
  • 10. Lessons learned • To avoid certification issues, ensure that Echo buttons are appropriately catered for in the skill since we are leveraging the button input handler functionality • Set aside plenty of time for debug and testing since there are so many steps and moving parts, you also have to use a Beta tester account to simulate multiple players • Think about scaling issues and Lambda concurrency, since real-time often involves multiple simultaneous invocations. • Use the Game Agent function to do grunt work that would otherwise be duplicated in the Skill functions (e.g. preparing leaderboards etc.) Alexa Skill breakdown Math Contest – Online multiplayer bowdenCloud.com
  • 11. Cool tricks • The Game Engine timeout feature as a callback to a skill session is by far the coolest trick you can take away from this • Using a Lambda Game Agent reduces cost since it only runs when players are using the game. If operating large consistent loads then consider using 24/7 instances to manage the games. • Setting the Lambda concurrency to a value of 1 enables the Game Agent function to be invoked by the first player to enrol in the game and subsequent players can’t trigger new Game Agents. • The Math Contest questions are derived from the hash of question group time plus a salt. You could also do this for randomizing an array lookup position for trivia questions. Alexa Skill breakdown Math Contest – Online multiplayer bowdenCloud.com
  • 12. Future ideas • This method can easily be applied to trivia questions, I only did math because it was easier to automate questions. • With enough players, groups and tournaments can be created to enable a ‘last-person-standing’ type of competition • This methodology could also be used to enable one-on- one battles back and fourth between players all over the world Alexa Skill breakdown Math Contest – Online multiplayer So get creative and bring new types of games to Alexa! bowdenCloud.com
  • 13. Please check out Math Contest – Online multiplayer In the Alexa Skill Store Thankyou https://amzn.to/2QIhraX bowdenCloud.com