Monday, November 12, 2012

Game-off: Day 9

Performance woes!

A large number of Chipmunk-js shapes on iPhone 4S (running iOS 5) can cause unplayable frame rates. I didn't anticipate that when I added the chain; all those rectangle segments kill my poor phone. I spent tonight unsuccessfully trying to solve that. First I created a new Line object, hoping that changing the chain into a series of line segments instead of rectangles would improve things. It did not.

I ended up repurposing the Line object to draw the floor and slope (finally!) The performance problems persist.

I may have to attempt porting the spacial hash to Chipmunk-js to get some decent performance out of it. :(

No screenshot; looks the same as yesterday except the floor and slope are drawn as straight lines. I spent a lot of time on this tonight and did not get the results I was hoping for.

No comments: