SlideShare a Scribd company logo
1 of 30
Download to read offline
Partyrocking

By @pekewake and @dvdchavarri
From Chat to Realtime Game
Who we are.

David Chavarri and Rubén Chavarri

…where the idea comes from
Introduction

What we are going to talk about
Practical Example – ZombieRocking
Personal Experience
Future Possibilities
From Chat to Realtime Game
…a little bit about the background
HTML5 Tour: Programación de
Videojuegos HTML5
Fernando Oteros

Desarrollo de videojuegos en JavaScript
Sergio Ruiz (@serginator)
Carlos Benitez (@etnassoft)
Implementar Websockets con...
Jorge Del Casar (@jorgecasar)
From Chat to Realtime Game
Technology
From Chat to Realtime Game
1) Scene
2) Events
3) Chat
4) ZombieRocking

5) World of ZombieRocking
From Chat to Realtime Game

1) Scene
From Chat to Realtime Game
1) Scene

.html

scene.js

Our trick: CAAT no intrusive
“Game Framework” that help
us to encapsulate in our
examples the “Canvas”
interaction throw object
concepts like Director,
Scene, Actors & gameloop).

other Frameworks

ally.js
From Chat to Realtime Game

2) Events
Behaviours
Breath

Walk - Wait
Shot

Input Controls
From Chat to Realtime Game

2) Events
Behaviors

Inputs
From Chat to Realtime Game

3) Chat
io.sockets.emit(“msg”)

socketio.emit(“msg”)

socketio.emit(“msg”)
From Chat to Realtime Game

3) Chat
Server
(node)

Client
(html)

source code
From Chat to Realtime Game

4) ZombieRocking

Emit websocket
action Left
action Right
action Wait
action Shot

Emit clientToServer
From Chat to Realtime Game

4) ZombieRocking
Update Controls

Manage Events
From Chat to Realtime Game

5) World of ZombieRocking

emit
clientToServer

Emit websocket
From Chat to Realtime Game

5) World of ZombieRocking
server (node)

client
Now What?

Let deploy the App
in Smartphones

!
Now What? Deploy the App in Smartphones

Inconveniences
WebSocket Support
Performance

Native Interaction
Inconveniences
WebSocket Support

http://caniuse.com/websockets
Inconveniences

Performance - JS Acceleration
CocoonJS - Canvas Acceleration
http://sumonhtml5.ludei.com/

Famo.us - HTML Acceleration
http://famo.us/
Inconveniences

Native Interaction with HTML5 Capabilities
Supported
+ Hybrid Approach
GeolocationAPI
Offline support
WebStorage
2D animations

Camera
Notifications
Sensors
Device Info
Market Store
Deploying the App in Smartphones

Hybrid Mobile App Frameworks
Cordova / PhoneGap (Javascript)
(IBM Worklite, HP Anywhere, Intel XDK, SAP Platform –SUP)

Appcelerator Titanium (Javascript)
KonyOne (Lua & Javascript)
Xamarin (C#)
Rhodes (Ruby)
Deploying the App in Smartphones

Appcelerator Titanium
Proprietary Software
Compiles to native code
Proprietary JavaScript UI
that maps to native OS UI
Enterprise Support

Android, IOS
(Windows phone, BlackBerry
and Tizen, soon)

http://www.appcelerator.com/
Deploying the App in Smartphones

Cordova PhoneGap
Open Source
Wraps the webView

HTML5 & CSS3
Great OpenSource
Community

Most Mobile Platforms

http://phonegap.com/
Now What? Deploy the App in Smartphones

A few Pointers
Data on the wire!
Please don't send your app HTML from the server,
Javascript does a perfect job rendering it

Use local storage
Whenever possible, show cached content to the user

Write plugins & custom native UI
Sometimes is worth the development of Native features
What about WebSockets Scalability?
MVC Real-time
frameworks
Cross-platform
OpenSource,Scaffolding
Multilingual

Yes

Yes

Resource View
Presenter

Model-View-Controller

Model-View-Controller
Active-Record

MongoDB

Design pattern

Yes

MongoDB
Redis

MySQL, MongoDB,Flat
File, Redis,
PostgreSQL

Good

Basic

Good

Reactive programming
Component-oriented
Pub/Sub

Component-oriented
Event-driven Reactive
programming

Event-driven

27%

38%

35%

Database
Community Driven
Programming paradigm
Preference

http://vschart.com/compare/meteor-web-framework/vs/derbyjs/vs/sails-js
What about WebSockets Scalability?
WebSocket Server Providers:
Pusher
http://pusher.com/

Firebase
https://www.firebase.com/

Tambur.io
https://www.tambur.io/
Just one more demonstration

Demo Time !!!
World of ZombieRocking
Our experiments

http://www.partyrocking.tv
“Be Partyrocking
my friend…”
The twins

By @pekewake..
@dvdchavarri

More Related Content

Similar to PartyRocking: Jugando con Javascript y Websockets

Prototyping in aframe
Prototyping in aframePrototyping in aframe
Prototyping in aframeKumar Ahir
 
Fragmentation in mobile design: fact or fiction
Fragmentation in mobile design: fact or fictionFragmentation in mobile design: fact or fiction
Fragmentation in mobile design: fact or fictionBelen Barros Pena
 
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010Heiko Behrens
 
Augmented reality
Augmented realityAugmented reality
Augmented realityRizal Akbar
 
iPhone/iPad Development with Titanium
iPhone/iPad Development with TitaniumiPhone/iPad Development with Titanium
iPhone/iPad Development with TitaniumAxway Appcelerator
 
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CA
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CAAppcelerator iPhone/iPad Dev Con 2010 San Diego, CA
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CAJeff Haynie
 
HoloLens.pdf
HoloLens.pdfHoloLens.pdf
HoloLens.pdfVishwas N
 
Philly ete-2011
Philly ete-2011Philly ete-2011
Philly ete-2011davyjones
 
O futuro do desenvolvimento .NET
O futuro do desenvolvimento .NETO futuro do desenvolvimento .NET
O futuro do desenvolvimento .NETRodrigo Kono
 
Fake it 'til you make it
Fake it 'til you make itFake it 'til you make it
Fake it 'til you make itJonathan Snook
 
HTML5 Can't Do That
HTML5 Can't Do ThatHTML5 Can't Do That
HTML5 Can't Do ThatNathan Smith
 
Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016Tony Parisi
 
Começando com Android
Começando com AndroidComeçando com Android
Começando com AndroidDextra
 
Building a game engine with jQuery
Building a game engine with jQueryBuilding a game engine with jQuery
Building a game engine with jQueryPaul Bakaus
 
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...Kai Koenig
 
20141216 멜팅팟 부산 세션 ii - cross platform 개발
20141216 멜팅팟 부산   세션 ii - cross platform 개발20141216 멜팅팟 부산   세션 ii - cross platform 개발
20141216 멜팅팟 부산 세션 ii - cross platform 개발영욱 김
 

Similar to PartyRocking: Jugando con Javascript y Websockets (20)

Hybrid HTML5 Apps
Hybrid HTML5 AppsHybrid HTML5 Apps
Hybrid HTML5 Apps
 
Prototyping in aframe
Prototyping in aframePrototyping in aframe
Prototyping in aframe
 
Making VR Webby
Making VR WebbyMaking VR Webby
Making VR Webby
 
Fragmentation in mobile design: fact or fiction
Fragmentation in mobile design: fact or fictionFragmentation in mobile design: fact or fiction
Fragmentation in mobile design: fact or fiction
 
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
Plattformübergreifende App-Entwicklung (ein Vergleich) - MobileTechCon 2010
 
Augmented reality
Augmented realityAugmented reality
Augmented reality
 
iPhone/iPad Development with Titanium
iPhone/iPad Development with TitaniumiPhone/iPad Development with Titanium
iPhone/iPad Development with Titanium
 
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CA
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CAAppcelerator iPhone/iPad Dev Con 2010 San Diego, CA
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CA
 
HoloLens.pdf
HoloLens.pdfHoloLens.pdf
HoloLens.pdf
 
Samsung
SamsungSamsung
Samsung
 
Philly ete-2011
Philly ete-2011Philly ete-2011
Philly ete-2011
 
O futuro do desenvolvimento .NET
O futuro do desenvolvimento .NETO futuro do desenvolvimento .NET
O futuro do desenvolvimento .NET
 
Fake it 'til you make it
Fake it 'til you make itFake it 'til you make it
Fake it 'til you make it
 
HTML5 Can't Do That
HTML5 Can't Do ThatHTML5 Can't Do That
HTML5 Can't Do That
 
Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016
 
Começando com Android
Começando com AndroidComeçando com Android
Começando com Android
 
Bridging Realitites
Bridging RealititesBridging Realitites
Bridging Realitites
 
Building a game engine with jQuery
Building a game engine with jQueryBuilding a game engine with jQuery
Building a game engine with jQuery
 
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
Apps vs. Sites vs. Content - a vendor-agnostic view on building stuff for the...
 
20141216 멜팅팟 부산 세션 ii - cross platform 개발
20141216 멜팅팟 부산   세션 ii - cross platform 개발20141216 멜팅팟 부산   세션 ii - cross platform 개발
20141216 멜팅팟 부산 세션 ii - cross platform 개발
 

More from Ruben Chavarri

Construir una App con AI nunca fue tan fácil
Construir una App con AI nunca fue tan fácilConstruir una App con AI nunca fue tan fácil
Construir una App con AI nunca fue tan fácilRuben Chavarri
 
Block chain lets kill the hype
Block chain lets kill the hypeBlock chain lets kill the hype
Block chain lets kill the hypeRuben Chavarri
 
T3chCoin: dando forma al mundo a base de tokens
T3chCoin: dando forma al mundo a base de tokensT3chCoin: dando forma al mundo a base de tokens
T3chCoin: dando forma al mundo a base de tokensRuben Chavarri
 
BitCoin, BlockChain, más criaturas fantásticas, y donde utilizarlas
BitCoin, BlockChain, más criaturas fantásticas, y donde utilizarlasBitCoin, BlockChain, más criaturas fantásticas, y donde utilizarlas
BitCoin, BlockChain, más criaturas fantásticas, y donde utilizarlasRuben Chavarri
 
Angular2 + New Firebase in Action
Angular2 + New Firebase in ActionAngular2 + New Firebase in Action
Angular2 + New Firebase in ActionRuben Chavarri
 
The cognitive side of IoT (TechSummit 2016)
The cognitive side of IoT (TechSummit 2016)The cognitive side of IoT (TechSummit 2016)
The cognitive side of IoT (TechSummit 2016)Ruben Chavarri
 
Introduccion WebComponents y Visual Studio
Introduccion WebComponents y Visual StudioIntroduccion WebComponents y Visual Studio
Introduccion WebComponents y Visual StudioRuben Chavarri
 

More from Ruben Chavarri (7)

Construir una App con AI nunca fue tan fácil
Construir una App con AI nunca fue tan fácilConstruir una App con AI nunca fue tan fácil
Construir una App con AI nunca fue tan fácil
 
Block chain lets kill the hype
Block chain lets kill the hypeBlock chain lets kill the hype
Block chain lets kill the hype
 
T3chCoin: dando forma al mundo a base de tokens
T3chCoin: dando forma al mundo a base de tokensT3chCoin: dando forma al mundo a base de tokens
T3chCoin: dando forma al mundo a base de tokens
 
BitCoin, BlockChain, más criaturas fantásticas, y donde utilizarlas
BitCoin, BlockChain, más criaturas fantásticas, y donde utilizarlasBitCoin, BlockChain, más criaturas fantásticas, y donde utilizarlas
BitCoin, BlockChain, más criaturas fantásticas, y donde utilizarlas
 
Angular2 + New Firebase in Action
Angular2 + New Firebase in ActionAngular2 + New Firebase in Action
Angular2 + New Firebase in Action
 
The cognitive side of IoT (TechSummit 2016)
The cognitive side of IoT (TechSummit 2016)The cognitive side of IoT (TechSummit 2016)
The cognitive side of IoT (TechSummit 2016)
 
Introduccion WebComponents y Visual Studio
Introduccion WebComponents y Visual StudioIntroduccion WebComponents y Visual Studio
Introduccion WebComponents y Visual Studio
 

Recently uploaded

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
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
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 

Recently uploaded (20)

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
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?
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 

PartyRocking: Jugando con Javascript y Websockets

  • 2. From Chat to Realtime Game Who we are. David Chavarri and Rubén Chavarri …where the idea comes from
  • 3. Introduction What we are going to talk about Practical Example – ZombieRocking Personal Experience Future Possibilities
  • 4. From Chat to Realtime Game …a little bit about the background HTML5 Tour: Programación de Videojuegos HTML5 Fernando Oteros Desarrollo de videojuegos en JavaScript Sergio Ruiz (@serginator) Carlos Benitez (@etnassoft) Implementar Websockets con... Jorge Del Casar (@jorgecasar)
  • 5. From Chat to Realtime Game Technology
  • 6. From Chat to Realtime Game 1) Scene 2) Events 3) Chat 4) ZombieRocking 5) World of ZombieRocking
  • 7. From Chat to Realtime Game 1) Scene
  • 8. From Chat to Realtime Game 1) Scene .html scene.js Our trick: CAAT no intrusive “Game Framework” that help us to encapsulate in our examples the “Canvas” interaction throw object concepts like Director, Scene, Actors & gameloop). other Frameworks ally.js
  • 9. From Chat to Realtime Game 2) Events Behaviours Breath Walk - Wait Shot Input Controls
  • 10. From Chat to Realtime Game 2) Events Behaviors Inputs
  • 11. From Chat to Realtime Game 3) Chat io.sockets.emit(“msg”) socketio.emit(“msg”) socketio.emit(“msg”)
  • 12. From Chat to Realtime Game 3) Chat Server (node) Client (html) source code
  • 13. From Chat to Realtime Game 4) ZombieRocking Emit websocket action Left action Right action Wait action Shot Emit clientToServer
  • 14. From Chat to Realtime Game 4) ZombieRocking Update Controls Manage Events
  • 15. From Chat to Realtime Game 5) World of ZombieRocking emit clientToServer Emit websocket
  • 16. From Chat to Realtime Game 5) World of ZombieRocking server (node) client
  • 17. Now What? Let deploy the App in Smartphones !
  • 18. Now What? Deploy the App in Smartphones Inconveniences WebSocket Support Performance Native Interaction
  • 20. Inconveniences Performance - JS Acceleration CocoonJS - Canvas Acceleration http://sumonhtml5.ludei.com/ Famo.us - HTML Acceleration http://famo.us/
  • 21. Inconveniences Native Interaction with HTML5 Capabilities Supported + Hybrid Approach GeolocationAPI Offline support WebStorage 2D animations Camera Notifications Sensors Device Info Market Store
  • 22. Deploying the App in Smartphones Hybrid Mobile App Frameworks Cordova / PhoneGap (Javascript) (IBM Worklite, HP Anywhere, Intel XDK, SAP Platform –SUP) Appcelerator Titanium (Javascript) KonyOne (Lua & Javascript) Xamarin (C#) Rhodes (Ruby)
  • 23. Deploying the App in Smartphones Appcelerator Titanium Proprietary Software Compiles to native code Proprietary JavaScript UI that maps to native OS UI Enterprise Support Android, IOS (Windows phone, BlackBerry and Tizen, soon) http://www.appcelerator.com/
  • 24. Deploying the App in Smartphones Cordova PhoneGap Open Source Wraps the webView HTML5 & CSS3 Great OpenSource Community Most Mobile Platforms http://phonegap.com/
  • 25. Now What? Deploy the App in Smartphones A few Pointers Data on the wire! Please don't send your app HTML from the server, Javascript does a perfect job rendering it Use local storage Whenever possible, show cached content to the user Write plugins & custom native UI Sometimes is worth the development of Native features
  • 26. What about WebSockets Scalability? MVC Real-time frameworks Cross-platform OpenSource,Scaffolding Multilingual Yes Yes Resource View Presenter Model-View-Controller Model-View-Controller Active-Record MongoDB Design pattern Yes MongoDB Redis MySQL, MongoDB,Flat File, Redis, PostgreSQL Good Basic Good Reactive programming Component-oriented Pub/Sub Component-oriented Event-driven Reactive programming Event-driven 27% 38% 35% Database Community Driven Programming paradigm Preference http://vschart.com/compare/meteor-web-framework/vs/derbyjs/vs/sails-js
  • 27. What about WebSockets Scalability? WebSocket Server Providers: Pusher http://pusher.com/ Firebase https://www.firebase.com/ Tambur.io https://www.tambur.io/
  • 28. Just one more demonstration Demo Time !!! World of ZombieRocking
  • 30. “Be Partyrocking my friend…” The twins By @pekewake.. @dvdchavarri