33% Multi-screened while gaming 1 6 v.

Slides:



Advertisements
Similar presentations
Queues Printer queues Several jobs submitted to printer Jobs form a queue Jobs processed in same order as they were received.
Advertisements

Stacks, Queues, and Linked Lists
Craps. /* * file : Craps.java * file : Craps.java * author: george j. grevera, ph.d. * author: george j. grevera, ph.d. * desc. : program to simulate.
Chapter 7 Strings F To process strings using the String class, the StringBuffer class, and the StringTokenizer class. F To use the String class to process.
Introduction to Windows Programming. First Windows Program This program simply displays a blank window. The following code is the minimum necessary to.
Add State Reserve (1S) Grants Chapter 4. Add State Reserve (1S) Grants 4-2 Objectives Understand How to Add a State Reserve (1S) Grant Enter Grant Plan.
Lecture19 Java Game Programming II – Example Continued.
1 Nonblocking I/O Nonblocking reads and writes Buffers enabling overlapped nonblocking I/O Nonblocking connect.
- SEARCHING - SORTING.  Given:  The array  The search target: the array element value we are looking for  Algorithm:  Start with the initial array.
Arduino Part 2 Topics: Serial Communication Programming Constructs: functions, loops and conditionals Digital Input.
Autumn, 2012C.-S. Shieh, EC, KUAS, Taiwan1 智慧電子應用設計導論 (1/3) Sensors III Chin-Shiuh Shieh ( 謝欽旭 ) Department of Electronic.
1 Identifiers  Identifiers are the words a programmer uses in a program  An identifier can be made up of letters, digits, the underscore character (
PeerFinder.Role = PeerRole.Client; PeerFinder.Role = PeerRole.Host;
Lecture 2 Event driven programming Mobile and Handheld Applications1 Programming of Handheld and Mobile Devices Lecture 2: Event driven programming concepts.
CISC474 - JavaScript 03/02/2011. Some Background… Great JavaScript Guides: –
UDI Tutorial & Driver Walk-Through Part 2 Kurt Gollhardt SCO Core OS Architect
M. Taimoor Khan #include void main() { //This is my first C++ Program /* This program will display a string message on.
FIRST GADGETEER PROJECT. Where are you? Making a VS project Parts of a C# program Basics of C# syntax Debugging in VS Questions? 2.
1 Data Structures CSCI 132, Spring 2014 Lecture 4 Implementing Life.
The Management API What it is (and isn’t) Defining variables Accessing “singleton” variables Accessing Table variables.
Interactive Computer Graphics CS 418 MP1: Dancing I TA: Zhicheng Yan Sushma S Kini Mary Pietrowicz Slides Taken from: “An Interactive Introduction to OpenGL.
111 Introduction to OGRE3D Programming: Main Loop.
Create Report Entry What if I want to add scores that are not tied to an assignment?
11 General Game Programming Approach. The program is event-driven The program is event-driven –Messages = events –So as all windows system (for example.
More loops while and do-while. Recall the for loop in general for (initialization; boolean_expression; update) { }
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology SDL_net Client-Server Example Spring 2012.
Add Formula Grants Chapter 3. Add Formula Grants 3-2 Objectives Understand How to Add a Formula Grant Enter Grant Plan Information Enter Program Funding.
Sound Effects The library Cocosdenshion subproject of cocos2d-iphone targeted at game audio needs Sound effects can be loaded at application startup, so.
Simple Scene Management a layer has the size of the device screen it defines appearance and behavior a scene is composed of one or more layers app transitions.
CSCE 552 Fall 2012 Language and Programming By Jijun Tang.
Contest Algorithms January 2016 Pseudo-code for backtracking search, and three examples (all subsets, permutations, and 8- queens). 4. Backtracking 1Contest.
[0] [1]
Integral Users will interact with your app on a big screen with keyboard and mouse.
1 COMS 261 Computer Science I Title: Classes Date: November 9, 2005 Lecture Number: 29.
Print Row Function void PrintRow(float x[ ][4],int i) { int j; for(j=0;j
1 COMS 261 Computer Science I Title: Classes Date: November 4, 2005 Lecture Number: 27.
Int fact (int n) { If (n == 0) return 1; else return n * fact (n – 1); } 5 void main () { Int Sum; : Sum = fact (5); : } Factorial Program Using Recursion.
Computer Programming Arrays 1. Question #1 2 Question Choose the correct answer..
Introduction to Programming Lecture 12. Today’s Lecture Includes Strings ( character arrays ) Strings ( character arrays ) Algorithms using arrays Algorithms.
Basic coding… with TouchDevelop!!
CHAPTER 4 DECISIONS & LOOPS
An Introduction to JACK
Modelling and Simulating Social Systems with MATLAB
Unit-1 Introduction to Java
CS 432: Compiler Construction Lecture 10
Character Selection from a lobby in Unity
Chapter 5. Looping.
Counted Loops.
Managed DirectX Joe Gavin.
The User Interface Lecture 2 Mon, Aug 27, 2007.
Reserved Words.
Unit 1, Lesson 5: Significant Figures
C++ Programming L3 . Control Structures kkkkkkkkkkkkkk
null, true, and false are also reserved.
البرمجة بلغة الفيجول بيسك ستوديو
Stack and Queues Stack implementation using Array
Stack and Queues Stack implementation using Array
C# Basics These slides are designed for Game Design Class
More Linked Lists and Loops Based on slides by Ethan Apter
Govt. Polytechnic,Dhangar
JavaScript Reserved Words
Program Flow.
Programming Language C Language.
CS431 ws99 Half Text Half Graphics
Class StudentList class StudentList { private: int numStudents;
Calculate 81 ÷ 3 = 27 3 x 3 x 3 3 x 3 x 3 x 3 ÷ 3 = This could be written as
CMPE 152: Compiler Design March 5 Class Meeting
Why We Need Car Parking Systems - Wohr Parking Systems
Types of Stack Parking Systems Offered by Wohr Parking Systems
Add Title.
Presentation transcript:

33% Multi-screened while gaming 1

6

v

21 // Initialize Xbox SmartGlass if( 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(); }

// // 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;...

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;

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(); });

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(); } });