Making a game like Auxnet has been a very daunting and tiring task. I work on a team; however, I'm the only programmer. Making such a game alone wouldn't be possible unless I used various libraries and APIs. I guess it would be possible, but it would have tripled the amount of time spent. In this series of blog post, I'll examine some of the middleware that I used to create the game. I'll examine them by considering the following questions:
- What is it?
- How do I use it in the game / engine?
- Why did I choose it?
- What are my future plans?
What is it?
Quick disclaimer. In this post, when I say Direct X, I'm actually just refering to Direct 3D. Direct X is the Windows graphics API that I decided to use. Direct X provides an interface that allows me to use the various features of the graphics card. Using HLSL(High-Level Shader Language), it's possible to write per vertex and per pixel programs to create many interesting effects.
Why did I choose it?
I have intention of starting a Direct X / Open GL debate. I've honestly never used Open GL. I decided on Direct X because it was created by Microsoft, and the only platform that I currently support is Windows and with MSDN and all of the Direct X samples included with the Direct X SDK, it was easy to start with. At first, I only supported Direct X 9, but now the game/engine also supports Direct X 11. I've developed a multiplatform framework that I hope will allow me to expand to other operating systems and using Open GL in the future, but for now, I just want to finish the game so I'm sticking with Direct X until the game has been completed.
How do I use it in the game / engine?
I use Direct X for all of my rendering. I've written two frameworks that sit on top of Direct X. One is very high level and uses handles to refer to resources. The other is much closer to the API. This has been working well, but as I've been coding, I've been realizing the benefits of the higher level framework and am considering phasing out the lower-level API-like framework and just and work on making the higher-level version faster. The higher-level framework is built on top of the lower-level stuff so I feel like I'll be able to eliminate a lot of code the and make it faster by just have the higher-level framework directly access the API. I'll continue to experiment with this and make a final decision after this game has been completed. No more major engine changes unless they are 100 percent needed to complete the project.
I make extensive use of HLSL shaders and created my own material system that uses different shader techniques and texture maps to make various effects. Most surfaces use 3 textures--diffuse, normal, effects. The effects texture contains extra per-pixel information for things such as glow and specular. Models are rendered in order based on their shader and texture combination to reduce changing the texture. Translucent things are rendered in a second past using a z-sorted order.
What are my future plans?
There are quite a few graphical features that I'd love to add. I've been doing a lot of reading on deferred rendering systems and feel that I'd be able to get a lot of interesting lighting effects with it, but shadows are what's actually high on my todo list. I'd also like to add more support for other kinds of visual effects like electricity, smoke, and other particle effects.
To follow the project here on Gamedev, you can visit here http://www.gamedev.net/page/indie/project.html/_/action/auxnet-battlegrounds-r18
You can also follow the project on Youtube here: http://www.youtube.com/channel/UC-QAiqVnw6nVrFzW__fZeeA
Google+ Gallery: https://plus.google.com/112888538773179540556/posts/DAQhfYqUMyH