SlideShare a Scribd company logo
1 of 34
Thomas Ang, Mad Hatter Technologies
David Neumann, TVO
FITC Screens 2013 | Friday October 4, 2013
15,000 DOWNLOADS IN 15 DAYS
1. Solid understanding of multi-device development for iOS
2. 4 concepts for creating an engaging experience
WHAT YOU WILL WALK AWAY WITH
1. TVO’s IdeaShaker Innovation Lab
2. Intro the Ping Pong App
3. 4 engagement concepts
4. Mad Hatter Technology
5. Under the hood of the Ping Pong App
6. Q/A
THE AGENDA
TVO’s IdeaShaker Lab
TVO’s IdeaShaker team explores
emerging digital trends that have
“disruptive” potential and
approaches all projects through
the lens of how technology can
impact and enhance TVO’s
educational resources for
children, current affairs content
and other TVO content.
“
“
IdeaShaker Portfolio
Ping Pong App
 One of the few multi-device apps in the store
 Featured by Apple in January 2013
 Over 15,000 downloads in 15 days
 Non-branded version developed for international
markets
 Built to support the North American premiere of
the documentary Ping Pong: Never Too Old For
Gold
Overview
Engaging Experience
Understand the underlying
themes that can be woven
through your entire cross-
media narrative
“
“
Concept 1
Engaging Experience
Find the technologies that can
deliver on your themes.
Transmedia is great when
done right.
“
“
Concept 2
Engaging Experience
When packaging a brand new
concept for a user, make sure
you wrap it up in something
they are familiar with.
“
“
Concept 3
Engaging Experience
Almost everything has been
done before. Do it better.
“
“
Concept 4
IdeaShaker + Mad Hatter
• Prototyped in both Android and iOS - > proof of concept
• Due to hard deadline had to bring in an awesome team to help execute the project
Working together
WHO IS ?
Mad Hatter Technology specializes
in marketing & communications
technology.
Team of specialists in a variety of
things:
-Digital design
-Web dev
-Mobile dev
-Social media
Strategy is our means.
Creativity is our craft.
Technology is our passion.
“
“
WHAT IS UP TO?
• TVO
• Ivanhoe Cambridge
• Balsillie School of International Affairs
• Centre for International Governance Innovation
• Alternatives Journal
• The Regional of Waterloo
• University of Waterloo
• University of Ontario
• Waterloo Regional Police Services
• Thunder Bay Police Services
Game Dev Basics
States for single player
Game Dev BasicsSimplified game loop for single player
#define LOOP_INTERVAL 0.033f
[NSTimer scheduledTimerWithTimeInterval:LOOP_INTERVAL target:self selector:@selector(gameLoop)
userInfo:nil repeats:YES];
- (void)gameLoop{
switch(gameState){
case kStateGameServe:
//if recent motion data tells us swing gesture was made
//go to Waiting state
break;
case kStateGameWaiting:
//Calculate and display AI player's response
//go to Return state
break;
Game Dev BasicsSimplified game loop for single player
case kStateGameReturn:
//if we've taken too long to return the shot
//rally is over: give AI player a point, go into appropriate Serve or Return state
//else if recent motion data tells us swing gesture was made
//if it was a bad swing
//rally is over: give AI player a point, go into appropriate Serve or Return state
//else go to Waiting state
break;
default:
break;
}
}
Pairing
//This was built foriOS 6
//Things have changed in iOS 7
GKPeerPickerController* picker;
picker = [[GKPeerPickerController alloc] init];
picker.delegate = self;
[picker show];
Pairing
- (void)peerPickerController:(GKPeerPickerController *)picker didConnectPeer:(NSString *)peerID toSession:
(GKSession *)session
//store info from session that we’ll need, like opponent’s ID
// Make sure we have a reference to the game session and it is set up to receive data
// Done with the Peer Picker so dismiss it.
// startGame
-(void)peerPickerControllerDidCancel:(GKPeerPickerController *)picker
//do any cleanup required and send us back to menu
// No need to implement -peerPickerController:didSelectConnectionType: delegate method since this app does not
//support multiple connection types.
- (GKSession *)peerPickerController:(GKPeerPickerController *)picker sessionForConnectionType:
(GKPeerPickerConnectionType)type
//init and return a GKSession that holds a game session ID and my display name sessionMode is
//GKSessionModePeer
GKPeerPickerControllerDelegate
2 Player Logic
States for two player
2 Player Logic
Game loop for two player
- (void)gameLoop{
switch (networkState) {
case kStateNetworkMatching:
break;
case kStateNetworkPlaying:
switch(gameState){
case kStateGameSyncServe:
case kStateGameSyncReturn:
//if phones have been pointing at each other for long enough
//save current phone direction
//if we’re in SyncServe go to Serve state
//if we’re in SyncReturn go to Waiting state
// send SYNC_SUCCESS to other phone with direction
//else send GESTURE_SYNC with direction
break;
2 Player Logic
case kStateGameServe:
//if recent motion data tells us swing gesture was made
//if phone ended up pointing away from other player
//rally is over: give out points, go into appropriate Serve or Return state send HIT_FAIL message
//else go to Waiting state, display random arrow, send HIT_SUCCESS with orientation of arrow
break;
case kStateGameWaiting:
//make sure the arrow is still pointing the right way even if phone orientation changes
break;
case kStateGameReturn:
//if we've taken too long to return the shot
//rally is over: give out points, go into appropriate Serve or Return state send HIT_FAIL message
//else if recent motion data tells us swing gesture was made
//if phone ended up pointing away from other player or had wrong orientation
//rally is over: give out points, go into appropriate Serve or Return state send HIT_FAIL message
//else go to Waiting state, display random arrow, send HIT_SUCCESS with orientation of arrow
break;
2 Player Logic
// once every 8 updates check if we have a recent heartbeat from the other player, and
send a //heartbeat packet with current state
//if the last heartbeat is too old go to NetworkReconnect state
break;
case kStateNetworkReconnect:
// we have lost a heartbeat for too long, so pause game and notify user while we wait for
next //heartbeat or session disconnect.
break;
}
Sending Data
typedef enum {
NETWORK_ACK, // no packet
NETWORK_PLAYER_INFO,
NETWORK_PASS_SERVE, //let the other device know that its player serves first
NETWORK_GESTURE_SYNC, //packets we send when syncing device directions
NETWORK_SYNC_SUCCESS,
NETWORK_HIT_SUCCESS, // the result of a swing
NETWORK_HIT_FAIL,
NETWORK_WIN,
NETWORK_HEARTBEAT
} PacketCode;
Sending Data
- (void)sendNetworkPacket:(GKSession *)session packetID:(PacketCode)packetID withData:(void *)data ofLength:
(int)length reliable:(BOOL)reliable
static unsigned char networkPacket[kMaxPacketSize];
const unsigned int packetHeaderSize = 2 * sizeof(int); // we have two "ints" for our header
if(length < (kMaxPacketSize - packetHeaderSize)) { // make sure packet isn’t bigger than buffer
int *pIntData = (int *)&networkPacket[0];
pIntData[0] = gamePacketNumber++; // header info
pIntData[1] = packetID;
memcpy( &networkPacket[packetHeaderSize], data, length ); // copy data in after the header
NSData *packet = [NSData dataWithBytes: networkPacket length:
(length+packetHeaderSize)];
if(reliable== YES) {
[session sendData:packet toPeers:[NSArray arrayWithObject:gamePeerId]
withDataMode:GKSendDataReliable error:nil];
} else {
[session sendData:packet toPeers:[NSArray arrayWithObject:gamePeerId]
withDataMode:GKSendDataUnreliable error:nil];}
Receiving Data
- (void)receiveData:(NSData *)data fromPeer:(NSString *)peer inSession:(GKSession *)session context:(void *)context
//unpack our data into local variables, make sure they arrive in order, etc.
switch( packetID ) {
case NETWORK_PLAYER_INFO:
//save whatever opponent info you need
//coin toss to see who serves first (device with smaller ID does this)
//If we're not serving first send PASS_SERVE message
break;
case NETWORK_PASS_SERVE:
//set our state to SyncServe (the default is SyncReturn)
break;
case NETWORK_GESTURE_SYNC:
//if devices are not pointing in opposite directions restart timer
//else if devices are not pointing horizontally restart timer
//else let players know to continue holding that position
break;
Receiving Data
case NETWORK_SYNC_SUCCESS:
//save the successful sync direction and go to Serve or Waiting state
break;
case NETWORK_HIT_SUCCESS:
//store orientation we have to match and go to Return state
break;
case NETWORK_HIT_FAIL:
//increment our score
//if we won send NETWORK_WIN else figure out who serves next and go to appropriate state
break;
case NETWORK_WIN:
//update stats, etc.
break;
case NETWORK_HEARTBEAT:
// update our record of most recent heartbeat
// if we were trying to reconnect, set the state back to multiplayer as the peer is back
break;
Syncing Directions
CMDeviceMotion has a CMAttitude, which has a CMQuaternion
There’s more information than we want here. We just want a direction
vector representing the normal of plane of device screen.
Apply each phone’s rotation (encoded by quaternion) to an arbitrary
vector and compare the resulting vectors.
Let v = [0, 0, 0, 1], and q is our quaternion
v´ = q v q-1
if the two resulting v´ vectors are roughly opposite, we’re good
Detecting Swing Motion
Check that userAcceleration exceeds threshold
Check gravity to see that phone is mostly on its side
Check that rotation in all three axes is small
Dealing With Rejection
We found that your app exhibited one or more bugs, when
reviewed on the iPhone 5 and the iPad (3rd Gen) running iOS
6.0.1, on both Wi-Fi and cellular networks, which is not in
compliance with the App Store Review Guidelines.
The steps to reproduce are:
1) Launch the application on two devices
2) Tap the "Play" button on both devices
3) Connect the devices
The application hangs at a blue screen and no additional
content is loaded.
Dealing With Rejection
We've been rejected twice for bugs found when the two phones are really close to each other at the start of
the game. We found the cause of these bugs to be interference to the Bluetooth antenna and the
magnetometer, which arises when the two phones are close together in certain positions. While we have
introduced new code to ensure these failures are handled gracefully from a user's perspective, it would still be
best if you test this app as it is intended to be used: each phone held by a different player, standing a few feet
to a few yards apart. Thanks, and enjoy!
Featured!
THANK YOU!
GOOD BYE!
BUT COME SAY HELLO!
Thomas Ang - @madhattermobile
David Neumann - @everyoneminus1

More Related Content

Similar to 15,000 downloads in 15 days with David Neumann and Thomas Ang

Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3Nick Pruehs
 
Structure Data 2014: TRACKING A SOCCER GAME WITH BIG DATA, Chris Haddad
Structure Data 2014: TRACKING A SOCCER GAME WITH BIG DATA, Chris HaddadStructure Data 2014: TRACKING A SOCCER GAME WITH BIG DATA, Chris Haddad
Structure Data 2014: TRACKING A SOCCER GAME WITH BIG DATA, Chris HaddadGigaom
 
Overview of the WP4 of BRAIN-IoT
Overview of the WP4 of BRAIN-IoTOverview of the WP4 of BRAIN-IoT
Overview of the WP4 of BRAIN-IoTBrain IoT Project
 
Microservices Architecture with Vortex — Part II
Microservices Architecture with Vortex — Part IIMicroservices Architecture with Vortex — Part II
Microservices Architecture with Vortex — Part IIAngelo Corsaro
 
Internet of Things: Vehicular Tracking System
Internet of Things: Vehicular Tracking SystemInternet of Things: Vehicular Tracking System
Internet of Things: Vehicular Tracking SystemPrasannPatel4
 
SplunkLive! Customer Presentation - Satcom Direct
SplunkLive! Customer Presentation - Satcom DirectSplunkLive! Customer Presentation - Satcom Direct
SplunkLive! Customer Presentation - Satcom DirectSplunk
 
Building fast,scalable game server in node.js
Building fast,scalable game server in node.jsBuilding fast,scalable game server in node.js
Building fast,scalable game server in node.jsXie ChengChao
 
A Complete Tutorial to Develop Real-Time Fighting Game with Cocos2dx
A Complete Tutorial to Develop Real-Time Fighting Game with Cocos2dxA Complete Tutorial to Develop Real-Time Fighting Game with Cocos2dx
A Complete Tutorial to Develop Real-Time Fighting Game with Cocos2dxShepHertz
 
Silverlight as a Gaming Platform
Silverlight as a Gaming PlatformSilverlight as a Gaming Platform
Silverlight as a Gaming Platformgoodfriday
 
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...Athens IoT Meetup
 
Internet of things the salesforce lego machine cloud
Internet of things   the salesforce lego machine cloudInternet of things   the salesforce lego machine cloud
Internet of things the salesforce lego machine cloudandyinthecloud
 
OpenTelemetry Introduction
OpenTelemetry Introduction OpenTelemetry Introduction
OpenTelemetry Introduction DimitrisFinas1
 
BWC Supercomputing 2008 Presentation
BWC Supercomputing 2008 PresentationBWC Supercomputing 2008 Presentation
BWC Supercomputing 2008 Presentationlilyco
 
NetSim Technology Library - Software defined networks
NetSim Technology Library - Software defined networksNetSim Technology Library - Software defined networks
NetSim Technology Library - Software defined networksVishal Sharma
 
The Science of Fun - Data-driven Game Development
The Science of Fun - Data-driven Game DevelopmentThe Science of Fun - Data-driven Game Development
The Science of Fun - Data-driven Game Developmentalex_turcan
 
Tech Talk: ONOS- A Distributed SDN Network Operating System
Tech Talk: ONOS- A Distributed SDN Network Operating SystemTech Talk: ONOS- A Distributed SDN Network Operating System
Tech Talk: ONOS- A Distributed SDN Network Operating Systemnvirters
 
Introduction to WSO2 Data Analytics Platform
Introduction to  WSO2 Data Analytics PlatformIntroduction to  WSO2 Data Analytics Platform
Introduction to WSO2 Data Analytics PlatformSrinath Perera
 

Similar to 15,000 downloads in 15 days with David Neumann and Thomas Ang (20)

Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3Developing a Multiplayer RTS with the Unreal Engine 3
Developing a Multiplayer RTS with the Unreal Engine 3
 
Himanth_Resume
Himanth_ResumeHimanth_Resume
Himanth_Resume
 
Structure Data 2014: TRACKING A SOCCER GAME WITH BIG DATA, Chris Haddad
Structure Data 2014: TRACKING A SOCCER GAME WITH BIG DATA, Chris HaddadStructure Data 2014: TRACKING A SOCCER GAME WITH BIG DATA, Chris Haddad
Structure Data 2014: TRACKING A SOCCER GAME WITH BIG DATA, Chris Haddad
 
Developing in android
Developing in androidDeveloping in android
Developing in android
 
Overview of the WP4 of BRAIN-IoT
Overview of the WP4 of BRAIN-IoTOverview of the WP4 of BRAIN-IoT
Overview of the WP4 of BRAIN-IoT
 
Microservices Architecture with Vortex — Part II
Microservices Architecture with Vortex — Part IIMicroservices Architecture with Vortex — Part II
Microservices Architecture with Vortex — Part II
 
Internet of Things: Vehicular Tracking System
Internet of Things: Vehicular Tracking SystemInternet of Things: Vehicular Tracking System
Internet of Things: Vehicular Tracking System
 
SplunkLive! Customer Presentation - Satcom Direct
SplunkLive! Customer Presentation - Satcom DirectSplunkLive! Customer Presentation - Satcom Direct
SplunkLive! Customer Presentation - Satcom Direct
 
Building fast,scalable game server in node.js
Building fast,scalable game server in node.jsBuilding fast,scalable game server in node.js
Building fast,scalable game server in node.js
 
A Complete Tutorial to Develop Real-Time Fighting Game with Cocos2dx
A Complete Tutorial to Develop Real-Time Fighting Game with Cocos2dxA Complete Tutorial to Develop Real-Time Fighting Game with Cocos2dx
A Complete Tutorial to Develop Real-Time Fighting Game with Cocos2dx
 
Silverlight as a Gaming Platform
Silverlight as a Gaming PlatformSilverlight as a Gaming Platform
Silverlight as a Gaming Platform
 
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
Athens IoT meetup #7 - Create the Internet of your Things - Laurent Ellerbach...
 
Internet of things the salesforce lego machine cloud
Internet of things   the salesforce lego machine cloudInternet of things   the salesforce lego machine cloud
Internet of things the salesforce lego machine cloud
 
OpenTelemetry Introduction
OpenTelemetry Introduction OpenTelemetry Introduction
OpenTelemetry Introduction
 
BWC Supercomputing 2008 Presentation
BWC Supercomputing 2008 PresentationBWC Supercomputing 2008 Presentation
BWC Supercomputing 2008 Presentation
 
NetSim Technology Library - Software defined networks
NetSim Technology Library - Software defined networksNetSim Technology Library - Software defined networks
NetSim Technology Library - Software defined networks
 
The Science of Fun - Data-driven Game Development
The Science of Fun - Data-driven Game DevelopmentThe Science of Fun - Data-driven Game Development
The Science of Fun - Data-driven Game Development
 
Rsockets ofa12
Rsockets ofa12Rsockets ofa12
Rsockets ofa12
 
Tech Talk: ONOS- A Distributed SDN Network Operating System
Tech Talk: ONOS- A Distributed SDN Network Operating SystemTech Talk: ONOS- A Distributed SDN Network Operating System
Tech Talk: ONOS- A Distributed SDN Network Operating System
 
Introduction to WSO2 Data Analytics Platform
Introduction to  WSO2 Data Analytics PlatformIntroduction to  WSO2 Data Analytics Platform
Introduction to WSO2 Data Analytics Platform
 

More from FITC

Cut it up
Cut it upCut it up
Cut it upFITC
 
Designing for Digital Health
Designing for Digital HealthDesigning for Digital Health
Designing for Digital HealthFITC
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript PerformanceFITC
 
Surviving Your Tech Stack
Surviving Your Tech StackSurviving Your Tech Stack
Surviving Your Tech StackFITC
 
How to Pitch Your First AR Project
How to Pitch Your First AR ProjectHow to Pitch Your First AR Project
How to Pitch Your First AR ProjectFITC
 
Start by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the AnswerStart by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the AnswerFITC
 
Cocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s StoryCocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s StoryFITC
 
Everyday Innovation
Everyday InnovationEveryday Innovation
Everyday InnovationFITC
 
HyperLight Websites
HyperLight WebsitesHyperLight Websites
HyperLight WebsitesFITC
 
Everything is Terrifying
Everything is TerrifyingEverything is Terrifying
Everything is TerrifyingFITC
 
Post-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanPost-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanFITC
 
The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)FITC
 
East of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameEast of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameFITC
 
Creating a Proactive Healthcare System
Creating a Proactive Healthcare SystemCreating a Proactive Healthcare System
Creating a Proactive Healthcare SystemFITC
 
World Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignWorld Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignFITC
 
The Power of Now
The Power of NowThe Power of Now
The Power of NowFITC
 
High Performance PWAs
High Performance PWAsHigh Performance PWAs
High Performance PWAsFITC
 
Rise of the JAMstack
Rise of the JAMstackRise of the JAMstack
Rise of the JAMstackFITC
 
From Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFrom Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFITC
 
Projects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForProjects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForFITC
 

More from FITC (20)

Cut it up
Cut it upCut it up
Cut it up
 
Designing for Digital Health
Designing for Digital HealthDesigning for Digital Health
Designing for Digital Health
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript Performance
 
Surviving Your Tech Stack
Surviving Your Tech StackSurviving Your Tech Stack
Surviving Your Tech Stack
 
How to Pitch Your First AR Project
How to Pitch Your First AR ProjectHow to Pitch Your First AR Project
How to Pitch Your First AR Project
 
Start by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the AnswerStart by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the Answer
 
Cocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s StoryCocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s Story
 
Everyday Innovation
Everyday InnovationEveryday Innovation
Everyday Innovation
 
HyperLight Websites
HyperLight WebsitesHyperLight Websites
HyperLight Websites
 
Everything is Terrifying
Everything is TerrifyingEverything is Terrifying
Everything is Terrifying
 
Post-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanPost-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future Human
 
The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)
 
East of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameEast of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR Game
 
Creating a Proactive Healthcare System
Creating a Proactive Healthcare SystemCreating a Proactive Healthcare System
Creating a Proactive Healthcare System
 
World Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignWorld Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product Design
 
The Power of Now
The Power of NowThe Power of Now
The Power of Now
 
High Performance PWAs
High Performance PWAsHigh Performance PWAs
High Performance PWAs
 
Rise of the JAMstack
Rise of the JAMstackRise of the JAMstack
Rise of the JAMstack
 
From Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFrom Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self Discovery
 
Projects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForProjects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time For
 

Recently uploaded

DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 

Recently uploaded (20)

DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 

15,000 downloads in 15 days with David Neumann and Thomas Ang

  • 1. Thomas Ang, Mad Hatter Technologies David Neumann, TVO FITC Screens 2013 | Friday October 4, 2013 15,000 DOWNLOADS IN 15 DAYS
  • 2. 1. Solid understanding of multi-device development for iOS 2. 4 concepts for creating an engaging experience WHAT YOU WILL WALK AWAY WITH
  • 3. 1. TVO’s IdeaShaker Innovation Lab 2. Intro the Ping Pong App 3. 4 engagement concepts 4. Mad Hatter Technology 5. Under the hood of the Ping Pong App 6. Q/A THE AGENDA
  • 4. TVO’s IdeaShaker Lab TVO’s IdeaShaker team explores emerging digital trends that have “disruptive” potential and approaches all projects through the lens of how technology can impact and enhance TVO’s educational resources for children, current affairs content and other TVO content. “ “
  • 6. Ping Pong App  One of the few multi-device apps in the store  Featured by Apple in January 2013  Over 15,000 downloads in 15 days  Non-branded version developed for international markets  Built to support the North American premiere of the documentary Ping Pong: Never Too Old For Gold Overview
  • 7. Engaging Experience Understand the underlying themes that can be woven through your entire cross- media narrative “ “ Concept 1
  • 8. Engaging Experience Find the technologies that can deliver on your themes. Transmedia is great when done right. “ “ Concept 2
  • 9. Engaging Experience When packaging a brand new concept for a user, make sure you wrap it up in something they are familiar with. “ “ Concept 3
  • 10. Engaging Experience Almost everything has been done before. Do it better. “ “ Concept 4
  • 11. IdeaShaker + Mad Hatter • Prototyped in both Android and iOS - > proof of concept • Due to hard deadline had to bring in an awesome team to help execute the project Working together
  • 12. WHO IS ? Mad Hatter Technology specializes in marketing & communications technology. Team of specialists in a variety of things: -Digital design -Web dev -Mobile dev -Social media Strategy is our means. Creativity is our craft. Technology is our passion. “ “
  • 13. WHAT IS UP TO? • TVO • Ivanhoe Cambridge • Balsillie School of International Affairs • Centre for International Governance Innovation • Alternatives Journal • The Regional of Waterloo • University of Waterloo • University of Ontario • Waterloo Regional Police Services • Thunder Bay Police Services
  • 14. Game Dev Basics States for single player
  • 15. Game Dev BasicsSimplified game loop for single player #define LOOP_INTERVAL 0.033f [NSTimer scheduledTimerWithTimeInterval:LOOP_INTERVAL target:self selector:@selector(gameLoop) userInfo:nil repeats:YES]; - (void)gameLoop{ switch(gameState){ case kStateGameServe: //if recent motion data tells us swing gesture was made //go to Waiting state break; case kStateGameWaiting: //Calculate and display AI player's response //go to Return state break;
  • 16. Game Dev BasicsSimplified game loop for single player case kStateGameReturn: //if we've taken too long to return the shot //rally is over: give AI player a point, go into appropriate Serve or Return state //else if recent motion data tells us swing gesture was made //if it was a bad swing //rally is over: give AI player a point, go into appropriate Serve or Return state //else go to Waiting state break; default: break; } }
  • 17. Pairing //This was built foriOS 6 //Things have changed in iOS 7 GKPeerPickerController* picker; picker = [[GKPeerPickerController alloc] init]; picker.delegate = self; [picker show];
  • 18. Pairing - (void)peerPickerController:(GKPeerPickerController *)picker didConnectPeer:(NSString *)peerID toSession: (GKSession *)session //store info from session that we’ll need, like opponent’s ID // Make sure we have a reference to the game session and it is set up to receive data // Done with the Peer Picker so dismiss it. // startGame -(void)peerPickerControllerDidCancel:(GKPeerPickerController *)picker //do any cleanup required and send us back to menu // No need to implement -peerPickerController:didSelectConnectionType: delegate method since this app does not //support multiple connection types. - (GKSession *)peerPickerController:(GKPeerPickerController *)picker sessionForConnectionType: (GKPeerPickerConnectionType)type //init and return a GKSession that holds a game session ID and my display name sessionMode is //GKSessionModePeer GKPeerPickerControllerDelegate
  • 19. 2 Player Logic States for two player
  • 20. 2 Player Logic Game loop for two player - (void)gameLoop{ switch (networkState) { case kStateNetworkMatching: break; case kStateNetworkPlaying: switch(gameState){ case kStateGameSyncServe: case kStateGameSyncReturn: //if phones have been pointing at each other for long enough //save current phone direction //if we’re in SyncServe go to Serve state //if we’re in SyncReturn go to Waiting state // send SYNC_SUCCESS to other phone with direction //else send GESTURE_SYNC with direction break;
  • 21. 2 Player Logic case kStateGameServe: //if recent motion data tells us swing gesture was made //if phone ended up pointing away from other player //rally is over: give out points, go into appropriate Serve or Return state send HIT_FAIL message //else go to Waiting state, display random arrow, send HIT_SUCCESS with orientation of arrow break; case kStateGameWaiting: //make sure the arrow is still pointing the right way even if phone orientation changes break; case kStateGameReturn: //if we've taken too long to return the shot //rally is over: give out points, go into appropriate Serve or Return state send HIT_FAIL message //else if recent motion data tells us swing gesture was made //if phone ended up pointing away from other player or had wrong orientation //rally is over: give out points, go into appropriate Serve or Return state send HIT_FAIL message //else go to Waiting state, display random arrow, send HIT_SUCCESS with orientation of arrow break;
  • 22. 2 Player Logic // once every 8 updates check if we have a recent heartbeat from the other player, and send a //heartbeat packet with current state //if the last heartbeat is too old go to NetworkReconnect state break; case kStateNetworkReconnect: // we have lost a heartbeat for too long, so pause game and notify user while we wait for next //heartbeat or session disconnect. break; }
  • 23. Sending Data typedef enum { NETWORK_ACK, // no packet NETWORK_PLAYER_INFO, NETWORK_PASS_SERVE, //let the other device know that its player serves first NETWORK_GESTURE_SYNC, //packets we send when syncing device directions NETWORK_SYNC_SUCCESS, NETWORK_HIT_SUCCESS, // the result of a swing NETWORK_HIT_FAIL, NETWORK_WIN, NETWORK_HEARTBEAT } PacketCode;
  • 24. Sending Data - (void)sendNetworkPacket:(GKSession *)session packetID:(PacketCode)packetID withData:(void *)data ofLength: (int)length reliable:(BOOL)reliable static unsigned char networkPacket[kMaxPacketSize]; const unsigned int packetHeaderSize = 2 * sizeof(int); // we have two "ints" for our header if(length < (kMaxPacketSize - packetHeaderSize)) { // make sure packet isn’t bigger than buffer int *pIntData = (int *)&networkPacket[0]; pIntData[0] = gamePacketNumber++; // header info pIntData[1] = packetID; memcpy( &networkPacket[packetHeaderSize], data, length ); // copy data in after the header NSData *packet = [NSData dataWithBytes: networkPacket length: (length+packetHeaderSize)]; if(reliable== YES) { [session sendData:packet toPeers:[NSArray arrayWithObject:gamePeerId] withDataMode:GKSendDataReliable error:nil]; } else { [session sendData:packet toPeers:[NSArray arrayWithObject:gamePeerId] withDataMode:GKSendDataUnreliable error:nil];}
  • 25. Receiving Data - (void)receiveData:(NSData *)data fromPeer:(NSString *)peer inSession:(GKSession *)session context:(void *)context //unpack our data into local variables, make sure they arrive in order, etc. switch( packetID ) { case NETWORK_PLAYER_INFO: //save whatever opponent info you need //coin toss to see who serves first (device with smaller ID does this) //If we're not serving first send PASS_SERVE message break; case NETWORK_PASS_SERVE: //set our state to SyncServe (the default is SyncReturn) break; case NETWORK_GESTURE_SYNC: //if devices are not pointing in opposite directions restart timer //else if devices are not pointing horizontally restart timer //else let players know to continue holding that position break;
  • 26. Receiving Data case NETWORK_SYNC_SUCCESS: //save the successful sync direction and go to Serve or Waiting state break; case NETWORK_HIT_SUCCESS: //store orientation we have to match and go to Return state break; case NETWORK_HIT_FAIL: //increment our score //if we won send NETWORK_WIN else figure out who serves next and go to appropriate state break; case NETWORK_WIN: //update stats, etc. break; case NETWORK_HEARTBEAT: // update our record of most recent heartbeat // if we were trying to reconnect, set the state back to multiplayer as the peer is back break;
  • 27. Syncing Directions CMDeviceMotion has a CMAttitude, which has a CMQuaternion There’s more information than we want here. We just want a direction vector representing the normal of plane of device screen. Apply each phone’s rotation (encoded by quaternion) to an arbitrary vector and compare the resulting vectors. Let v = [0, 0, 0, 1], and q is our quaternion v´ = q v q-1 if the two resulting v´ vectors are roughly opposite, we’re good
  • 28. Detecting Swing Motion Check that userAcceleration exceeds threshold Check gravity to see that phone is mostly on its side Check that rotation in all three axes is small
  • 29. Dealing With Rejection We found that your app exhibited one or more bugs, when reviewed on the iPhone 5 and the iPad (3rd Gen) running iOS 6.0.1, on both Wi-Fi and cellular networks, which is not in compliance with the App Store Review Guidelines. The steps to reproduce are: 1) Launch the application on two devices 2) Tap the "Play" button on both devices 3) Connect the devices The application hangs at a blue screen and no additional content is loaded.
  • 30. Dealing With Rejection We've been rejected twice for bugs found when the two phones are really close to each other at the start of the game. We found the cause of these bugs to be interference to the Bluetooth antenna and the magnetometer, which arises when the two phones are close together in certain positions. While we have introduced new code to ensure these failures are handled gracefully from a user's perspective, it would still be best if you test this app as it is intended to be used: each phone held by a different player, standing a few feet to a few yards apart. Thanks, and enjoy!
  • 34. BUT COME SAY HELLO! Thomas Ang - @madhattermobile David Neumann - @everyoneminus1

Editor's Notes

  1. - Has been around for about 5 years Internal foresight and research department
  2. a history of being recognized by the industry for our great educational apps DocStudio App – featured in Apple Store TVO On Demand – featured in Google Play Store Ping Pong – featured in Apple Store Caterpillar Count for Leap Motion – featured as one of the best educational apps for back to school Hurricane Maker – multi-player educational installation for WGSI
  3. Going beyond just how to get featured, let’s look at how to create an engaging experience. At the heart, themes of staying active and being social at any age is a key message
  4. Going beyond just how to get featured, let’s look at how to create an engaging experience. At the heart, themes of staying active and being social at any age is a key message
  5. Our main themes that we wanted to stretch across all narratives were: being active and being social. For us, transforming your cell phone into a ping pong paddle and creating a multi-device experience achieved this
  6. For most users, a multi-device iOS game that changes your phone into part of the physical game is a brand new concept. Wrapping it in something simple and familiar like Ping Pong breaks down some of the hesitation people have to try it
  7. In researching our Ping Pong idea we found another developer had done a ping pong app. We took a look at it and found areas we believed could be done better, and we did them. Most notable, gameification. We felt that the app didn’t give the user a reason to play for more than 1-2 minutes. We added colours and arrows, increasing frequency and points to turn a gimmicky app into an engaging experience
  8. In researching our Ping Pong idea we found another developer had done a ping pong app. We took a look at it and found areas we believed could be done better, and we did them. Most notable, gameification. We felt that the app didn’t give the user a reason to play for more than 1-2 minutes. We added colours and arrows, increasing frequency and points to turn a gimmicky app into an engaging experience