How do you make an original GameBoy adventure available on mobile and desktop? In this session Bert explains how he made it happen using just HTML5 and Javascript, and which challenges he encountered. Who needs a girlfriend when there’s JavaScript?
35. ‣ Drawing on canvas is expensive
‣ Use more then one canvas
‣ Max size of canvas on mobile Safari (3MP or 5MP)
‣ Buffer by drawing off screen
‣ Cache rendered screens for later use
‣ More tips:
http://www.html5rocks.com/en/tutorials/canvas/performance/
http://tinyurl.com/ioslimit
Research results
38. Current setup
var Game = {
!
init : function (){
// init game
},
start : function (){
// start game
}
}
!
Game.init();
Game.start();
(function() {
!
function Game(){
// init game
};
Game.prototype.start = (function() {
// start game
});
window.Game = Game;
})();
!
var game = new Game();
game.start();
New setup
51. ‣ Build a new and better map editor
‣ Redraw more maps
‣ Retrieve missing data
‣ Find out how the battle system works
‣ Learn more about HTML audio
‣ …
Next steps
!
‣ Don’t get sued by Nintendo®!