Donald J. Patterson

“Games, Sensors and Media” is Live!

Games, Sensors and Media Icon

This has been the most fun online course that I’ve put together yet.  In 40 lectures, 4 projects and 1 exam we cover everything from geofences and device orientation sensors, to playing sound and making particle emitters, to running the physics engine and interfacing with Game Center.  This is the fourth course in an online series of 6 courses that Sam Kaufman and I are developing with UCI Distance Learning for Coursera on iOS User Interface design.  Once again we got an awesome URL for it:

Wireframe for a sensor app math Wireframe for a sensor app


The first thing we explore in this class is “sensors” in the iOS platform.   We look at location of course, but in particular we describe how to do reverse geocoding (which is the process of looking up an address based on a latitude and longitude pair) and geofencing (which is setting up triggers for when people move in and out of location regions with their device).  Then we program the accelerometers on the iOS platform.   We describe how to use them to figure out which way is up and then how to augment them with the magnetometer (compass) and gyroscopes in order to get a complete robust orientation of the device in physical space.   Finally we show students a secret hack that gives them access to the light sensor on the platform.   A combination of all these sensors can give an app a pretty rich understanding of the context in which they are embedded.


The second part of the course is quick.  It’s about how to play audio on an iOS device.  Even though audio is very sophisticated in the Apple ecosystem – after all it is commonly used in professional recordings and concerts – for the purposes of what we think our students will be doing with it, we kept it simple: We show how to play sound effects and longer media like mp3 songs.

Block bouncing off a wallAsteroid Hitting a Spaceship


Then in the final section we teach all the SpriteKit games related things we could jam in there:

  • We showed how to set up a SpriteKit game with multiple scenes
  • We showed how to place, move and manipulate sprites
  • We showed how to set up the physics engine
  • We showed how to use the particle emitter to make special effects and explosions
  • We showed how to efficiently simulate collisions and detect contacts
  • We showed how to animate a sequence of still images

Finally we show how to integrate in Game Center so that you can have leaderboards and achievements.   This last part of the course uses as a running example a version of BreakOut that I affectionately call “Deep Space Jail Break”.  My family is sick of play testing it.

Because we live in an ever changing world, I am also personally hosting the discussion for this course at:  This is a peer support channel in case people get stuck.  Here is how to take it for free:


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.