Posted on Friday, June 11, 2010 by Aidan Doolan, IdealBinary.com
You may remember we ran a small promotional competition in late January of this year. To help celebrate the release of 3D Bookshelf for iPhone and iPod touch, we gave away an Apple iPad. We announced the winner at the close of the competition and waited patiently for the iPad to go on sale.
Our competition winner hails from the UK, so on the 10th of May (the day Apple started taking pre-orders there) we placed an order with Apple and were lucky enough to nab one from the first batch of iPads to make it into the country. Later that month, our prize winner got her iPad!
Recently, she very kindly sent us a photo of herself and her competition prize.
Congratulations Giverny! We hope you enjoy your new iPad!
We look forward to the release of our next App, so we'll have an excuse to run another competition! Stay tuned..
Posted on Thursday, June 03, 2010 by Aidan Doolan, IdealBinary.com
We've just completed a makeover of the Ideal Binary web site. Aside from changing the CSS and styling, we decided to combine all the blogs into one company blog. This makes browsing the site simpler and makes it easier for us to maintain. Each of the RSS feeds have been combined as well. So if you've followed more than one of our blog RSS feeds, you may see some duplication. The main company blog is now accessible from this link, and the corresponding RSS feed can be obtained here, but all of the old links should continue to work.
Your feedback is more than welcome, so let us know what you think! As always you can follow us on Twitter for updates, or you can subscribe to our RSS feed or mailing list.
It's only been 24 hours since it appeared on the App Store and it's already shot up the Free Book Charts in 23 countries. We weren't expecting to see it rise quite so quickly. If you're interested in seeing the app or getting in the mood for the new Robin Hood movie, download the app and let us know what you think.
For now, it's back to our latest creation. We're progressing well, but there's still lots to be done. For updates, you can follow us on twitter or subscribe to our mailing list.
Posted on Friday, April 09, 2010 by Kevin Doolan, IdealBinary.com
3D Bookshelf has been out on the App Store for just over two months now, and we've had over 25,000 sales in that time. We've been very lucky. Apple decided to feature us in 'What's Hot' and 'New and Noteworthy' and helped us get great exposure. We didn't count on this because the odds are incredibly slim, but deep down every App Developer hopes it will happen. We did our best to make our App stand out, we responded with gusto to user feedback on iTunes, and it paid off. One of the interesting stats from over the last two months is that we haven't logged a single crash report through iTunes. There are many contributing factors: the type of App, usage patterns, etc, but if your code base isn't rock solid, you will see crash reports. Below are some of the aspects of 3D Bookshelf that helped achieve a robust code base.
Values from Game Engine Development
Our background ranges from high-end PC game engine development, right down to low-end mobile development and porting. It is very interesting seeing the different approaches game developers take to problem solving versus those of non-game developers. Game engine developers have a laser focus on two main things: frame rate and resource usage. Game engine developers with experience on low-end mobile development (and especially porting) have an even greater focus on those things! Non-game developers are also focused on these things, but they tend not to weight them in quite the same way. These are things that were front and center in our minds during the entire development of 3D Bookshelf.
One Single Memory Allocation
~ 3D Bookshelf ~
3D Bookshelf is the world's first fully 3D eBook Reader. Available now on the AppStore for iPhone & iPod touch!
Memory management though the OS, if not used carefully, can fragment memory, degrade performance, and worse (at least on iPhone OS) can simply fail altogether if the OS decides you're not being reasonable about the rate at which you are making large allocations. 3D Bookshelf is written on top of our middleware platform, UtopiaGL. One of the main features of UtopiaGL is a solid, fairly typical game-engine style memory management system, that helps avoid the issues that iPhone OS presents. When 3D Bookshelf initializes, it tells UtopiaGL to make a single, app specific (in this case, 8 megs) memory allocation, and from that point on, there are NO further explicit OS memory allocations. All allocations are made through UtopiaGL (using the C++ placement new operator), which it allocates from this heap. The UtopiaGL memory manager is hooked into all aspects of the engine, for example, the zip loader, and png loader have hooks to use the UtopiaGL allocation system, and not the OS. UtopiaGL completely avoids internal fragmentation very simply by dividing memory into two heaps: constant and temporary. Constant memory is allocated from the bottom of memory up, and temporary memory is allocated from the top down. Allocations that result from loading a zip or a png, for example, always get allocated from the temporary end, and are released the moment they are no longer necessary. Permanent allocations are always made from the constant end. This means that at the end of a load step (like loading the Main Menu), you are left with a neatly packed heap, with zero gaps between allocations, and a clean lump of contiguous memory (towards the temporary end of the heap) for real-time use.
There are of course other allocations you can't control, for example, OpenGL textures, OpenAL sound buffers etc. but you certainly can do a lot to minimize the pressure you place on the handset on the application side.
Simplicity is a Pre-requisite to Stability
I read years ago that in typical, professionally written, untested code, there is usually a minor bug in every ten lines. I'm not sure if that number holds water, but it does point to a simple observation: bugs live in code, so the less code you write, the fewer bugs you'll have! Shorter code is almost always simpler - the challenge is to keep it readable. During development, we always favored short, simple code. In fact, we only rolled up our sleeves on a few parts of the code base that really required high-performance - the 3D Book Geometry Generator and animation system, and even then, we prototyped in simple code first, and optimized where we needed to based on speed measurements.
Automation
There is another important observation here. The reason you need to favor short code isn't because short code is inherently more stable. It's because humans are the ones writing the code, and the more code they write, the more bugs they introduce. Human error is the root cause. Remove human error and chances are good that even with larger code bases, they'll be more stable. Enter automated code generation! Another powerful feature of UtopiaGL is its FSM (Finite State Machine) support. This allow you to create a simple text file that describes the many states your App can be in, what causes the App to transition from one state to another, and how to make those transitions. This simple text file gets compiled by the UtopiaGL toolchain, which generates the necessary C++ and Header files required to implement all that management code. Best of all, it scales without any human error being allowed in - a large FSM is just as stable as a small FSM. You may have bugs in the code you use to augment it, but the state management code will always be rock solid. For large projects this is very important.
The advantages of using a FSM system go well beyond stability. Increased development speed is also a major advantage. It takes very little time to flesh out a FSM. It also takes very little time to make large changes. All of this, with the confidence of stability.
FSMs drive the overall App Flow (how modules transition, for example, Main Menu to and from the Info Screen, Settings screen, Book Reader etc). They drive the internals of the Main Menu and the Book Reader. And you can even have a FSM within a FSM, for example the logic in the Book Reader that hides the UI by tapping is implemented using a small FSM, seen here.
FSMName BookUIButtonsFSM
Context BookUIButtonsController
Initial LimboUIButtons
Transition Immediate
{
// Event NextState Action
LimboUIButtons
{
Begin InvisibleUIButtons DoInvisibleUIButtons
}
InvisibleUIButtons
{
Tap FadeUpUIButtons DoActivateUIButtons
}
FadeUpUIButtons
{
Done VisibleUIButtons DoVisibleUIButtons
Tap FadeDownUIButtons DoDeactivateUIButtons
}
VisibleUIButtons
{
Tap FadeDownUIButtons DoDeactivateUIButtons
}
FadeDownUIButtons
{
Done InvisibleUIButtons DoInvisibleUIButtons
Tap FadeUpUIButtons DoActivateUIButtons
}
}
Creating stable software is a major challenge. There are many things you can do to limit the chances of introducing bugs into your code. The two most effective ways we kept the 3D Bookshelf code base stable were to tightly control memory management and as much as possible remove human error from the equation. There were many other methods used, but these two areas more than likely had the biggest effect.
Posted on Wednesday, April 07, 2010 by Aidan Doolan, IdealBinary.com
It has been just over two months since we released 3D Bookshelf for iPhone & iPod touch, so we thought we'd share some of the stats on it's performance in that time.
Here goes..
Total sales so far 25,000+ units.
Featured by Apple in "What's Hot" in several Countries (US, Canada and others.)
Featured by Apple in "New and Noteworthy" in several Countries (Australia, New Zealand and others.)
So far, we've released four updates, adding a night reading mode, social connectivity, a UI visibility toggle and an additional ten books to the initial collection (now totaling 25 books).
Zero(!) crash reports from the iTunes Connect crash report system. We're particularly happy with this. Kevin is going to follow up with some posts on how we managed this feat - if you're an aspiring iPhone developer you'll be very VERY interested in these!
Global average App Store rating (taking in all regions): 4.5 out of 5 stars.
What's Next?
We're hard at work on our next app. We hope to have it ready by the end of May. If you like 3D Bookshelf, you'll REALLY like our next app. We're targeting iPhone, iPod touch & iPad initially.
We'll also be adding more books to 3D Bookshelf, of course. So stay tuned for updates, or you can follow us on twitter.