You've heard of Responsive Web Design right? Well Nitch is designed as a responsive web game library. The idea is simple, create a game that can be played on any device you like. It offers
- Simple DOM manipulation
- Simple events, such as on, off, fire and a custom cross-device "tap" event
- Simple object-to-object bounding-box collision detector (AABB)
- A simple game loop based on a cross browser version of requestAnimationFrame
- A state machine to track events through your game based on Jake Gordon's Javascript Finite State Machine
- A progress loader system
- XHR requests
- Device and media query detection to deliver the right css and app cache manifest for your device
- An abstracted stats system that captures stats even offline (and sends them when the user comes back online)
- Better Math.Random based on the Fisher–Yates shuffle
- Some handy utilities like firing a method only once and replacing default values in an object with your own
- Oh yeah, and a simple modal
Please note, it's very early days so not everything is guaranteed to work correctly bug reports and pull requests welcome.
Our aim is to reasonably support as many devices and browsers. At the moment we're concentrating on support for the following
- iOS 4.2.1+
- Firefox 5+
- Chrome (latest version)
- Safari 5+
In future we'll look at supporting
- Android 2.3.3+ based on Google Play Stats
- IE (Desktop and Xbox)
- Connected TVs and Consoles (PS3, Wii U)
- All widgets (e.g. progress loader system and modal) will be supported with WAI-ARIA.
Nitch is released under the MIT licence.