2012-09-01

Super Foul Egg Updates

Getting updates into the App Store is a far simpler process than getting the first version ready, mainly because I’ve already gone through the tedious process of getting the various certificates installed. Updates still seem to take the same amount of time to get reviewed as new apps, though: SFE 1.3 has been in their queue for 9 days so far. I’m hoping that competition from Windows 8 and its app store will force Apple to streamline their approval process. If Microsoft could guarantee that they would approve apps and have them ready for sale within two days I’d bet that developers would abandon Apple in droves.

I currently have two SFE updates queued up. 1.3 replaces TTF with BMFont labels on the menu screen, making it usable on the retina MacBook Pro. It also has sound effects when choosing a menu item. 1.4 (not yet with Apple, but you can grab the sourcecode and compile it yourself if you want a sneak preview) includes the following changes:

  • Replaced the “Controls” window with a preferences panel allowing keys to be redefined;
  • All game settings - keys, game type, speed, height, etc - are saved;
  • AI is multithreaded for a small speed boost.

The multithreading is a neat (if obscure) change. The AI works by simulating all possible moves when it is given a new shape to play with, which means it must run 24 simulations (4 rotations multiplied by 6 positions) of a complete move (move shape right 3 times, rotate twice, drop 12 times, remove chains, drop eggs, remove chains, etc). Each simulation produces a single value that represents the score for that move. This is obviously a lengthy calculation but is something that could very easily be done in parallel, so I’ve used dispatch_apply() from Grand Central Dispatch to run the entire 24-iteration loop in one go.