When we decided to publish a new game, we knew we had to find a way to leave plug-in based clients behind. So for "Topia Island", we created a client based on HTML5. This presentation shows the problems one might encounter but above all the many advantages HTML5 has.
3. Bytro Labs
Founded in 2009
Focus: browser based online games
Development and distribution
15 employees
2 mio. registered users
Completely independent
5. Goals:
State of the art social browser game
High quality graphics
Massive number of objects rendered in real-time
Graphical effects
Animations
Object Highlighting
(Semi-) transparent Masking
Low latency client server
communication
Easy access, good outreach
7. What is HTML 5
Collection of standards, extensions and technologies
New tags, JavaScript APIs and styling options
Plug-in less
Increasing hardware acceleration support (for graphics)
Standard(s) not finalized – “Living Standard”
8. HTML 5 Support
caniuse.com
browser-statistik.de
- For older IE versions: Chrome Frame 25.09.2012 – Last 30 Days
9. HTML 5 in Topia Island
Canvas 2D
Web Sockets
CSS3
Web Storage
Planned
Audio
Web Worker
11. Client Server Architecture
JavaScript • Visualization
• User Interaction
Client • Data Structures
client.js
index.html • Simulation Logic
Web Socket Protocol: JSON
• Data Structures
Web Server Game Server • Game Logic
Java
Cassandra
DB
12. Developing with HTML and JavaScript
Client Server Code
Keep Java and JavaScript data structures and code in sync
Google Web Toolkit (GWT) – Everything in Java; JS cross-compiled
note.js – Everything in JavaScript
Strongly-Typed JavaScript (st-js) – Simple Java to JavaScript cross-compiler
JavaScript Code Structuring and Management
Use supporting tools and libraries, e.g. require.js, Google Closure
JavaScript Tools Support
Syntax highlighting and autocompleting can break easily
Disciplined development (e.g. use Constructor / Prototype syntax,
JSDoc type hints /** @type {string} */ var example; )
13. Developing with HTML and JavaScript
Backwards compatibility and Cross-Browser support
Cross Browser libraries (e.g. jQuery)
Polyfills
HTML GUI Development
Missing WYSIWYG editor
Code generation problem
Application Suitability
e.g. Multi-layer mouse listener problem
Future Development:
Editors for HTML5 (e.g. Adobe Edge)
HTML5 Libraries (e.g. CreateJS)
22. Performance
HTML5 Canvas 2D performance comparable with Flash and Java
performance
HW acceleration can not be presumed
Comparable Flash Game Topia Island
~13 FPS ~18 FPS
23. Conclusion
Browser Game Development with HTML5
Chances
Browser Plug-in-less
Increasing support
High quality, high performance graphics
Pitfalls
Large scale JavaScript undersupported
Disciplined development required
Different competing HTML5 technologies