# HTML5 technology
## Platforms
#### Desktop
The officially supported desktop browsers are latest Chrome, Firefox and IE. F.LF is tested in each of these browsers before release. Legacy browser versions will not be supported. Under the current state of the art, Chrome gives the best performance, with IE10 the second, and Firefox sometimes lag.
#### Mobile
The officially supported platform is Galaxy S3+Chrome. This is a baseline, and lower end devices will not be supported.
#### Flash
If possible, HTML5 features should be used. Flash fallback is not necessary, and should be avoided at all costs.
### Distribution
F.LF will be distributed online and offline.
#### online
When played online, F.LF should loads instantly following a lazy loading scheme, by loading only what is needed and until it is needed.
#### offline
F.LF should be able to run as a standalone application offline, without the need of a local HTTP server.
## Graphics
#### image rendering
PNG with transparency is well supported by all browsers. Image rotation, scaling and mirror is also well supported **A**cross **A**ll **M**ajor **B**rowsers (Chrome, Firefox, IE) (AAMB).
#### graphics engine
F.LF supports two rendering backend, DOM (css transformation) and canvas. Canvas is used by default.
## Sound
#### playback
Flash actually has a very good sound playback performance and functionality. HTML5 sound works AAMB, but does not support multi-burst (or whatever you call it, the same sound being played overlapped at different times). The quirk is, Firefox refuses to support patented MP3 and IE refuses to support free OGG. The work around is:
1. create multiple objects of each sound (one object multi instance does not work, but multi object multi instance does)
2. have 2 formats (MP3 and OGG) of each sound
#### sound sprites
HTML5 audio supports seeking to arbitrary position, thereby supports sound spriting, which is a technique that combines many audio segments into one long audio track.
## Keyboard & Gamepad
#### keyboard
Keyboard input in browsers is good enough for gaming. Key conflict or key drop is not occuring too often. However some small number of keys have different keycode AAMB. Luckily, function keys F1~F12 and combinations (like Ctrl+F) can be overridden.
#### gamepad
The HTML5 gamepad API is in draft. In the future F.LF may be able to support gamepad.
#### on-screen gamepad
F.LF supports touchscreen gameplay by an overlay on-screen gamepad.
## Local storage
Local storage works AAMB in HTTP. Only in IE, local storage does not work locally (`C:\`) because of security convention. That's why cookie is still needed to emulate local storage.
## Networking
### JSON loading
JSON loading works AAMB in HTTP in same origin, but not locally. The only way to load data files locally is to load files as `.js`, which magically works across origin. Though javascript loading is less secure, this will be the only way until Cross Origin JSON arrived.
### Web socket
Web socket support is good AAMB. It even works on mobile browsers. F.LF now supports multiplayer via web socket.
### Web RTC
Web RTC support is still preliminary, which [PeerJS](http://peerjs.com/) is a very good support library. F.LF now has experimental support of multiplayer via PeerJS.