What’s on my Windows Phone – my favourite apps

I’m often get asked what apps I have installed on my phone. After explaining I have a Windows Phone 8 (Lumia 720) the question usually results in an awkward “erm..okay, nevermind”. But sometimes a fellow Microsoft enthousiast can be found. It is for these people that I have compiled a list of the apps I have on my ‘start menu’ (e.g. use-a-lot-apps) and those installed (e.g. handy-apps) So without further ado: Read more of this post

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!

Oldschool CMD: deleting all files of a type with exceptions

Just some oldschool trickery: using the command prompt in windows (even works in dos! 🙂 ) it’s very easy to delete all the files of a certain type except those having a specifc name I wan’t to keep. Imagine I need to recursively delete all the jpg files in a folder and subfolders, except those named “folder.jpg”. The following command does this:

del /s dir *.jpg  /s | find /i /v "folder.jpg"

Why I put this on my blog? Because I might need it for future reference 😀

A clickable Windows Phone slider

The default behavior of the Windows Phone Slides control doens’t allow a user to click on the slider where the value should be set to. Instead, tapping anywhere on the slider will simply result in the slider incrementing by it’s default or given incrementsetting.

Following small piece of code shows how to have the wanted behavior by responding to the Tap- event of the Slider (named mySlider in the following codepiece).

        private void UIElement_OnTap(object sender, GestureEventArgs e)
           if (mySlider.Orientation == System.Windows.Controls.Orientation.Horizontal)
                var pos = e.GetPosition(mySlider).X;
                var width = mySlider.ActualWidth;
                mySlider.Value = (pos/width)*mySlider.Maximum;
                var pos = e.GetPosition(mySlider).Y;
                var height = mySlider.ActualHeight;
                mySlider.Value =(1- (pos / height) )* mySlider.Maximum;

Bookreview: “Masters of Doom”

51jZGrnagjL._SL160_Last weekend I devoured Masters of Doom: How Two Guys Created an Empire and Transformed Pop Culture , a book by David Kushner. The book delivers bigtime. Even though the story about game developers pur-sang John Carmarck and John Romero is pretty well known to many avid gamers, the author still is able to tell a gripping story. Basically we follow the lives of “the two Johns” and how they created some of the most important games in recent gaming history: Commander Keen, Wolfenstein, Doom and Quake.

What makes this book so good is the very fast pacing and the focus on the people behind the game. From the start it’s very clear that the two Johns are very , very different people. However, that didn’t stop them from making some of the best games ever, together. Equally important is that the scope is wide enough and not only focussed on mr Carmack and  mr. Romero. Instead, all the ‘side-characters’ are given enough time, and credit, in the book to show that in the end the id software games were the result of great teamwork.

What I especially liked from the book is the fact that the author is able to keep a certain level of serenity when talking about how the great cooporation between the two johns came to a halt…and changed in what some might call a mud-throwing fest. Where other authors might delve deeply in these sad parts in their lives and focus on the not-so relevant cursing and (verbal) fights, David Kushners still is able to show the good side of it all making his text all the more important.

If there’s one, small, drawback of this book it’s the lack of technical details. Ofcourse, this was never the focus, but still, certain aspects could’ve been fleshed out a bit more to satiate my inner developer (for example why Romero cringed when discovering how the Quake 2 engine was written which would results in many months of rewriting Daikatana to use this new engine).

When reading the book I continuously felt pangs of jealousy , thinking how great it must’ve been to be part of id software while they were making pc history.  If there’s one conclusion to be made from this book it’s that indie developers should never give up and even nowadays, with big publisher  and software companies everywhere, there’s still room for a handful of focused and able game developers.

I can’t recommend this book enough. Go and have a read, you won’t regret it!

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!)

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