Book review: Windows Phone 8 Game Development

6807OT“Sir, I want to be a game developer, what do I do?” is a question I got asked a lot during classes. The honest answer I usually give is :”work hard, keep trying and never stop trying”. I’ll keep on answering this, but I might also recommend a new book that has recently arrived titled “Windows Phone 8 Game Development – A practical guide to creating games for the Windows Phone 8 platform” by Marcin Jamro (Packt Publishing).
Remember the big bad-ass books by Andre Lamothe on (3D) Game programming, where many aspects of game programming were discussed? This new book has the same approach: more is better, plain simple.

A first glance at the index will immediately show the author is trying to describe all aspects of game development, not only the game (engine) coding itself, including social interaction, webservices, publishing, etc. What especially triggered my attention was chapter 3 titled “Mvvm design pattern”, a pretty ballsy approach because up until now I haven’t seen a single book on game development where this pattern is even just briefly mentioned.
Throughout the hefty 394 pages, the author will show how to (re)create a full-blown 3D space , asteroid-like shooter from the ground up. This is both good and bad news: bad because it means most chapters will depend on code of the previous ones, good because it shows how interdependent a lot of aspects are when developing a game. Many books who use this approach (i.e. build an application from start to end) sometimes fails because a) some important code-parts are missing or b) the code is to complex: the reader misses the keypoints the code wants to convey and thus loses time trying to get the code to work AND understand.
I haven’t made the game itself so I can’t vouch for the fact that a workable game can be made following this text but the code itself in the text is well-documented and clear.
A nice addition is the fact that a hybrid approach is used: managed code to harbour the menu/UI-related stuff, and a native part for the game itself. The game itself is written using DirectX, whereas the main game menus are in plain XAML (hence the MVVM approach mentioned earlier).

The text itself is very detailed, every step is explained, but sometimes a bit redundant: the author even explains how to place controls from the toolbox in your designer and how to debug using locals, autos, etc. A tad overkill? On the other hand, this makes the book ideal for anyone new to c#/xaml programming. So it could actually be used as an fun, introductionary book for experienced non-C#-developers who never used Visual Studio.

And yes, a lot is tackled: even augmented reality (AR) is in it: GPS coordinates of other players nearby are used to show their actual location when watching through the camera of the phone.
So in overall: if you need a primer on 3D/3D game programming for Windows Phone 8, this book is a must-have!

A powerpoint .pptx to Latex .tex convertor tool

A colleague of mine is making some very nice Latex-based presentations, including a dynamically generated section-overview on each slide. Since all my current slidedecks are made in Powerpoint I started working on a small tool that converts .pptx to .tex latex files. (make note: this tool won’t work with oldschool .ppt files!)

Clipboard01
The tool is far from done. But the basic functionality is there. Currently the tool converts a .pptx file to a  .tex and keeps the following slide information:

  • All titles
  • All text/bulletitems
    • Including identation
  • All section headers
  • Option to include hidden slides
  • All images
    • Each image is extracted and save as a separate file

I’m using the Open XML SDK 2.0 which allows more easy parsing of .pptx using C#. More info on how the tool was made might show up here some day.
Other features that I’d like to include is the ability to export the notes (shouldn’t be a problem) and some simple text formatting information (bit harder).

You can download the sourcecode on github: https://github.com/timdams/Pptx2Tex

Adding a search contract to the Windows 8 Calibre frontend

In this post I will show how simple it is to add a search contract to a Windows 8 Store app. This contract allows the user to search within your application from anywhere in Windows 8 using the search charm.  We will use my Calibre frontend app to show this. Check this video to see the raw action of what we are making.

What we are building: the search in action after querying for books with "brown" in the authorname.

What we are building: the search in action after querying for books with “brown” in the authorname.

This is the second post of my quest on writing a Windows 8 Store app for Calibre. The previous post can be found here. Read more of this post

Writing a Calibre frontend for Windows8/WinRT using ‘SQLite for WinRT’

While developing a Windows Store frontend application for the Calibre ebookmanager, I’m hitting several bumps along the road. In this post I’ll explain some of the bumps and how I’ve tried to tackle them.

Basically they can be summarized as follows:

  • How to access a Sqlite database in a WinRT application
  • Circumvent file access limitation of SQLIte for WinRT
  • Load cover files of each book
  • Create incremental-loading Gridview using ISupportIncrementalLoading

Calibre is a great open source and free to use ebookmanager. It allows me to manage my ever-growing ebook-library and it supports lots of ebook-filetypes, including the ability to convert between the types.

My goal is to write a simple Windows Store application that acts as a frontend for the Calibre database. It will show my library in a visual appealing manner (aka TDPFAM, “The-design-principle-formerly-known-as-Metro”) and allow the user to rapidly query his database from anywhere in windows. At least that’s the idea. We’ll see where we end up (check here for a little video demonstrating the application I’m building).

Future follow ups on this project might be found here on the Calibre developer forum.

Early alpha of Calibre frontend, simply demonstration what can be done (check out the youtube movie). Note the layout that is based on one of the existing VS2012 WinRT project setup.

The original Calibre program

With this post I hope others get triggered to create their own Calibre frontend, because, knowing myself, I’ll get bored of the project pretty soon once I have to tackle the UI/UX stuff …which I don’t like.
Read more of this post

A WP7 databound graph control

For a project we are working on, we needed a simple (and free) WP7 graph usercontrol. The data which the usercontrol visualizes needs to be databound and each time new data arrives, the graph should update itself on-the-fly .In the following tutorial we’ll show how to create such a control from scratch (make note that normally this should also work in Silverlight or WPF projects).

A demo-solution of this tutorial can be downloaded here.

Read more of this post

Creating an Intellisense compatible enum-based Dependency Property

Actually, this post has a way too fancy title , because in fact I will merely show that enum-based dependency properties are IntelliSense compatible “out-of-the-box”. (by the way, if you know all about dependcy properties: simply read the line in bold and you’ll know all there is to know).

When creating a (WP7/SL/WPF) usercontrol, one often ends up creating one more dependency properties (DP). Most of the times you only want a discrete set of possible values that can be assigned to the DP. The logical choice then of course is to have an enum-based DP.

Now, for the Intellisense to work it is important that you define the enum type OUTSIDE the usercontrols class. For example, suppose we have define the following enum:

public enum GraphTypes {Default, Point, Line}

Now, all that remains is to add a DP that uses this enum (remember that you can use the ‘dependencyproperty’ snippet that comes with VS):

        public static readonly DependencyProperty GraphTypeProperty =
            DependencyProperty.Register("GraphType", typeof (GraphTypes), typeof (GraphControl), new PropertyMetadata(GraphTypes.Default));

        public GraphTypes GraphType
        {
            get { return (GraphTypes) GetValue(GraphTypeProperty); }
            set { SetValue(GraphTypeProperty, value); }
        }

Once you now add the usercontrol elsewhere in your xaml-code, IntelliSense will happily show what values can be assigned to the DP:

There we go. That’s all there was too it.

Next post I’ll show how to create a WP7 user control to plot graphs using data binding. Consider some of the code here a sneak preview.

Using delegates, func and lambdas: a tutorial with soldiers

In this tutorial, written for beginning programmers, I’d like to show a little demonstration on the usage of delegates and how we can go all crazy by refactoring and magically see all our duplicate code disappear.

Imagine we are writing the next ultimate Command&Conquer spinoff which can run on any computer …in console-mode. Read more of this post

Follow

Get every new post delivered to your Inbox.

Join 330 other followers