Practical Rendering

I was thoroughly impressed by Practical Rendering and Computation with Direct3D 11 by Jason Zink. Microsoft’s Direct3D API is certainly not for beginners, and neither is this book. But, at the same time, the author does a great job of explaining the material in a way that is approachable. The book assumes you are already comfortable with C++, and doesn’t hold your hand with the syntax. This is great, since you really should have an understanding of C++ before jumping into 3D graphics programming. It’s also not the kind of book that expects you to type in long pages of example code into your computer. In fact, there are not really any complete examples listed in the book at all. Instead the author chooses to highlight specific API calls and explain how different techniques can be implemented using the GPU.

This is in stark contrast to the last DirectX 11 book I read by Frank Luna. Luna’s text was great, don’t get me wrong. But it was very focused on producing functional demos to showcase certain effects (like shadow mapping or ambient occlusion). Instead Zink chooses to go totally knee-deep into the API itself and, as a reader, I came away much more confident that I understood the material. Just as an example, early on in the book there is a 100 page chapter just on resources. Most other tutorials would briefly show how to create a buffer, and then move on other stuff. Not here. In fact, the next 200 pages of the book is just about how the pipeline works. It’s really great, and rare to find such insight.

Don’t be fooled, there is certainly code in these pages, and there are a few examples. The book covers some topics like deferred rendering, multi-threaded graphics, dynamic tessellation, and physics. What I liked about the examples is that only the bare minimum amount of code was shown. Just enough to understand the key concepts without getting bogged down with boiler-plate code. It also made reading along much nicer, without having to feel like you need to get up every 5 minutes and type something in on a PC. Plus, the source code for the examples, and the author’s engine, are available for free online. So no need to type either way.

One thing I really enjoyed was the discussion on DirectCompute and on compute shaders. There are hardly any books covering DirectCompute, so it’s great to see so much space dedicated to the API. I am very interested in using this in my own engine, though it’s difficult to find information on the topic. Practical Rendering and Computation includes several chapters using compute shaders, for example to do image processing (blur). There was also a good amount of space given for tessellation. So if you are at all interested in these specific topics, it’s pretty much a no-brainer to get this book.

One other thing. Mad props to Jason Zink for being available to the community. You’ll find him on the forums, even helping out newbies with their 3D questions. Much respect.

All-in-all, this was quite an eye-opening read. I mean, after reading the Luna book and doing some online tutorials, I thought I knew about DirectX 11. Well, I knew something. But this book went much further than what I had previously seen on the topic. I would even recommend reading this *before* Frank Luna’s book, as I think that would flow a little better. Get the foundation solid, and then start learning how to code specific effects. Anyway, this book comes highly recommended by me if you are attempting to learn Direct3D.

Shadowrun Returns

Let me just say this right off the bat: Shadowrun for Super Nintendo is my all-time favorite game. All time. It was great. Set in a future cyberpunk theme urban sprawl, you are basically a gun for hire. Or at least you were. You wake up in a morgue back from the dead with no memory of your life. You spend the rest of the game trying to discover what happened. It had RPG elements, action elements, adventure elements. You could hack computers and get money or steal information. You could go to a bar and hire guns to help out on your mission. It had an innovative dialogue system where you would get words in your “dictionary” that you could ask people. You started with nothing, but as you talked to people you would get more words to ask. It was awesome. Especially for 1993.

While Shadowrun Returns might not quite match what I remember of the original SNES title, it does a damn fine job at what it does. Basically the world is similar, and even the main character from the SNES game makes a cameo. Magic has returned to the world, along with ogres and elves and all that. Shadowrunners rule the streets. From simple hired guns (street samurai) to hackers (deckers) to mages, there are lots of different classes to choose from. The story follows a string of mysterious murders and the investigation to find the killer. Well, there is more than that but I don’t want to give anything away. The game is what I would call a turn-based strategy RPG. There are lots of RPG elements and stats you can level up. This effects everything from your hit points, to the chance of success with any particular weapon. So this takes a note from the mechanics of the original pen-and-paper game. This works well, and the combat is still satisfying. There are also some cool missions, or at least one really good one at the end, where you have to hack into security systems and fight of guards on an espionage mission. Good stuff.

So the game is great, and you should buy it. However, I did feel like it was extremely linear.  In the Genesis version of the game (1994) you could take all sorts of side-missions to beef up your stats or make money. It was awesome. They had drug deals, extractions missions, VIP escorts (no, not that type of escort), hacking, the whole nine. In Shadowrun Returns there is only really one side-mission in the whole game. So you are basically watching a good interactive movie. Granted, it’s a 17-hour movie, and it’s great, but I would have liked more choice. There is also very little exploration, it mostly feels like an “on-rails” affair. That said, it’s still a blast and any fans of cyberpunk fiction will probably get a kick out of it.

All in all a great addition to the Shadowrun universe, and a refreshing break from all the first-person 3D games that are all the rage. I do wish it were a little longer, and more of an open-world, but I guess you can’t have everything. However, it appears the modding tools are good, and there is already a good amount of user generated content available. Plus, a DLC campaign is slated for early next year. This game has my cyber-seal-of-approval.

Vernor Vinge - Rainbows End

I went into this book not knowing much. Well I heard it was set in the future, and was recommended on some internet forums. So that was enough to pique my interest. After listening to the 14+ hours of the audio-book, I’m not sure I can say I know anymore.

OK, I will be blunt. I don’t think I enjoyed this journey. It was not that it was badly written. Vernor Vinge seems like a competent writer. It’s just that the story did not grip me, nor were the characters particularly recognizable or likable. I mean, I was not expecting something on the level of Snow Crash, but I was hoping for at least a passable sci-fi novel. I came up short.

When I say the story was lacking, maybe I should be more specific. I am not sure what happened in this book. In fact, I am not even sure anything happened at all. Well, that’s not entirely true. I know the main character is some old geyser that gets out of the hospital and doesn’t know much about modern technology. And they have these wearable computer contact lenses. That part is actually kind of cool. So the beginning half of the book is about this old guy trying to get hip to the new tech, going to high school again, and stuff like that. There is dialogue with his family members. There is some hint of hackers. This is all vaguely interesting, but a real story never materializes. I guess I am used to books where you are hooked in from the first page. Don’t expect that here. I kept thinking to myself: “OK, this is going to get better.” but sadly it never does.

Granted, about 10 hours into the book finally something, and I mean anything, started to happen. Without any spoilers, the characters go on a dangerous mission together. However, if a book has to make the reader wait until the end for even a hint of excitement, they have failed. To make matters worse, the whole premise didn’t make much sense to me. Weak characters, weak story, really no reason for me to care.

I feel bad, actually, giving this book such a horrid review. I am usually pretty forgiving, and I did give this title and honest chance. Unfortunately it let me down and there is not much more to it then that. Not sure what other people were talking about when they recommending this book. I appreciate the effort but, sadly, the book doesn’t deliver.

Remember Me

Remember Me is an action-adventure title recently released by Capcom (developed by Dontnod). It is set in a futuristic Paris, and follows a “memory hunter” named Nilin. Basically, in the future people can erase (or alter) their memories, and there is a big evil corporation profiting off the situation. Nilin is part of the resistance, called Errorists, that fight the corporation.  Nilin starts the game with all her memories conveniently erased, and fights throughout the story to regain her past. An interesting premise, though you can tell the story borrows concepts from other popular science fiction. That said, it’s compelling enough to take you through the game.

Aside from the story, I found the locations and environments to be very detailed and well designed. The graphics are using the Unreal Engine 3, so there are no complaints there. I found the environment modelling to be top-notch, and loved the detail put into everything. A lot of the time, you will be running through the level quickly and even miss all the little things they modeled, like the inside of a shop you can’t even enter. They really went out of their way to flesh out this world. Although there is a lot of detail in the world, most of it is not interactive. You can climb on things, ledges, windows, etc. but only in pre-defined spots. So it’s not like you can go exploring the city any way you like. It’s very controlled and you really can only go on that one path.

One thing I loved about the game, beside being in the future (and I’m a sucker for the future), was that the main character was both female and black. Well actually, she was multi-racial, which may even be more edgy. This is a breath of fresh air from all the games that pit the savior of the world as a white male. So kudos for the developers for trying something different.

Probably the best part of the game is the memory remix scenes. Basically what you do is hack into someones brain and alter their memories. This can have interesting effects, like convincing a woman that her husband died and things like that. This then changes their actions in real-life. This is really an original concept, and was implemented flawlessly. During these sequences you can rewind and fast-forward, through a scene that could play for about a few minutes. During that time you can alter certain objects or actions in the scene to change the memory. Some scenes could have 5 or 6 different objects to interact with, which adds a lot of possible branches for the scene to go in. This is clearly the selling point of the game, and it’s nice to see the polish they put on this. Unfortunately there are not a lot of these memory remixes during the game. There are maybe only 3 or 4 scenes throughout the whole experience. Even so, they add a lot.

However, the game isn’t all praise. I found the combat to be somewhat clunky, and look me toward the end of the game before I got all the combos down solid. There is a system where you can customize your combos. This sounds cooler and deeper than it really is. Basically there are 2 attack buttons (one punch, one kick). There are also 3 or 4 pre-designed combo sequences. What you can control is the power and effect of each hit. So some attacks will refill your health, others will be more powerful, others will increase your cool-down (needed for special attacks). This is great, but I wish you could actually have adjusted the combos themselves, or had more control over the sequences. It’s not entirely broken, but the fighting could have been a lot more fluid. The part of the fighting I did like were the special moves, which are varied and all powerful. Some make you go berzerk, others allow you to turn enemies into bombs, another will make robots explode, another makes you invisible. Overall this adds a much needed interlude to the somewhat monotonous button mashing.

Of course, I was playing this in stereo 3D on a 100+ inch projector using the DDD TriDef driver and it worked well. Although there seemed to be parts of the game when the frame-rate chugged for a few seconds, overall the performance was good and the 3D looked nice. There were only a few small issues, like with real-time reflections, but overall support was good. I’m becoming more and more impressed with the DDD solution, and I was glad they had a profile for such a new title.

Overall, I was happy playing this game for the 12 hours it took to finish. I realize it wasn’t an A+ title, but I sort of knew that going in. If you are a sucker for futuristic sci-fi (like I am) then you will probably find something worth playing here. If you are looking for the next Assassin’s Creed, then you should probably look else-where. That said, I had fun with it.

3D Game Programming

Frank Luna’s DirectX series has been the go to book for DirectX development for many years. Although there are other great resources, Luna’s writing is both informative and approachable. The book also covers a broad range of topics from the basic lighting, texturing, and blending, to terrain rendering, normal and displacement mapping, geometry and compute shaders and more. He even tackles some tough topics like shadow mapping and ambient occlusion in a way that is understandable. Overall a lot of good material in a package that’s a bit under 900 pages.

The book assumes you have some knowledge of graphics and C++ programming, though it does go over some of the basics at the beginning. So you don’t need to be a graphics wizard to read this book, but you should at least have a firm grasp of C++ and some idea about 3D mathematics. Though you don’t need previous knowledge of DirectX. I had some experience with DirectX 9 going in, and I was still surprised about some of the changes with DirectX 11. Although the basic concepts are the same (using vertex and index buffers, for example), the code to accomplish things were very different in places.  That said, Luna’s style made even some of the denser code snippets manageable.

Luckily, the included samples did compile with only minor changes to the project properties. I purchased the Kindle e-book, but was able to download the samples from the website. Although I enjoyed the e-book, I will make note that many of the code snippets didn’t look great on the device. This is a common problem with programming books on the Kindle, where code that should be on one line spans multiple lines and makes a mess of the original print formatting. Unfortunately this book is not much better in that regard. Even so, I was still able to follow the code. I just wish more care would be taken with the formatting.

All in all, a great resource and should not be missed if you plan on writing a game or engine with DirectX 11.

3D Game Engine Architecture

In preparation for my 3D game engine, I have been trying to read all I can on 3D engine design and architecture. Although there are some good books out there, it’s very difficult to find a text that will walk you through everything you need to know. That said, 3D Game Engine Architecture: Engineering Real-Time Applications with Wild Magic by David H. Eberly gives it a good attempt.

The book covers the author’s Wild Magic engine, and discusses certain choices he made when developing the engine. It briefly touches on OpenGL, discusses abstracting away platform-specific details, 3D mathematics (and there is a lot of math in this book), an object system, scene-graphs, level of detail, render states, sorting, terrain, animation, collision detection, physics, and more. A lot of ground is covered in less than 800 pages.

However, I found much of the book difficult to follow and still feel like I could have a better picture of the “architecture” of an engine. When I think of “architecture” I think about a broad 500 foot view of a project. I think of flow charts or UML. I expect discussion on how all these disparate elements come together a form a whole. Sadly, that is mostly missing from this book. What the author provides is a good insight into his particular engine, and certain specific aspects of that engine. While this is still a great example to look at, I feel the text could have been more robust in terms of painting the big picture. Some of the things that I found missing were an event system, which seems crucial to an object-oriented engine, or a component architecture, really any type of  structure that allows communication between classes.

Additionally, I found myself getting lost multiple times while reading the book. The author would frequently put in dense mathematical equations and proofs, sometimes spanning multiple pages, and by the end you would be left to wonder what the purpose of the equation even was. I feel like having proofs of equations was not really relevant to the architecture, and surely there are many books on straight math if the reader needed that. Some math is necessary, of course, for a 3D engine but the space could have been used for more important topics.

Not really a jab at the book so much as it is the author’s coding conventions, I really did not like his style. I realize this is somewhat of a holy-war with programmers, but I guess we all have a style that is comfortable for us. Personally I found the author’s style to be really obtuse, and made reading the code snippets more difficult. For example, for a camera’s forward vector, he would use something like:


Where “m_” was a member variable, “p” is a pointer, “k” is of a class type, and “FVec” for forward vector. Personally I would use simply:


Just glancing through the code, which one is more apparent to what it is? This really bothered me to no end, but I guess you can chock it up to personal taste.

All-in-all it may sound like I am putting down on this book, but I actually did find it useful in a lot of ways. Certainly if you are aiming to create a 3D game engine from scratch, you will need any and all the help you can get. So yes, still read this book. However, I had much higher expectations and I feel it was a missed opportunity for the author. While it is still a decent resource, this should not be your first stop in engine development.

Game Coding Complete

Finally, I’ve got around to reading (and finishing) Game Coding Complete, and it’s up there on the list of great game development resources. I’d been meaning to read this book for quite some time, but got distracted with DirectX and Windows hooking for use with my 3D driver. Now that I’m back on the 3D engine kick, it seems like a good time to hit this book. Reading through this, I was thoroughly impressed by the content and the writing style. Don’t be discouraged by the lengthy size, this text is well worth the time to read.

The authors, both seasoned game developers, working on the Ultima series and various Sims games, have a lot of collective knowledge and it comes through in the book. There are a lot of snippets and stories about things the went right (or wrong) on the production of some of the games they worked on. I found these insights to be refreshing, and certainly interesting to read about. It also helps to teach people what professional game development is like, and things to expect if you are looking for a job in the industry.

Aside from the stories, there is a lot of topics covered in the book. They go over game loops, component architecture, process system, an event system, 3D math, DirectX, audio, collision and physics, scripting with Lua, AI, a game editor in C#, debugging, version control, multi-threading, etc. Really almost everything you would need to know. They weren’t joking when they said “Complete.” Although the book is long, it’s really amazing what they managed to cram in there. Granted, most topics only get one chapter, which isn’t really enough to fully cover everything. But it’s a great overview on a ton of stuff.

I found the coverage of the event and process system to be every insightful, and I will probably be using a variation of these in my own engine. The event system basically allows different objects to fire events at key points, and then have other objects respond without tight coupling. The process system allows objects to spawn logic loops, that will be updated along with the rest of the engine. So, for example, the player can hit a key to throw a grenade. That would fire an event, which would spawn a grenade with the proper velocity. The grenade itself would have a process, that would count down a few seconds and then explode. At the time of explosion, this could fire another event, which would then cause the audio system to play a sound and the particle engine to create a visual effect. This is a very clean way of handling events and processes, and this is probably the single more useful thing I found in the text.

If you are looking at creating your own game or engine, or just want to see what goes into a commercial title, Game Coding Complete may be one of the best resources to do so. While there is a good amount of C++ code in the book, it is not so much of a “cookbook”, it is more of an overview of architecture. The writing style is casual and friendly, and I really love all the stories told throughout the book. This is a great resource, and should not be missed. My only regret is that I did not read this book sooner. Highly recommended.

Unity 3x Essentials

I’ve been keeping tabs on Unity since back when it was a Mac only thing, and it sure has come a long way over the years. Even though I have downloaded and toyed with the program before, I hadn’t took the time to read a proper book on the engine. Now that I am having to work with Unity more for the job, I figured it was a good time to brush up on some knowledge. Although there are tons of Unity books out there, Unity 3.x Game Development Essentials seemed to have good reviews, and the price was right (only $16 for the Kindle e-book).

The book basically walks you through creating a dirt simple “game”, that you build up throughout the reading. Only the first chapter has a standalone demo to get your feet wet, the rest of the book is all one project. I found this format to work nicely, as you can concentrate on one aspect of the game design during each chapter but feel more accomplished as you built up the game. It covers creating a terrain, setting up a player controller, importing models, creating a GUI, collision detection, basic scripting to trigger events, and basically everything you would need for a simple demo. Although the game you build will not win any awards, it is functional and teaches some fundamental concepts.

What I will say is that the author did a bang-up job with the source code listings. There are tons of code snippets throughout the book and I found only one, yes one, mistake out of the whole thing. And, even then, it was a minor variable misnaming. Nothing major. This was a refreshing surprise, as many programming books are riddled with errors and non-compiling code. Bravo for that.

In general, though, I found this to be a very approachable book, even for a beginner. Of course, development experience doesn’t hurt, but it’s really not required for this text. The author clearly explains everything that is taught in the book and only at the end is some code glossed over (since it was already covered). I also liked how all the code is shown in both C# and Javascript, so the choice of language is up to the reader. Very nice.

The greatest part, I would say, is how far you can go with Unity itself in little time. I read this book in just one week and feel like I have covered more ground than I have with other engines spending *far* more time learning. So that just goes to show how solid the engine is. It’s not so much about the graphics of the engine, as it doesn’t really look any better than anything else out there. However the editor is very functional and very efficient. Especially nice is how you can create references to objects in the editor, greatly simplifying communication between different components. Overall I found it to be a great learning experience.

If you are just starting out with game development then this book is a great resource for learning the Unity engine. If you are already a developer but not familiar with Unity, this is also a great text. Granted, its not a very advanced book, so if you are already using Unity you can probably pass on it. That said, the book was very affordable and well worth the money in my opinion.