Mouse events are great for games – and if you’ve followed the ipad accelerometer tutorial you’ve even learned how to use the accelerometer in your games.  But in many games you may want to access the arrow keys or take text input from the gamers.  Fortunately Processing.js makes it easy to get the keyboard input onto the html5 canvas. Similar to the mousedown function there is a keyboard event function that is called whenever a key is pressed: void keyPressed(){ println( keyCode ); if(keyCode == LEFT){ //Do something } if(keyCode == RIGHT){ } if(keyCode...
Read more...
If you’ve gone through the lessons might be asking yourself – where does the ipad accelerometer data come from? The answer is pretty simple.  If you have javascript experience, then you will know that the window has listeners for different events, such as onload  and onmousedown.  The mobile browser adds other event listeners like the ontouch events. It also adds one special one called ondevicemotion.  In iOS, this event has acceleration variables.  To make these work in processing we simply create an ipad object and update its accelerationX, accelerationY,...
Read more...
This is our first post – and as such deserves a little bit of an introduction.  This website is going provide support and supplement material found in the How to Program Games iOS application.  The application merges a text book wtih a programming environment.  Allowing you to develop programs right on the pages of the lessons.  This greatly enhances the learning experience so you’ll understand concepts faster and better.  Right now the application is in it’s final stages of editing before being submitted to the app store.  The programming side of development is...
Read more...