Graphics and Presentation
The client was keen on supporting Internet Explorer 7, if possible, but deemed supporting the iPad to be more important. I looked around and stumbled upon a plugin called explorercanvas, which allowed the usage of the canvas element within older versions of IE. To my surprise, I dropped the script in and everything worked properly.
After some trial and error, I ended up relying on jQuery to attach the events for player control. Each of the browsers handle events differently and expose different values for mouse coordinates. jQuery exposes the same values no matter which browser you are running, so that you can be sure of whether will be receiving an x and y value in reference to the entire window or just the canvas’ bounds. Capturing key presses are also slightly different among browsers, so jQuery can help with that as well.
Touch controls are an entirely different monster. At the moment, jQuery does not support binding to touch events. Luckily, at this point most mobile browsers support the same spec for adding event listeners to touch events for touchstart, touchend, touchmove and touchcancel.