After all my TCP troubles I decided to put aside my pride and the coolness of a well-designed TCP data stream, I decided to go with UDP, which is admittedly obviously better suited to my uses. For example, I don’t need to specify how much data to read from a stream, as one datagram will hold everything I need: no need for paranoia about the data stream losing sync! It’s working perfectly as of last night.
Today I had some time between lectures so I generalised my accelerometer-input to work for touches as well, so dragging a finger across the iPod’s screen is sent as well as 60 datagrams/second of accelerometer data.
I’m reaching the stage where I’m starting to refactor code now, and some of it is starting to look pretty neat. As I go along, I keep asking myself how I can keep concerns separate and refactor classes accordingly.
Interim report on Thursday so that’s my next objective!
Until the next post, enjoy L’arc~en~ciel’s Blurry Eyes from 1994!
