I was — at most — a couple of minutes late for Andrea Trento’s seminar on building Flash games for mobile devices (you didn’t think building them for Mac and Windows would have required a seminar, did you?) but he’d already cracked the whip and gotten past the first screen by the time I slipped into my seat.
He laid out some basics of designing games for multiple mobile device platforms. Use a minimum number of colors; each color requires 20-30 bytes of memory, which adds up quickly on low-memory devices. I felt like I’d slipped into a time-warp to 1996, when I was writing my book on Shockwave development. Avoid gradients and alphas; vector gradients require a fair amount of processor power to draw and redraw, and alpha channel compositing is even more intensive. Use fills, avoid outlines; Andrea didn’t explain why specifically, but this is actually a processor savings that goes back to the early days of imagesetters. A stroke is a very efficient method of storing shape data, but drawing routines are essentially fill routines, so for a stroke to be drawn, the computer must first create an outline for the shape represented by the stroke, then fill that. Pre-converting to a shape saves processor time, but makes it harder to edit.
Andrea had a list of mobile device screen sizes that are common, but whipped past it before I got more than one-and-a-half down.
He noted that there are differences in the ActionScript support for mobile phones.
Andrea said variables in ActionScript have 10-15 bytes of overhead. He said to avoid long variable names, presumably because AS is stored in a less-compressed format than other languages.
Something I wasn’t aware of was the use of i-mode simulators, for mobile phone emulation (I haven’t done any mobile development myself).
He’s planning to post material on his BeMobile site.
In follow-up questions, someone asked about time frames for game development and cross-porting. Andrea used an example of a game that had taken two days to port from one device to another, after three weeks of development, and said that a similar game in Java would have taken three months. Another question on frame rates led to a recommendation of 15fps for mobile devices. He said that to the best of his knowledge, there were no plans for a Palm OS version of the Flash Lite Player (so much for my Treo) and he recommended MIDI sound.