Sudoku3D: XNA Mobile Game Development Experience By Alexander Yakobovich - MSP
Back in November of 2008, Microsoft launched the Xbox Live Indie Games Channel, giving indie developers a chance to publish to a platform that was once exclusive to major game studios. At the time, I was experimenting with C# bindings for OpenGL and DirectX purely out of interest. But the never before seen opportunity to publish directly to a game console, sparked a desire to create a complete game. The opportunity subsequently introduced me to the tri-platform game development framework, XNA.
Back then I was a computer science undergrad, and managed to get a fellow classmate interested in developing for the Xbox as well. Together we came up with a few ideas for games, most of which though were just unrealistic for a development team of two with no background in 3D game programming. Eventually we agreed on a simpler start, with a unique spin – literally – on the classic Sudoku puzzle.
This variation of the puzzle was in full 3D and placed on the surface of a cube, where each face of the cube would contain 16 unique values, with all 6 faces ultimately contributing to one unique solution. We decided on a simple name – Sudoku3D. It was unique, simple to play, relatively easy to implement, and would still require an emersion into 3D graphics. We agreed that the game itself would have to appeal to both challenge-seekers and those who would prefer the classic Sudoku puzzle. As a result, one of the signature features of Sudoku3D is the ability to unfold and flatten the cube into 2D view and fold it back for 3D viewing in real-time.
Soon after development began, the XNA framework became a lot more than a technical requirement to get published on XBLIG. It became an obsession! Designed for accelerated managed game development, a team of computer science students (that would eventually grow to 4) could only feel blessed to work with XNA, which reduces amount of time spent on writing boilerplate code. Two years later, it would also become my tool of choice for my Masters project, which deals with significantly more complex 3D development than Sudoku3D.
While developing Sudoku3D for Xbox, I was eventually slapped with the reality that a puzzle game (even in 3D) was not exactly a perfect fit on a console that was dominated by first-person shooters like Halo. At the time I wished that Microsoft would release a “phone version of Zune”, that – just like Zune – would support XNA runtime, but with added 3D capabilities. Eventually my wish was granted, and a Zune Phone (yes, I really did call it that) was announced.
With the 4th release of XNA, we continued Sudoku3D as a Windows Phone 7 project and tested it with the emulator. Later, we received a special opportunity to test the game on a WP7 developer prototype. The joy of seeing the first screen rendered on the phone screen was quickly demolished by the horrendous frame rate that the game ran at. At barely 4 frames per second, the puzzle resembled a cartoonish slideshow more than a 3D game.
Even though Windows Phone 7 is branded as an “Xbox in your pocket”, without prior mobile game development experience, we didn’t really know what to expect on the actual device in terms of performance. The fact that we were developing a simple puzzle game didn’t help either; it only added to complacency during development. In the initial promotion of WP7, the game “The Harvest”, a 3D extravaganza, ran at a smooth and steady 30 fps, whereas our simple puzzle on a cube was a slideshow. The lengthy optimization period (or as I would like to call it: “learning period”) lasted longer than the development of the game. In that time, we fixed more mistakes than XNA’s Shawn Hargreaves ever mentioned in his blog (and his blog is huge!).
Fast-forward to present day, Sudoku3D is finally on the device it was meant for. After passing certification without a single failure, the game picked up over 4,000 fans on Facebook (facebook.com/Sudoku3D) in less than a week on the marketplace. And having learned many lessons in game development, we were able to push the first update to the game within the first week after publishing the game. More information and video demos may be found on the Sudoku3D Facebook Page