This document provides 10 tips for developing HTML5 games for both desktop and mobile platforms. Some key points covered include using the <canvas> tag for games, touch events for mobile, dirty rectangles to improve framerate on mobile, matching button sizes to fingers, using localStorage to save game data, and tools for debugging mobile games. More details on these techniques and HTML5 game development can be found at the listed web addresses.
5. Tip 1 Desktop & MobileChoose <Canvas> for gamesCanvas+ Widely supported + No compatibility problemsCSS + nice effects via CSS 3D, iphone only - Compatibility problems on CSS - Crash on iOS - Flickering on Android
6. Tip 2 Use <audio> tag for Background MusicAudio support is very limited
7. Mobile: only one Music can be played at the same timeDesktop & Mobile
8. Tip 3 Use touch events for MobileMouse events works different on Mobile
16. Tip 7Watch out for Memory limitations on iOS10MB max for one browser tab
17. Do not create large amounts of multiple Canvases. Canvas is more memory hungry than image.
18. Remove the image from memory by resetting the attribute "src":img.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQIHWNgAAIAAAUAAY27m/MAAAAASUVORK5CYII=";Mobile
19. Tip 8 Use localStorage for saving dataLocalStorageis widely supported and better than cookies
23. Tip 10 Tools for mobile debugging and tuningUse aCatLog (android market app) or adblogcat (Android Debug Bridge) to read the browser log on Android
24. Bookmarklet(javascript: URI) is usefuljavascript:Game.PlayerSpeed=prompt("Player Speed:")For desktop: use chrome to debug and traceMobile
25. Getting startedDIVE INTO HTML5: http://diveintohtml5.org/Safari Reference Library: http://developer.apple.com/library/safari/navigation/https://developer.mozilla.org/en/HTML/HTML5http://m.agame.com/