SlideShare uma empresa Scribd logo
1 de 40
© GameDuell 2013
Developing a Cross Platform Game with Java and HTML5
Josep Prat – josep.prat@gameduell.de - @jlprat
© GameDuell 2013
1. What is Cross Platform?
2. Building Cross Platform Games
3. Building the HTML 5 Client
4. Live Demo
5. Q & A
Agenda
© GameDuell 2013
The Mission:
Play the same game across several platforms
© GameDuell 2013
Make a Cross Platform Game!
You are the new architect of GameDuell and the
management has a new task for you:
© GameDuell 2013
What is Cross Platform?
© GameDuell 2013
What is Cross Platform?
Deliver the best experience to all players:
Different flavor for the same game
Interaction between platforms
Keep the game logic in one place
Some examples: Bubble Speed, Belote...
© GameDuell 2013
Challenge Accepted!
Let’s introduce the GameDuell Team
© GameDuell 2013
Bringing people together to have a good time with games -
Wherever, whenever!
© GameDuell 2013
Key Facts
 Founded in 2003
 Over 210 team members
 More than 125 million registered players
 Over 70 games in 7 languages
 500 million page impressions per month
 Tech Talks with technology experts
© GameDuell 2013
Team Structure
 Scrum teams
 Product based
 Specialists in many languages
• Java
• Flash
• iOS / Android SDK
• HTML5
© GameDuell 2013
Let's Start Building a Cross Platform Game!
© GameDuell 2013
Architecture Overview
© GameDuell 2013
Considerations
 Security First
 Thin Client
 Fat Server
 Separate Game and Transport Protocol
© GameDuell 2013
Security First
 Design your software with security in mind
 Don't expose any of the internals
 Don't base your security on obfuscation
 Don't leave any debug flags live!
 Don't trust the clients
© GameDuell 2013
Hacks - Spoofing
Pretend being somebody else
© GameDuell 2013
Hacks – Faking Data
Client lies and server doesn't validate the input
© GameDuell 2013
Fat Server
 Add all game logic in the server
 Contains any logic shared among clients
 Take care of timeouts
 Do a handshake and mark your clients
 Again: don't trust your clients!
© GameDuell 2013
How do we build a Game Sever?
 Java based Game Server
 Drools (rule engine) defining the game logic
 More readable
 Speed and Scalability
 Declarative programming
© GameDuell 2013
Protocols
 Separate Game protocol from Transport
protocol
 Provide everything the client needs to
show the action (no state needed on
clients)
 Use some serializable format i.e. JSON
 Think about rescue pills
© GameDuell 2013
What About the Game Client?
© GameDuell 2013
Architecture Overview
© GameDuell 2013
KISS
 Keep It Simple, Stupid!
 Absolutely reactive
 No main loop
 Separate control from view
 No game logic
© GameDuell 2013
Benefits of Layers
 Each layer is more concise
 The rendering can be changed without
affecting the game
 The game is defined only in the controllers
© GameDuell 2013
Benefits of Being Reactive
 No loops
 More efficient
 Use RequestAnimationFrame
 Simplified logic
© GameDuell 2013
Which Technology Can We Use?
© GameDuell 2013
WRITE ONCE
Use anywhere
© GameDuell 2013
What is HTML 5?
 Set of APIs
 Standardized by W3C
 5th revision of the standard (HTML)
 Still in progress
 Different key players (with different interests)
 Buzzword since “Thoughts on Flash”
© GameDuell 2013
A Standard, However...
 Not implemented completely everywhere
 Different quality of implementation in each
browser
 Behavior is too many times browser specific
© GameDuell 2013
This Leads to the Following Challenges
 Avoid Polyfills
 Deliver same (or the closest possible)
experience on all devices/platforms
 Keep performance up
 Manage different device sizes
© GameDuell 2013
Compared to Native Apps
 Cross Platform by definition
 Less specialization needed (JS + CSS)
 Easy integration in existing platforms
 No need for Stores, you are directly live
© GameDuell 2013
Compared to Native Apps
 Cross Platform by definition
 Less specialization needed (JS + CSS)
 Easy integration in existing platforms
 No need for Stores, you are directly live
 Less control
 Far away from the hardware
 No Integration with the device
© GameDuell 2013
Key Technologies in Hand
 New HTML Markup
 CSS3
 Geolocalization
 Canvas & WebGL
 WebStorage
 WebSockets
 Video
© GameDuell 2013
WebSockets
© GameDuell 2013
WebSockets
 Client → Server communication
 Enable Server → Client communication
 Avoids polling from client
 Old Browsers don't support it
 Less load on servers
 More performant
© GameDuell 2013
Alternative: Long Polling
 Client → Server communication
 Pseudo Server → Client communication
 Does long lasting polls to the server
 More stress on both client and server
© GameDuell 2013
CSS 3 Transformations
Available methods are: rotate, skew-x skew-y,
scale and translate
Or all at once with matrix:
• Take all 4 coordinates of a div
• Multiply each one with the matrix
• The result of each operation is the new
coordinate
© GameDuell 2013
A Few Months Later...
© GameDuell 2013
HTML5 version at GameDuell available for mobile devices
 Full sync with desktop accounts
 Cross-platform play with desktop users
© GameDuell 2013
Q & A
© GameDuell 2013
Stay in Touch:
inside.gameduell.de
www.techtalk-berlin.de
Further Information

Mais conteúdo relacionado

Destaque

Passion Smart Design Houses presentation (English)
Passion Smart Design Houses presentation (English)Passion Smart Design Houses presentation (English)
Passion Smart Design Houses presentation (English)Signe Soonberg
 
Building big things in Java
Building big things in JavaBuilding big things in Java
Building big things in Javascobal
 
3D Game development using Blender and Java
3D Game development using Blender and Java3D Game development using Blender and Java
3D Game development using Blender and JavaElaspix
 
Operation Research (Simplex Method)
Operation Research (Simplex Method)Operation Research (Simplex Method)
Operation Research (Simplex Method)Shivani Gautam
 
The Future is Fun - Stop Motion, iCreate, Mindstorms, WeDo, & Game Design
The Future is Fun - Stop Motion, iCreate, Mindstorms, WeDo, & Game DesignThe Future is Fun - Stop Motion, iCreate, Mindstorms, WeDo, & Game Design
The Future is Fun - Stop Motion, iCreate, Mindstorms, WeDo, & Game Designmkc8b
 
Internet 2020: The Future Connection
Internet 2020: The Future ConnectionInternet 2020: The Future Connection
Internet 2020: The Future ConnectionChristine Nolan
 
Future Of Technology
Future Of  TechnologyFuture Of  Technology
Future Of TechnologyMelanie Swan
 
Smart Home technologies
Smart Home technologiesSmart Home technologies
Smart Home technologiesloggcity
 
Special Cases in Simplex Method
Special Cases in Simplex MethodSpecial Cases in Simplex Method
Special Cases in Simplex MethodDivyansh Verma
 
The Future of Communication Technology
The Future of Communication TechnologyThe Future of Communication Technology
The Future of Communication Technologyanpipt01
 
Home automation using android mobiles
Home automation using android mobilesHome automation using android mobiles
Home automation using android mobilesDurairaja
 

Destaque (14)

Passion Smart Design Houses presentation (English)
Passion Smart Design Houses presentation (English)Passion Smart Design Houses presentation (English)
Passion Smart Design Houses presentation (English)
 
Building big things in Java
Building big things in JavaBuilding big things in Java
Building big things in Java
 
3D Game development using Blender and Java
3D Game development using Blender and Java3D Game development using Blender and Java
3D Game development using Blender and Java
 
Operation Research (Simplex Method)
Operation Research (Simplex Method)Operation Research (Simplex Method)
Operation Research (Simplex Method)
 
The Future is Fun - Stop Motion, iCreate, Mindstorms, WeDo, & Game Design
The Future is Fun - Stop Motion, iCreate, Mindstorms, WeDo, & Game DesignThe Future is Fun - Stop Motion, iCreate, Mindstorms, WeDo, & Game Design
The Future is Fun - Stop Motion, iCreate, Mindstorms, WeDo, & Game Design
 
Internet 2020: The Future Connection
Internet 2020: The Future ConnectionInternet 2020: The Future Connection
Internet 2020: The Future Connection
 
Future Of Technology
Future Of  TechnologyFuture Of  Technology
Future Of Technology
 
Future technology
Future technologyFuture technology
Future technology
 
Smart Home technologies
Smart Home technologiesSmart Home technologies
Smart Home technologies
 
Multimedia
MultimediaMultimedia
Multimedia
 
Special Cases in Simplex Method
Special Cases in Simplex MethodSpecial Cases in Simplex Method
Special Cases in Simplex Method
 
The Future of Communication Technology
The Future of Communication TechnologyThe Future of Communication Technology
The Future of Communication Technology
 
Home automation using android mobiles
Home automation using android mobilesHome automation using android mobiles
Home automation using android mobiles
 
Java tutorial PPT
Java tutorial PPTJava tutorial PPT
Java tutorial PPT
 

Semelhante a Developing a Cross Platform Game with Java & HTML5

GameLab - Developing Crossplatform Games in HTML5 and Java
GameLab - Developing Crossplatform Games in HTML5 and JavaGameLab - Developing Crossplatform Games in HTML5 and Java
GameLab - Developing Crossplatform Games in HTML5 and JavaJosep Prat
 
Pa waalsprong presentation_20101007_v2
Pa waalsprong presentation_20101007_v2Pa waalsprong presentation_20101007_v2
Pa waalsprong presentation_20101007_v2Eugene Borshch
 
Cpp In Soa
Cpp In SoaCpp In Soa
Cpp In SoaWSO2
 
Unleash MuleSoft Platform for Enterprise Healthcare Solutions
Unleash MuleSoft Platform for Enterprise Healthcare SolutionsUnleash MuleSoft Platform for Enterprise Healthcare Solutions
Unleash MuleSoft Platform for Enterprise Healthcare SolutionsEva Mave Ng
 
Be IT Conference 2015 | MentorMate - Adding multiplayer to your mobile game: ...
Be IT Conference 2015 | MentorMate - Adding multiplayer to your mobile game: ...Be IT Conference 2015 | MentorMate - Adding multiplayer to your mobile game: ...
Be IT Conference 2015 | MentorMate - Adding multiplayer to your mobile game: ...Polina Dekova
 
Theater Management Software - Features & technology
Theater Management Software - Features & technologyTheater Management Software - Features & technology
Theater Management Software - Features & technologyHemant Maheshwari
 
Rewardenv by ITG Cloud - Meet Magento India
Rewardenv by ITG Cloud - Meet Magento IndiaRewardenv by ITG Cloud - Meet Magento India
Rewardenv by ITG Cloud - Meet Magento IndiaPiyushDankhra
 
Programming Language Final PPT
Programming Language Final PPTProgramming Language Final PPT
Programming Language Final PPTMatthew Chang
 
Horizon view technical deep dive
Horizon view   technical deep diveHorizon view   technical deep dive
Horizon view technical deep diveMurugesan Arumugam
 
Software Engineering in the Age of SaaS and Cloud Computing - SERA 2013 - MFF...
Software Engineering in the Age of SaaS and Cloud Computing - SERA 2013 - MFF...Software Engineering in the Age of SaaS and Cloud Computing - SERA 2013 - MFF...
Software Engineering in the Age of SaaS and Cloud Computing - SERA 2013 - MFF...Jaroslav Gergic
 
ProtoTech Solutions Corporate Profile
ProtoTech Solutions Corporate ProfileProtoTech Solutions Corporate Profile
ProtoTech Solutions Corporate ProfileProtoTech Solutions
 
Secure Developer Access at Decisiv
Secure Developer Access at DecisivSecure Developer Access at Decisiv
Secure Developer Access at DecisivTeleport
 
Compatibility Testing of Your Web Apps - Tips and Tricks for Debugging Locall...
Compatibility Testing of Your Web Apps - Tips and Tricks for Debugging Locall...Compatibility Testing of Your Web Apps - Tips and Tricks for Debugging Locall...
Compatibility Testing of Your Web Apps - Tips and Tricks for Debugging Locall...Coveros, Inc.
 
Compatibility Testing of Your Web Apps - Tips and Tricks for Debugging Locall...
Compatibility Testing of Your Web Apps - Tips and Tricks for Debugging Locall...Compatibility Testing of Your Web Apps - Tips and Tricks for Debugging Locall...
Compatibility Testing of Your Web Apps - Tips and Tricks for Debugging Locall...Sauce Labs
 
Qlite Content Management Software
Qlite Content Management SoftwareQlite Content Management Software
Qlite Content Management SoftwareAkash Tyagi
 

Semelhante a Developing a Cross Platform Game with Java & HTML5 (20)

GameLab - Developing Crossplatform Games in HTML5 and Java
GameLab - Developing Crossplatform Games in HTML5 and JavaGameLab - Developing Crossplatform Games in HTML5 and Java
GameLab - Developing Crossplatform Games in HTML5 and Java
 
Pa waalsprong presentation_20101007_v2
Pa waalsprong presentation_20101007_v2Pa waalsprong presentation_20101007_v2
Pa waalsprong presentation_20101007_v2
 
Cpp In Soa
Cpp In SoaCpp In Soa
Cpp In Soa
 
Unleash MuleSoft Platform for Enterprise Healthcare Solutions
Unleash MuleSoft Platform for Enterprise Healthcare SolutionsUnleash MuleSoft Platform for Enterprise Healthcare Solutions
Unleash MuleSoft Platform for Enterprise Healthcare Solutions
 
Be IT Conference 2015 | MentorMate - Adding multiplayer to your mobile game: ...
Be IT Conference 2015 | MentorMate - Adding multiplayer to your mobile game: ...Be IT Conference 2015 | MentorMate - Adding multiplayer to your mobile game: ...
Be IT Conference 2015 | MentorMate - Adding multiplayer to your mobile game: ...
 
Theater Management Software - Features & technology
Theater Management Software - Features & technologyTheater Management Software - Features & technology
Theater Management Software - Features & technology
 
Rewardenv by ITG Cloud - Meet Magento India
Rewardenv by ITG Cloud - Meet Magento IndiaRewardenv by ITG Cloud - Meet Magento India
Rewardenv by ITG Cloud - Meet Magento India
 
CTO Talk: HTML5, a clear and present danger
CTO Talk: HTML5, a clear and present dangerCTO Talk: HTML5, a clear and present danger
CTO Talk: HTML5, a clear and present danger
 
Programming Language Final PPT
Programming Language Final PPTProgramming Language Final PPT
Programming Language Final PPT
 
Horizon view technical deep dive
Horizon view   technical deep diveHorizon view   technical deep dive
Horizon view technical deep dive
 
Software Engineering in the Age of SaaS and Cloud Computing - SERA 2013 - MFF...
Software Engineering in the Age of SaaS and Cloud Computing - SERA 2013 - MFF...Software Engineering in the Age of SaaS and Cloud Computing - SERA 2013 - MFF...
Software Engineering in the Age of SaaS and Cloud Computing - SERA 2013 - MFF...
 
Bff and GraphQL
Bff and GraphQLBff and GraphQL
Bff and GraphQL
 
HTML5 Game Development frameworks overview
HTML5 Game Development frameworks overviewHTML5 Game Development frameworks overview
HTML5 Game Development frameworks overview
 
ProtoTech Solutions Corporate Profile
ProtoTech Solutions Corporate ProfileProtoTech Solutions Corporate Profile
ProtoTech Solutions Corporate Profile
 
Serverless
ServerlessServerless
Serverless
 
Secure Developer Access at Decisiv
Secure Developer Access at DecisivSecure Developer Access at Decisiv
Secure Developer Access at Decisiv
 
Compatibility Testing of Your Web Apps - Tips and Tricks for Debugging Locall...
Compatibility Testing of Your Web Apps - Tips and Tricks for Debugging Locall...Compatibility Testing of Your Web Apps - Tips and Tricks for Debugging Locall...
Compatibility Testing of Your Web Apps - Tips and Tricks for Debugging Locall...
 
Compatibility Testing of Your Web Apps - Tips and Tricks for Debugging Locall...
Compatibility Testing of Your Web Apps - Tips and Tricks for Debugging Locall...Compatibility Testing of Your Web Apps - Tips and Tricks for Debugging Locall...
Compatibility Testing of Your Web Apps - Tips and Tricks for Debugging Locall...
 
Partner_Summit.pdf
Partner_Summit.pdfPartner_Summit.pdf
Partner_Summit.pdf
 
Qlite Content Management Software
Qlite Content Management SoftwareQlite Content Management Software
Qlite Content Management Software
 

Último

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 

Último (20)

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 

Developing a Cross Platform Game with Java & HTML5

  • 1. © GameDuell 2013 Developing a Cross Platform Game with Java and HTML5 Josep Prat – josep.prat@gameduell.de - @jlprat
  • 2. © GameDuell 2013 1. What is Cross Platform? 2. Building Cross Platform Games 3. Building the HTML 5 Client 4. Live Demo 5. Q & A Agenda
  • 3. © GameDuell 2013 The Mission: Play the same game across several platforms
  • 4. © GameDuell 2013 Make a Cross Platform Game! You are the new architect of GameDuell and the management has a new task for you:
  • 5. © GameDuell 2013 What is Cross Platform?
  • 6. © GameDuell 2013 What is Cross Platform? Deliver the best experience to all players: Different flavor for the same game Interaction between platforms Keep the game logic in one place Some examples: Bubble Speed, Belote...
  • 7. © GameDuell 2013 Challenge Accepted! Let’s introduce the GameDuell Team
  • 8. © GameDuell 2013 Bringing people together to have a good time with games - Wherever, whenever!
  • 9. © GameDuell 2013 Key Facts  Founded in 2003  Over 210 team members  More than 125 million registered players  Over 70 games in 7 languages  500 million page impressions per month  Tech Talks with technology experts
  • 10. © GameDuell 2013 Team Structure  Scrum teams  Product based  Specialists in many languages • Java • Flash • iOS / Android SDK • HTML5
  • 11. © GameDuell 2013 Let's Start Building a Cross Platform Game!
  • 13. © GameDuell 2013 Considerations  Security First  Thin Client  Fat Server  Separate Game and Transport Protocol
  • 14. © GameDuell 2013 Security First  Design your software with security in mind  Don't expose any of the internals  Don't base your security on obfuscation  Don't leave any debug flags live!  Don't trust the clients
  • 15. © GameDuell 2013 Hacks - Spoofing Pretend being somebody else
  • 16. © GameDuell 2013 Hacks – Faking Data Client lies and server doesn't validate the input
  • 17. © GameDuell 2013 Fat Server  Add all game logic in the server  Contains any logic shared among clients  Take care of timeouts  Do a handshake and mark your clients  Again: don't trust your clients!
  • 18. © GameDuell 2013 How do we build a Game Sever?  Java based Game Server  Drools (rule engine) defining the game logic  More readable  Speed and Scalability  Declarative programming
  • 19. © GameDuell 2013 Protocols  Separate Game protocol from Transport protocol  Provide everything the client needs to show the action (no state needed on clients)  Use some serializable format i.e. JSON  Think about rescue pills
  • 20. © GameDuell 2013 What About the Game Client?
  • 22. © GameDuell 2013 KISS  Keep It Simple, Stupid!  Absolutely reactive  No main loop  Separate control from view  No game logic
  • 23. © GameDuell 2013 Benefits of Layers  Each layer is more concise  The rendering can be changed without affecting the game  The game is defined only in the controllers
  • 24. © GameDuell 2013 Benefits of Being Reactive  No loops  More efficient  Use RequestAnimationFrame  Simplified logic
  • 25. © GameDuell 2013 Which Technology Can We Use?
  • 26. © GameDuell 2013 WRITE ONCE Use anywhere
  • 27. © GameDuell 2013 What is HTML 5?  Set of APIs  Standardized by W3C  5th revision of the standard (HTML)  Still in progress  Different key players (with different interests)  Buzzword since “Thoughts on Flash”
  • 28. © GameDuell 2013 A Standard, However...  Not implemented completely everywhere  Different quality of implementation in each browser  Behavior is too many times browser specific
  • 29. © GameDuell 2013 This Leads to the Following Challenges  Avoid Polyfills  Deliver same (or the closest possible) experience on all devices/platforms  Keep performance up  Manage different device sizes
  • 30. © GameDuell 2013 Compared to Native Apps  Cross Platform by definition  Less specialization needed (JS + CSS)  Easy integration in existing platforms  No need for Stores, you are directly live
  • 31. © GameDuell 2013 Compared to Native Apps  Cross Platform by definition  Less specialization needed (JS + CSS)  Easy integration in existing platforms  No need for Stores, you are directly live  Less control  Far away from the hardware  No Integration with the device
  • 32. © GameDuell 2013 Key Technologies in Hand  New HTML Markup  CSS3  Geolocalization  Canvas & WebGL  WebStorage  WebSockets  Video
  • 34. © GameDuell 2013 WebSockets  Client → Server communication  Enable Server → Client communication  Avoids polling from client  Old Browsers don't support it  Less load on servers  More performant
  • 35. © GameDuell 2013 Alternative: Long Polling  Client → Server communication  Pseudo Server → Client communication  Does long lasting polls to the server  More stress on both client and server
  • 36. © GameDuell 2013 CSS 3 Transformations Available methods are: rotate, skew-x skew-y, scale and translate Or all at once with matrix: • Take all 4 coordinates of a div • Multiply each one with the matrix • The result of each operation is the new coordinate
  • 37. © GameDuell 2013 A Few Months Later...
  • 38. © GameDuell 2013 HTML5 version at GameDuell available for mobile devices  Full sync with desktop accounts  Cross-platform play with desktop users
  • 40. © GameDuell 2013 Stay in Touch: inside.gameduell.de www.techtalk-berlin.de Further Information