Tuesday, July 30, 2013

Forma

Warm today, a pretty nice morning.

Success! Apple got the developer/provisioning portal back up yesterday so we pounced on it and.let a new Test Flight build was let out into the wild very shortly after. The build had a lot of little polish tweaks, but two stood out above the rest.

1. Pie charts!
We finally got the Pie-Chart to render correctly. That was a pain to get done, thanks to Matt for sticking with it. The main issue was that Starling does not have the drawing API that Flash has in order to render the circle. What we ended up doing was actually using the Flash rendering method, capturing the result into bitmap data and then adding it to the Stage via Starling, very happy with the result.

2. Campaign Bug
I believe I solved the issue of the campaign breaking bug. It was mostly due to my own laziness/negligence unfortunately. I had never tested what happens when a player completes all sub-levels within a level. The result is a NULL ref error. Really dumb mistake, I was checking to see of the currently completed sub-level number was less than the total number of sub-levels, if so than go ahead do furtherestSubLevel++, and create a new sublevel.

if(sublevel.levelnumber < sublevels.length)

The problem is that all sub-levels are stored in an array. Arrays number things, starting at 0. So an array with five items in it looks like 0,1,2,3,4. Which means I should have been checking

if(sublevel.levelnumber < sublevels.length - 1)

Simple problems have a way of causing large problems.
 

No comments:

Post a Comment