Sunday, 22 December 2013

Learning Windows 8 Game Development Written by Michael Quandt


I have reviewed one or two books that have been published by Packt publishing, and I have to be honest, the content, while normally accurate, has been a little thin on the ground. I am pleased to say, not with this book!
I am pleased to say this as I have known the author for a number of years. As is the case with on line communities, I have never met him physically, but I have known Michael for many years.


I first encountered him when I started to get into XNA on a well know community board called the Hazy Mind, he went by the name Chr0n1x then, board was ran by another XNA/DX guru Micael Schuld. Chr0n1x was one of the main go to guys on that board after the admin, and he helped me a great deal, not just in the early days but even today with various GPU related issues I have. At that time I don’t think Michael was even in college/Uni then but his understanding and knowledge of the GPU and it’s pipeline was hard to beat.

The Book

So, enough of all that, what about this book, we know it’s rich in content, but is it any good? I think it is, it takes you right from the basics of setting up your project and creating a simple game loop along with a graphics device, drawing sprites and using input devices and accelerometers to live tiles, networking publishing to the store and monetization. Now, I know, this all sounds a bit 2D, but in the appendix Michael quickly covers some of the basics of 3D too, but to be honest, you really need the first lot of tools and can create a great 2D game, but you still need the skills from the previous chapters to get your game together whether its 2D or 3D.

Should I buy this book?

If you are not new to C++, but new to DirectX and/or game development and want a great book to get you into it, and take you to an intermediate level then, yes, this is the book for you. If you know C++ and have done some game development, then yes, there is some great stuff in here for building games for Windows 8, personally I am going to find it very useful for padding out a lot of holes in my C++ and DX knowledge.

Anything Missing?

The only thing I would have liked to have seen in this book was audio, it gets a mention, but there is no implementation shown, which is a shame, but you know what, the amount of stuff that’s in here, you can find this out somewhere else anyway.

Where Is It?

You can get a copy of the book here.

Friday, 2 August 2013

HLSL Development Cookbook By Doron Feinstein Published By Packt Publishing

A number of weeks ago, I was asked by Packt Publishing to review this book, they gave me access to the eBook version of the book. Normally I am not to keen on reviewing books, but as this was based on a topic close to my heart (HLSL) I thought I would give it a go.

The book is made up of six chapters, which for a book priced at (hard back) £30.99 seems steep, I guess you can get the eBook for £16.14. The books tag line is “Quick answers to common problems”, and I guess it sort of does provide this from forward rendering, deferred lighting, shadow mapping, post processing and SSAO, and all for DirectX 11.

I am going to go over each of the chapters and tell you what I thought of each.

Chapter 1: Forward Lighting

Chapter 1 starts of where I guess we all do with HLSL, with forward rendering. Covering Hemispherical ambient light, directional light, point, spot and capsule light, it then goes on to cover projected textures as well as multiple lights. The last part of this chapter I found odd to cover as the next chapter covers deferred lighting, for those of you who are un aware of the difference, with forward render having more than 3 lights tends to kill your GPU, where as deferred lighting allows you to render lots and lots of lights at comparatively little cost. I did however like the solution given for the multiple lights for a forward render :)

Chapter 2: Deferred Shading

A topic close to my heart, this is not done how I would have done it, but still gives a good effect, this chapter covers the creation of the GBuffer, but does not cover how you would go about creating the render targets for it in ode, other than giving the types of targets to use for each RT (You can download the source code for this once you have bought the book though, C++ only though) The chapter then goes onto cover a number of light types, point, capsule and spot lights, but again thought a cone light could have also been added.

Chapter 3: Shadow Mapping

I quite liked the shadow mapping technique given in this book, it uses a PCF (Percentage Closer Filtering) technique, as with most of the chapters in this book, it would have benefitted more if there were more screen shots of the effect being implemented, might just be me, but I like books with pictures, I am not the sharpest tool in the box :S. The chapter only covers shadows generated by spot and point lights based on the techniques used in Chapter 1, the chapter then goes onto cascading shadows and visualizing shadow maps.

Chapter 4: Postprocessing

Another HLS topic close to my heart, but I am not sure I enjoyed this chapter, covering HDR it also went on to a process called Adaption for smoothing HDR transitions, which I think should really just be part of the HDR chapter again, no images showing the effect. The chapter then covers bloom, always a nice post processing effect. Depth of Field is next, but again let down not having an image of the effect. An effect called Bokeh is then give, now I have never heard of this technique (probably should have) so it was good to learn something new, and it even has a nice image of the effect too, and I like the look of it :)

Chapter 5: Screen Space Effects

Onto chapter 5 and screen space effects, I think I would have had all this in chapter 4, but then I guess they only have a five chapter book then. In this chapter SSAO, lens flare, crepuscular (God) rays and screen space reflections are covered. Again, with the SSAO technique, it could have done with an image or two to show you what you will be getting for your effort, there is a good description of how it works though, which helps. Screen space reflections is a nice article and again has a good description of how it works. The God rays are nice too and has (as well as the SSAO article) given me food for thought on how I go about rendering mine :)

Chapter 6: Environment Effects

Covered here are Dynamic Decals, Fog and Rain. Having little experience of DX10/11 this was new to me, and was nice to read something that I didn’t have a clue about. The fog is technique here is also a technique I quite like, rather than just lerping the distance to pixel a helper function is created to do the calculation. The rain is also a nice technique with collision detection also included.


Throughout the book I do like how the info is presented, having a description of what’s to be covered, followed by a “Get ready” section telling you the things you are going to need, then a “How to do it” section giving a breakdown of how to go about writing the shaders, then a “How it works” section breaking down the How to.

It would have been nice to have had a few more pictures displaying the effects, as a visual art, it’s always nice to see what the effect should be like. Also, the book is source code neutral, I kind of see why that was done, but would have been good to have seen how the source code from C++ and C# would be used to implement the effects, but I guess you can download the source once you have purchased the book, but again, this is all in C++. It would have been nice to have C# samples too. On the whole I think it’s an expensive book for what you get, but the content seems sound and would help to get you started writing your own render engine using HLSL under DirectX 11. Which reminds me, I really need to get a decent development machine so I can play with DX11 more :P

In case you missed the link to the book, you can get it here.

Hope you found this review useful.

Wednesday, 30 January 2013

Current State Of Play with my C++ Engine

So, I have been quite for a long time, life has a habit of getting in the way like that though, I am sure if you are a regular follower of my blog(s), you know I have a tendency to pop in and out.

That said, I am doing a few things, still working on an XNA game (Killer Core) with Mark, have also been participating in an 8WeekGame competition, as well as try and port my existing XNA engine to MonoGame, and I hope this year to, again, be contributing to the fantastic Star Trek fan project ST:Excalibur.

So, where does that leave my C++ stuff, well on the back burner to be honest, but that said, it’s not dead, back in November last year, I mailed someone the source for the engine (warts and all), have not heard if they have found it of much use, but it was nice to know people still have an interest in it. This year my good friend Ed has asked if I would post about what I have done with it so far, and so that’s what I intend to do.

If you are interested in accessing my code directly then let me know I currently have it set up on, so if you are a member, let me know and I can add you and you can get the latest code as it changes.

What am I going to post about then?

Well, I thought I would tell you about the classes I have created in the engine, and explain a little about what they are trying to do. As you probably know, my background for graphics engines is in XNA, so I have tried to create an engine that reflects XNA so it’s easy for me to transition to C++ and DX11, and also means that a lot of the work I have done in my XNA engine I can bring with me to C++.

We have covered the creation of devices and a window in earlier posts, so I am going to skip over that here and just go to the classes. I’ll probably do a post for each class that way I can put a bit more detail into the posts (hope enough for you).