SlideShare a Scribd company logo
1 of 48
Download to read offline
© GameDuell 2014 |
Confidential
Developing Games in HTML5 and Java
GameLab BCN – 25 June 2014
Josep Prat – HTML5 Architect & Java Lead Developer - @jlprat
© GameDuell 2014 |
Confidential
Table of contents. What to expect?
1. What is Cross Platform?
2. Building Cross Platform Games
3. Building the HTML 5 Client
4. Q & A
© GameDuell 2013 |
Confidential
1. What is Cross Platform?
© GameDuell 2013 |
Confidential
Play the same game across several platforms
© GameDuell 2014 |
Confidential
Building a Cross Platform Game!
You are the new architect of GameDuell and
the management has a new task for you:
© GameDuell 2014 |
Confidential
What is Cross Platform?
© GameDuell 2014 |
Confidential
What is Cross Platform?
Deliver the best experience to all players
© GameDuell 2013 |
Confidential
Challenge Accepted!
Let’s introduce the GameDuell Team
© GameDuell 2013
Bringing people together to have a good time with games -
Wherever, whenever!
© GameDuell 2014 |
Confidential
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 2014 |
Confidential
Team Structure

Scrum teams

Product based

Specialists in many languages
© GameDuell 2013 |
Confidential
Architecture of the Backend
2. Building Cross Platform Games
© GameDuell 2014 |
Confidential
Architecture Overview
© GameDuell 2013 |
Confidential
Let's Start Building a Cross Platform Game!
© GameDuell 2014 |
Confidential
Security First
Design your software with security in mind
© GameDuell 2014 |
Confidential
Security First
Don't expose your internals
© GameDuell 2014 |
Confidential
Don't base your security on obfuscation
© GameDuell 2014 |
Confidential
Security First
© GameDuell 2014 |
Confidential
Security First
DO
NOT
TRUST
THE
CLIENTS
© GameDuell 2014 |
Confidential
Fat Server
GAME
LOGIC
TIMEOUTS
MARK
CLIENTS
COMMON
LOGIC
© GameDuell 2014 |
Confidential
Protocols

Game Protocol != Transport Protocol

Self Contained Messages

Human Readable

“Rescue Pills”
© GameDuell 2013 |
Confidential
Hacks - Spoofing
© GameDuell 2013 |
Confidential
Hacks – Faking Data
© GameDuell 2013 |
Confidential
Cool... But how do you code this?
© GameDuell 2014 |
Confidential
JBoss Drools

Developed by JBoss

Declarative, rule based, coding environment

Direct integration with Java

Readable behavior

Enables declarative programming

Models a state machine
© GameDuell 2014 |
Confidential
Follow the State Machine
© GameDuell 2014 |
Confidential
Hello World!
rule "Hello World Rule"
when
Player()
Game()
then
System.out.println("Hello World!");
end
© GameDuell 2014 |
Confidential
Real World Example
rule "Apply 10% discount to orders over US$ 100,00"
when
$order : Order()
$total : Number( doubleValue > 100 )
from accumulate( OrderItem( order == $order,
$value : value ), sum( $value ) )
then
# apply discount to $order
end
© GameDuell 2013 |
Confidential
The fun part of the game
3. Building the HTML 5 Client
© GameDuell 2014 |
Confidential
Architecture Overview
© GameDuell 2014 |
Confidential
KISS

Keep It Simple, Stupid!

Absolutely reactive

No main loop

Separate control from view

No game logic
© GameDuell 2014 |
Confidential
Let's get started!
© GameDuell 2014 |
Confidential
WRITE ONCE
Use anywhere
© GameDuell 2013 |
Confidential
But... What exactly is HTML5?
© GameDuell 2014 |
Confidential
What is HTML 5?

Set of APIs

Standardized by W3C

5th revision of the standard (HTML)

Still in progress

Buzzword since “Thoughts on Flash”
© GameDuell 2014 |
Confidential
A Standard, However...
© GameDuell 2014 |
Confidential
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 2014 |
Confidential
Compared to Native Apps
 Less control
 Far away from the hardware
 No Integration with the device
© GameDuell 2013 |
Confidential
Hey, you didn't explain what is it yet!!
© GameDuell 2014 |
Confidential
Key Technologies under HTML5

New HTML Markup

CSS3

Geolocation

Canvas & WebGL

WebStorage

WebSockets

Video
© GameDuell 2014 |
Confidential
WebSockets – Talking to the Server
© GameDuell 2014 |
Confidential
How Can We Draw the Game?
© GameDuell 2014 |
Confidential
New Style - CSS3
#example.red.box {
background-color: red;
width: 200px;
height: 200px;
}
.rotate {
-webkit-transform: perspective( 400px ) rotateY( 30deg );
-webkit-transition: all 3s;
}
<!-- ....................... -->
<div id=”example” class=”red box”></div>
<!-- …................... -->
document.getElementById('example').classList.toggle('rotate')
© GameDuell 2014 |
Confidential
Drawing in the Browser
<canvas id="myCanvas" width="600" height="400"></canvas>
<script>
var canvas = document.getElementById('myCanvas');
var ctx = canvas.getContext('2d');
var centerX = canvas.width / 2;
var centerY = canvas.height / 2;
var r = 90;
ctx.beginPath();
ctx.arc(centerX, centerY, r, 0, 2 * Math.PI);
ctx.fillStyle = 'red';
ctx.fill();
ctx.lineWidth = 8;
ctx.strokeStyle = 'blue';
ctx.stroke();
</script>
© GameDuell 2013 |
Confidential
After some development time...
© GameDuell 2014 |
Confidential
Live Deploy!
© GameDuell 2013 |
Confidential
Q & A
© GameDuell 2013 |
Confidential
Stay in Touch:
inside.gameduell.de
www.techtalk-berlin.de
Further Information

More Related Content

Similar to GameLab - Developing Crossplatform Games in HTML5 and Java

Tool review
Tool reviewTool review
Tool reviewwm175309
 
20210916 mule soft_meetup_nz_online_uploadedversion
20210916 mule soft_meetup_nz_online_uploadedversion20210916 mule soft_meetup_nz_online_uploadedversion
20210916 mule soft_meetup_nz_online_uploadedversionMizuhoHoshino
 
Hybrid Mobile App Development Frameworks 2016
Hybrid Mobile App Development Frameworks 2016Hybrid Mobile App Development Frameworks 2016
Hybrid Mobile App Development Frameworks 2016PixelCrayons
 
Getting started with mobile application development
Getting started with mobile application developmentGetting started with mobile application development
Getting started with mobile application developmentColdFusionConference
 
Mobile Websites und (Web)-Apps mit jQuery Mobile
Mobile Websites und (Web)-Apps mit jQuery MobileMobile Websites und (Web)-Apps mit jQuery Mobile
Mobile Websites und (Web)-Apps mit jQuery MobilePeter Hecker
 
Introduction to Marketing Cloud UI, Adobe Summit 2014
Introduction to Marketing Cloud UI, Adobe Summit 2014Introduction to Marketing Cloud UI, Adobe Summit 2014
Introduction to Marketing Cloud UI, Adobe Summit 2014Damien Antipa
 
BethClip Investors Pitch Deck (widescreen)
BethClip Investors Pitch Deck (widescreen)BethClip Investors Pitch Deck (widescreen)
BethClip Investors Pitch Deck (widescreen)Rashid Aliyev
 
Gdsc lbce offline accelerator meet -1
Gdsc lbce offline accelerator meet -1Gdsc lbce offline accelerator meet -1
Gdsc lbce offline accelerator meet -1Diksha71
 
Zapbuild Portfolio
Zapbuild PortfolioZapbuild Portfolio
Zapbuild PortfolioZapbuild
 
Private cloud without the hassle
Private cloud without the hasslePrivate cloud without the hassle
Private cloud without the hassleColin J. O'Sullivan
 
hirecloud.pro: cloud based platform to conduct technical interviews
hirecloud.pro: cloud based platform to conduct technical interviewshirecloud.pro: cloud based platform to conduct technical interviews
hirecloud.pro: cloud based platform to conduct technical interviewsUgendreshwar Kudupudi
 
Xplenty hadoop ukug
Xplenty hadoop ukugXplenty hadoop ukug
Xplenty hadoop ukughuguk
 
Journey to The Cloud-Native Enterprise
Journey to The Cloud-Native Enterprise Journey to The Cloud-Native Enterprise
Journey to The Cloud-Native Enterprise dektlong
 
Creating Compelling Mobile User Experiences
Creating Compelling Mobile User ExperiencesCreating Compelling Mobile User Experiences
Creating Compelling Mobile User ExperiencesChris Griffith
 
Odoo Practice By Surekha Technologies
Odoo Practice By Surekha TechnologiesOdoo Practice By Surekha Technologies
Odoo Practice By Surekha TechnologiesSurekha Technologies
 
Spring one 2012 Groovy as a weapon of maas PaaSification
Spring one 2012 Groovy as a weapon of maas PaaSificationSpring one 2012 Groovy as a weapon of maas PaaSification
Spring one 2012 Groovy as a weapon of maas PaaSificationNenad Bogojevic
 
Google cloud Study Jam 2023.pptx
Google cloud Study Jam 2023.pptxGoogle cloud Study Jam 2023.pptx
Google cloud Study Jam 2023.pptxGDSCNiT
 
Sydney Identity Summit: Addressing the New Threat Landscape with Continuous S...
Sydney Identity Summit: Addressing the New Threat Landscape with Continuous S...Sydney Identity Summit: Addressing the New Threat Landscape with Continuous S...
Sydney Identity Summit: Addressing the New Threat Landscape with Continuous S...ForgeRock
 

Similar to GameLab - Developing Crossplatform Games in HTML5 and Java (20)

Tool review
Tool reviewTool review
Tool review
 
20210916 mule soft_meetup_nz_online_uploadedversion
20210916 mule soft_meetup_nz_online_uploadedversion20210916 mule soft_meetup_nz_online_uploadedversion
20210916 mule soft_meetup_nz_online_uploadedversion
 
Hybrid Mobile App Development Frameworks 2016
Hybrid Mobile App Development Frameworks 2016Hybrid Mobile App Development Frameworks 2016
Hybrid Mobile App Development Frameworks 2016
 
Getting started with mobile application development
Getting started with mobile application developmentGetting started with mobile application development
Getting started with mobile application development
 
Mobile Websites und (Web)-Apps mit jQuery Mobile
Mobile Websites und (Web)-Apps mit jQuery MobileMobile Websites und (Web)-Apps mit jQuery Mobile
Mobile Websites und (Web)-Apps mit jQuery Mobile
 
Introduction to Marketing Cloud UI, Adobe Summit 2014
Introduction to Marketing Cloud UI, Adobe Summit 2014Introduction to Marketing Cloud UI, Adobe Summit 2014
Introduction to Marketing Cloud UI, Adobe Summit 2014
 
BethClip Investors Pitch Deck (widescreen)
BethClip Investors Pitch Deck (widescreen)BethClip Investors Pitch Deck (widescreen)
BethClip Investors Pitch Deck (widescreen)
 
Gdsc lbce offline accelerator meet -1
Gdsc lbce offline accelerator meet -1Gdsc lbce offline accelerator meet -1
Gdsc lbce offline accelerator meet -1
 
Zapbuild Portfolio
Zapbuild PortfolioZapbuild Portfolio
Zapbuild Portfolio
 
Private cloud without the hassle
Private cloud without the hasslePrivate cloud without the hassle
Private cloud without the hassle
 
hirecloud.pro: cloud based platform to conduct technical interviews
hirecloud.pro: cloud based platform to conduct technical interviewshirecloud.pro: cloud based platform to conduct technical interviews
hirecloud.pro: cloud based platform to conduct technical interviews
 
Xplenty hadoop ukug
Xplenty hadoop ukugXplenty hadoop ukug
Xplenty hadoop ukug
 
Journey to The Cloud-Native Enterprise
Journey to The Cloud-Native Enterprise Journey to The Cloud-Native Enterprise
Journey to The Cloud-Native Enterprise
 
Creating Compelling Mobile User Experiences
Creating Compelling Mobile User ExperiencesCreating Compelling Mobile User Experiences
Creating Compelling Mobile User Experiences
 
Odoo Practice By Surekha Technologies
Odoo Practice By Surekha TechnologiesOdoo Practice By Surekha Technologies
Odoo Practice By Surekha Technologies
 
Go Revel Gooo...
Go Revel Gooo...Go Revel Gooo...
Go Revel Gooo...
 
Spring one 2012 Groovy as a weapon of maas PaaSification
Spring one 2012 Groovy as a weapon of maas PaaSificationSpring one 2012 Groovy as a weapon of maas PaaSification
Spring one 2012 Groovy as a weapon of maas PaaSification
 
Google cloud Study Jam 2023.pptx
Google cloud Study Jam 2023.pptxGoogle cloud Study Jam 2023.pptx
Google cloud Study Jam 2023.pptx
 
Sydney Identity Summit: Addressing the New Threat Landscape with Continuous S...
Sydney Identity Summit: Addressing the New Threat Landscape with Continuous S...Sydney Identity Summit: Addressing the New Threat Landscape with Continuous S...
Sydney Identity Summit: Addressing the New Threat Landscape with Continuous S...
 
Mobile Development: Case Studies @ WhiteHedge
Mobile Development: Case Studies @ WhiteHedgeMobile Development: Case Studies @ WhiteHedge
Mobile Development: Case Studies @ WhiteHedge
 

Recently uploaded

Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 

Recently uploaded (20)

Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 

GameLab - Developing Crossplatform Games in HTML5 and Java

  • 1. © GameDuell 2014 | Confidential Developing Games in HTML5 and Java GameLab BCN – 25 June 2014 Josep Prat – HTML5 Architect & Java Lead Developer - @jlprat
  • 2. © GameDuell 2014 | Confidential Table of contents. What to expect? 1. What is Cross Platform? 2. Building Cross Platform Games 3. Building the HTML 5 Client 4. Q & A
  • 3. © GameDuell 2013 | Confidential 1. What is Cross Platform?
  • 4. © GameDuell 2013 | Confidential Play the same game across several platforms
  • 5. © GameDuell 2014 | Confidential Building a Cross Platform Game! You are the new architect of GameDuell and the management has a new task for you:
  • 6. © GameDuell 2014 | Confidential What is Cross Platform?
  • 7. © GameDuell 2014 | Confidential What is Cross Platform? Deliver the best experience to all players
  • 8. © GameDuell 2013 | Confidential Challenge Accepted! Let’s introduce the GameDuell Team
  • 9. © GameDuell 2013 Bringing people together to have a good time with games - Wherever, whenever!
  • 10. © GameDuell 2014 | Confidential 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
  • 11. © GameDuell 2014 | Confidential Team Structure  Scrum teams  Product based  Specialists in many languages
  • 12. © GameDuell 2013 | Confidential Architecture of the Backend 2. Building Cross Platform Games
  • 13. © GameDuell 2014 | Confidential Architecture Overview
  • 14. © GameDuell 2013 | Confidential Let's Start Building a Cross Platform Game!
  • 15. © GameDuell 2014 | Confidential Security First Design your software with security in mind
  • 16. © GameDuell 2014 | Confidential Security First Don't expose your internals
  • 17. © GameDuell 2014 | Confidential Don't base your security on obfuscation
  • 18. © GameDuell 2014 | Confidential Security First
  • 19. © GameDuell 2014 | Confidential Security First DO NOT TRUST THE CLIENTS
  • 20. © GameDuell 2014 | Confidential Fat Server GAME LOGIC TIMEOUTS MARK CLIENTS COMMON LOGIC
  • 21. © GameDuell 2014 | Confidential Protocols  Game Protocol != Transport Protocol  Self Contained Messages  Human Readable  “Rescue Pills”
  • 22. © GameDuell 2013 | Confidential Hacks - Spoofing
  • 23. © GameDuell 2013 | Confidential Hacks – Faking Data
  • 24. © GameDuell 2013 | Confidential Cool... But how do you code this?
  • 25. © GameDuell 2014 | Confidential JBoss Drools  Developed by JBoss  Declarative, rule based, coding environment  Direct integration with Java  Readable behavior  Enables declarative programming  Models a state machine
  • 26. © GameDuell 2014 | Confidential Follow the State Machine
  • 27. © GameDuell 2014 | Confidential Hello World! rule "Hello World Rule" when Player() Game() then System.out.println("Hello World!"); end
  • 28. © GameDuell 2014 | Confidential Real World Example rule "Apply 10% discount to orders over US$ 100,00" when $order : Order() $total : Number( doubleValue > 100 ) from accumulate( OrderItem( order == $order, $value : value ), sum( $value ) ) then # apply discount to $order end
  • 29. © GameDuell 2013 | Confidential The fun part of the game 3. Building the HTML 5 Client
  • 30. © GameDuell 2014 | Confidential Architecture Overview
  • 31. © GameDuell 2014 | Confidential KISS  Keep It Simple, Stupid!  Absolutely reactive  No main loop  Separate control from view  No game logic
  • 32. © GameDuell 2014 | Confidential Let's get started!
  • 33. © GameDuell 2014 | Confidential WRITE ONCE Use anywhere
  • 34. © GameDuell 2013 | Confidential But... What exactly is HTML5?
  • 35. © GameDuell 2014 | Confidential What is HTML 5?  Set of APIs  Standardized by W3C  5th revision of the standard (HTML)  Still in progress  Buzzword since “Thoughts on Flash”
  • 36. © GameDuell 2014 | Confidential A Standard, However...
  • 37. © GameDuell 2014 | Confidential 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
  • 38. © GameDuell 2014 | Confidential Compared to Native Apps  Less control  Far away from the hardware  No Integration with the device
  • 39. © GameDuell 2013 | Confidential Hey, you didn't explain what is it yet!!
  • 40. © GameDuell 2014 | Confidential Key Technologies under HTML5  New HTML Markup  CSS3  Geolocation  Canvas & WebGL  WebStorage  WebSockets  Video
  • 41. © GameDuell 2014 | Confidential WebSockets – Talking to the Server
  • 42. © GameDuell 2014 | Confidential How Can We Draw the Game?
  • 43. © GameDuell 2014 | Confidential New Style - CSS3 #example.red.box { background-color: red; width: 200px; height: 200px; } .rotate { -webkit-transform: perspective( 400px ) rotateY( 30deg ); -webkit-transition: all 3s; } <!-- ....................... --> <div id=”example” class=”red box”></div> <!-- …................... --> document.getElementById('example').classList.toggle('rotate')
  • 44. © GameDuell 2014 | Confidential Drawing in the Browser <canvas id="myCanvas" width="600" height="400"></canvas> <script> var canvas = document.getElementById('myCanvas'); var ctx = canvas.getContext('2d'); var centerX = canvas.width / 2; var centerY = canvas.height / 2; var r = 90; ctx.beginPath(); ctx.arc(centerX, centerY, r, 0, 2 * Math.PI); ctx.fillStyle = 'red'; ctx.fill(); ctx.lineWidth = 8; ctx.strokeStyle = 'blue'; ctx.stroke(); </script>
  • 45. © GameDuell 2013 | Confidential After some development time...
  • 46. © GameDuell 2014 | Confidential Live Deploy!
  • 47. © GameDuell 2013 | Confidential Q & A
  • 48. © GameDuell 2013 | Confidential Stay in Touch: inside.gameduell.de www.techtalk-berlin.de Further Information