Download - Introduction to Xbox SmartGlass
![Page 1: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/1.jpg)
Introduction to Xbox SmartGlass
Neil BlackPrincipal Program Manager2-028
![Page 2: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/2.jpg)
Industry trendsSmartGlass overviewDemo
Agenda
![Page 3: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/3.jpg)
Industry trends
![Page 4: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/4.jpg)
Companion apps enhance the TV viewing or gaming experience on the main television screen by providing interactive features, multiplayer & remote play, social integrations, editorial content, and additional information via a smartphone or tablet
33%Multi-screened while gaming1
1 IEB Research and Business Intelligence Survey of ~1,500 US respondents, March 2012
Multi-screen entertainment
![Page 5: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/5.jpg)
Gaming companions pair with either a specific game or console
Social companions are primarily media and centered on sharing
Network companions are specific to a show and offer deep content extras
Event companions pair with an event and offer behind-the-scenes & streamingController companions pair with a service provider and offer full media control
Second screen experiences
![Page 6: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/6.jpg)
LED FROM THE LIVING ROOM
POWERED BY THE CLOUD
ACROSS MULTIPLE SCREENS
BEST ON MICROSOFT
DEVICES
Xbox is transforming entertainment
6
![Page 7: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/7.jpg)
SmartGlass overview
![Page 8: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/8.jpg)
v
3RD PARTY ENHANCEMENTS PLATFORM
BUILT IN ENHANCEMENTS
MEDIA CONTROL & DISCOVERY
CORESERVICES
What is Xbox SmartGlass?
![Page 9: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/9.jpg)
Available on the device you already own
![Page 10: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/10.jpg)
Best on Microsoft devices
![Page 11: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/11.jpg)
Home
![Page 12: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/12.jpg)
Input
![Page 13: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/13.jpg)
Search
![Page 14: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/14.jpg)
Engagement
![Page 15: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/15.jpg)
Habitual useAPPSVIDEO GAMES MUSIC
![Page 16: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/16.jpg)
2012 SmartGlass portfolio
![Page 17: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/17.jpg)
Xbox DeviceXbox SmartGlassHosted
SmartGlass controlHosted experience
Transport library
Title
XAMXamLrc library
WiFi/3G/4G
SmartGlass service
Control & Title messages
Control & Title messages
Local Subnet
Control messages
ADK
XDK librariesXbc library
3rd party web service
Title messagesTitle
messages
Xbox SmartGlass platform architecture
![Page 18: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/18.jpg)
SmartGlass experiencesHTML5/JavaScript applications that extend the functionality/interactivity of console titlesApps run in an embedded browser within the Xbox SmartGlass application
Advantages of the Hosted SmartGlass experience modelDiscoverability• Consumers do not need to “find” and download applications one-at-a-time• Applications automatically appear when the corresponding console title is being
playedWeb development model• Use of HTML5/JavaScript allows for cross-platform applications without having to write
a separate, native app for each platform
• End-users get access to applications regardless of their device
![Page 19: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/19.jpg)
Xbox SmartGlass SDKSmartGlass XDK librariesInitialize/shutdown functionsSend/receive messages, functions and eventsClient changed eventJSON parser/writer
Xbox SmartGlass platform SDKAPI reference documentationCode samplesDevelopment tools
SmartGlass JavaScript APIsApplication-level APIs• Send/receive message functions and events• Connect/disconnect functions • Client changed event• Title and media state events• Service proxy function
Device capabilities• Accelerometer• Gyroscope• Haptic• Information• Input• Touch
![Page 20: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/20.jpg)
Demo
Poker
![Page 21: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/21.jpg)
Initialize Xbox SmartGlass and process messages
21
// Initialize Xbox SmartGlassif( FAILED( XbcInitialize(XbcReceiveCallback, NULL) ) )return;
InitTime(); g_pPokerGame->ShuffleCards();
for(;;) // loop forever { // What time is it? UpdateTime();
// Check for messages XbcDoWork();
// Update the world UpdateTexCoords(); // Render the scene Render(); }
![Page 22: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/22.jpg)
Handle client connect event//--------------------------------------------------------------------------------------// Name: XbcReceiveCallback// Desc: Callback function for Xbc events, such as client connect/disconnect and // title messaging. When we call XbcDoWork, if messages have come in, they will // use this callback for our app to receive them//--------------------------------------------------------------------------------------VOID XbcReceiveCallback( HRESULT hr, PXBC_EVENT_PARAMS pParams, VOID* pvState ){ switch ( pParams->Type ) {
case XBC_EVENT_CLIENT_CONNECTED: {
// Add the player to the game and post the message to the screen PokerPlayer* pPlayer = new PokerPlayer( pParams->nClientId );
INT iPlayerIndex = -1; if ( SUCCEEDED( g_pPokerGame->AddPlayer(pPlayer, &iPlayerIndex))) { RtlZeroMemory( g_wstrMessage, sizeof( g_wstrMessage ) );
std::wstringstream wss; // Convert the number from 0-based to 1-based for readability wss << "Player " << (iPlayerIndex + 1) << " connected!"; wcsncpy_s(g_wstrMessage, wss.str().c_str(), 20); }
}break;...
![Page 23: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/23.jpg)
Process messages
23
case Json_FieldName: RtlZeroMemory(&buffer, sizeof(buffer)); XJSONGetTokenValue( hReader, buffer, ARRAYSIZE( buffer ) ); buffer[nTokenLength] = L'\0'; switch( tokenType ) { case Json_String: if ( next == ACTION ) { next = NONE; if (wcsncmp( (const wchar_t *)buffer, L"fold", 4 ) == 0 ) {
g_pPokerGame->PlayerFold( pParams->nClientId ); } else if ( wcsncmp( (const wchar_t *)buffer, L"join", 4) == 0 ) {
g_pPokerGame->PlayerJoin( pParams->nClientId ); } else if ( wcsncmp( (const wchar_t *)buffer, L"start", 5 ) == 0 ) { g_pPokerGame->StartGame(); } else if ( wcsncmp( (const wchar_t *)buffer, L"getstate", 8) == 0 ) { if ( g_pPokerGame->IsGameStarted() ) {
g_pPokerGame->SendPlayerState( pParams->nClientId ); } } } break;
![Page 24: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/24.jpg)
Setup the SmartGlass experience
24
Xbc.on("loaded", function (loadedData) { Xbc.Messaging.sendMessage({ action: Poker.Action.GETSTATE }); $("#join_button").click(function () { Xbc.Messaging.sendMessage({ action: Poker.Action.JOIN }); }); $("#start_button").click(function () { Xbc.Messaging.sendMessage({ action: Poker.Action.START }); });
$("#chip_count").text(money); $("#call_check_button").click(function () { if ($("#call_check_button").text() === "Check") { performCheck(); } else { performCall(); } }); $("#fold_button").click(function () { // Submit a fold performFold(); });
$("#bet_button").click(function () { performBet(); });
});
![Page 25: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/25.jpg)
Implement check via Table-Knock
25
Xbc.on("accelerometer", function (value) { // We're assuming that an acceleration vector length greater than KNOCK_ACCEL_CUTOFF // Is a "table-knock" check
// Calculate acceleration vector length var xVal = parseInt(value.x, 10); var yVal = parseInt(value.y, 10); var zVal = parseInt(value.z, 10); var vecLength = Math.sqrt(xVal * xVal + yVal * yVal + zVal * zVal); if (vecLength > KNOCK_ACCEL_CUTOFF) { performCheck(); }});
![Page 26: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/26.jpg)
• 10/30 5:45 p.m.92/Trident-Thunder – Building Cross-device Xbox Games
• 10/30 4:00 p.m.92/Odyssey – Xbox Live on Windows 8 Deep Dive
Related Sessions
![Page 27: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/27.jpg)
• Xbox SmartGlass SDKResources
![Page 28: Introduction to Xbox SmartGlass](https://reader036.vdocument.in/reader036/viewer/2022062305/56816721550346895ddba781/html5/thumbnails/28.jpg)
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.