I will start by saying this book is game programming GOLD! Whether you are a pro or a novice looking to learn, this book deserves to place on your shelf (or I guess in memory if you buy the e-book). While some of the chapters may seem like obvious things for people that have programmed games before, I think even advanced coders will discover a few things they didn’t know. So let me talk about what this book is. Basically it covers common challenges in game programming and some useful ways of resolving the problem. Though the theme of the book is game development, a lotRead More →

This book could be called “Everything You Ever Wanted to Ask About C++ and a Whole Bunch of Other Stuff You Had No Clue You Didn’t Know.” It really is the most comprehensive book I’ve seen on C++ and covers just about everything you will need to know (and maybe some more). That’s not surprising, as the book is some 1,300+ pages long. And, of course, it’s written by the creator of C++, so I would guess he knows a thing or two about the language. The C++ Programming Language by Bjarne Stroustrup does cover all the major aspects of C++, but to name a few of the topicsRead More →

  It’s been some time since the last 3D engine update, but I’m still sticking with it. Currently I am working on getting a physics engine implemented. The video you see above is the first glimpse of this custom physics engine. Obviously it’s ultra basic right now, but it’s a start. The algorithm is based on a verlet integrator, and the code is running using DirectCompute on the GPU. To be honest, it’s pretty hacked together right now, and the bounds/bouncing behavior is hard-coded. But, hey, it’s something! I also tweaked the style of the demo to more closely align with other demos from researchersRead More →

While I implemented frustum culling a little while ago, I never actually coded a proper bounding volume. For the  bounding test I was using a sphere, but I just set the radius to some hard-coded value. This was fine when I just had a bunch of similar sized cubes on screen, however it broke apart once I started getting varied models imported. This week I decided to do something about it. After a quick Google search for bounding spheres, I ended up on Wikipedia. There was some good information there regarding minimal bounding spheres (also known as smallest enclosing ball or minimal enclosing ball), andRead More →

  After struggling for a bit with the shadow mapping implementation, I finally have something presentable. I followed a tutorial from Microsoft and thought I understood what was happening. However, it required a lot of changes in the rendering code and it took a little while to get things working. Even once it was somewhat functional, I still had some issues with what they call shadow acne. It seemed really bad on the self-shadowing side of objects. I tried tweaking all the values I could (i.e. the bias in the shader), but I was not able to get it to look right. Finally I justRead More →

In this review, I will discuss my experience with Game Physics Engine Development: How to Build a Robust Commercial-Grade Physics Engine for your Game by Ian Millington. This is actually the first book I’ve ever read solely on game physics and I think I made the right choice here. Although I have developed several physics engines previously, they were only in 2D and the extra dimension complicates matters significantly. Game Physics Engine Development is a book specifically about 3D game physics, though the author does make a short reference to 2D physics at the end. I felt like the book had just enough math to explainRead More →

  After a few days of hacking away at the code, I’ve got a new video up. In this update I have added normal mapping and specular lighting. I did have a few set-backs while working on the shaders, and it was made even more difficult since I was basically “flying blind” without a debugger. It seems that the Express version of Visual Studio does not support shader debugging, and neither does Nvidia’s debugger tool. Very sad, and I may (at some point) have to upgrade to the Pro version. I’ll probably hold out for a little bit, and I did end up figuring theRead More →

  Spent the last couple days adding in skybox support into the engine. Currently it’s a little hard-coded, but it does seem to be working well. I also bumped the field of view (FOV) up to 90 (from 45) so you can see more of the sky. I wanted to make sure I was only using my own artwork for this engine demo. Unfortunately, it would have been rather difficult to take panoramic photos myself. So I generated the sky texture using Terragen. Somewhat of a cheat, but I did technically “create” it myself, so I can live with that. Ran into one issue that hadRead More →

  While getting models loaded was pretty exciting, I ended up dealing with major load times on the demo. Granted, my XML parsing code is probably slow as all hell, but I don’t think COLLADA is really designed for real-time engine use. With simple plane and cube shapes the loading wasn’t that bad, but with my soda can model (around 600 triangles) the loading was nearing 10 seconds (totally unacceptable). I can only imagine what would happen with a really complex model. Something had to be done. So I decided to switch to a binary format with basically only exactly what I needed to pumpRead More →

What you see above is a custom model I made in 3ds Max, exported as a COLLADA *.dae file, and imported into my DirectX engine. I figured I’d start with something simple, like a soda can, and I plan to make a lot more models going forward. Although I hadn’t touched Max in years, I found it to be a comfortable experience and was able to put the model together in a few hours. Now, actually getting that model into DirectX was a different story. First off, the COLLADA documentation is vast, but they fail to explain basic things about the format. The examples theyRead More →