From Rect to Square

Last updated Feb 8, 2015

For the v3.1 of our beloved GiraffPanic - mobile game we decided to try out something new and port it over to natively support BlackBerry Passport (because why not?). This means supporting square form factor as BBPassport screen is perfectly square.

By itself a transition to a new form factor is not such a terribly difficult undertaking, especially when you are dealing with Qt and QML as your SDK of choice, however even a simple task has to be done well, or not at all.
So the first thing first - we tried to run the game as it was on square form factor just to see what it will look like right out of the box. This gave us some insides on how out custom scaling engine handles the new resolution, it was never meant to support.

The Planing

All-in-all the results were quite pleasing, as majority of game elements transitioned quite well on their own. But naturally there were a few things to fix, and a few game screens needed additional hinting. So we proceeded to make a list of all the things that needed changing and adjustment.

The Job

One-by-one we have reformatted very broken screen in game and every wrongly sized element to look good on square. And now we had to versions of the game - one to go with rectangular screens and one to go with square ones.
But now we had to ask ourselves - Are there enough changes to QML and code to warrant having two separate versions to maintain and patch? - Well the answer was - No. So we have attempted to merge the both code bases into one, all compassing code, using a simple isSquare = true/false switch to drive the more drastic of changes.

Conclusion

Finally the new and updated game is out on BlackBerry World, now supporting square screen factor natively.
The big benefit here is that if ever does as Android device come out with a square screen (LOL, yeah right), we will be ready for it :D