Pancakes!!! Updated to Version 2.0.2

Last night, Pancakes!!! was updated to version 2.0.2. This release includes numerous bug fixes. Some of these fixes are highlighted after the break.

Note: Pancakes!!! may seem like a simple game, but there is a tremendous amount of complexity hidden behind the artwork. What you’ll read below is a little window into the complexity of Pancakes!!!

It’s Not Saving Game Data On Some Devices

First, Samantha wrote to tell us about a problem with the game saving order data. This is a strange bug because saving data *should* work the same on all android devices. The only time it should fail is if the device is out of storage space. Most Android devices have two storage areas, internal and external. Internal storage has a fixed capacity and cannot be changed. External storage is like an SD Card, it can be removed, replaced, and upgraded. However, some Android devices do not have external storage. We wanted to support devices lacking external storage and the data we’re saving is only about 50KB, so I thought to keep things simple we’ll just use internal storage on all devices.

There is also a technical difference in how I’m saving data. I’m using standard Java methods to save data to a path specified by the Android activity. It’s possible that the standard Java methods are failing on some devices, like Samantha’s. So I recoded the saving routine to query the Android activity for a file handle to internal storage and just use that to save the data.

I’m unable to reproduce this problem so I’m not even sure if this fixes it. Hopefully Samantha will email us and let us know. If this doesn’t fix the problem then I might have to use external storage as a fallback.

The Plate doesn’t catch the Ingredients

I had a tough time reproducing this one. I played through 140 orders before I was able reproduce it and gather some data from the debugger. This was a multithreading nightmare. The game engine runs a thread for the physics engine (mostly used for collision detection) and one for game updates. When there is a collision between a falling ingredient and the top of the stack the physics engine calls a handler that tells the game to add the ingredient to the stack and then recycle the falling ingredient so that it can be used again later. I can’t simply recycle the falling ingredient in the physics thread because that would alter structures being used in the game update thread, so I was recycling it in the game update thread. However, it’s possible that two physics collisions could be registered before the game update thread is completed, making it possible for the falling ingredient to be recycled two or more times.

The game engine doesn’t care if an object is recycled twice, it’ll happily do it and add the same object to the pool again. When this happens the same object can be pulled from the pool more than once and turned into a falling ingredient, or a tossed-up ingredient, or a stacked ingredient. In the end I fixed the problem by queuing the falling ingredient for recycling while in the physics thread (making sure that the same object is only added once) and then performing a batch recycle in the game update thread.

Crashing on the Order and Tips screen

I wasn’t able to reproduce this one. The crash reports indicated that this is a bug in the game engine we are using. The bug is related to the way the game engine handles and renders strings of characters. If the number of characters are longer than the game engine expects, then it crashes rather than resizing its internal data structures to handle the longer string. I did what I think is an effective workaround that should prevent crashing.

It Just Crashes When It Starts!!!

Pancakes uses GLES 2.0 (Graphics Language for Embedded Systems 2.0) and sadly not all current hardware supports GLES 2.0. Additionally, I haven’t found an effective way to filter out non-GLES2.0 devices on Google Play. So if you have a device that doesn’t support GLES2.0 then it will just crash when you start the app. As I discover non-GLES2.0 devices I’m manually filtering them on Google Play.

Cheat Fix

There is also a cheat that I fixed. I won’t go into details but it’s fixed now :)

Missing Stats on the Order Selection Screen Buttons

This was a bug in how I was calculating the statistics like Total Score and Stars Collected on the Order selection screens. I actually fixed this once before but it was reverted in source control due to a merge error and I forgot about it :/ It’s fixed now.


That’s about all. If you encounter other problems, please email us.


Leave a Reply

Your email address will not be published. Required fields are marked *

WP-SpamFree by Pole Position Marketing