Unity is something I stumbled across a couple of years ago but never really got around to using, apart from poking at their own ‘tutorials’ (which aren’t really a great deal of help). These days there seems to be an awful lot of demand for games developers with experience in Unity, and on the advice of a friend I decided to take the plunge and give it a whirl.
After doing quite a bit of googling for Unity tutorials I realised that the majority of websites out there (the one’s you don’t have to pay for at least) seem to be absolutely useless. Eventually I came across this website which seemed to cut through all the crap that I didn’t need and just went through how to use Unity itself. After working my way through the first two tutorials, which give a nice introduction on how to use Unity, the third tutorial tasks you with building a simple infinite runner style game.
It’s been a while since I added anything, it has been a busy few months with job interviews & prep/revision taking up most of my time. However, a few weeks ago one of the guys I work with urged me to try Qt. Now I had heard of Qt before but not really looked into it & simply brushed it off as ‘something that Nokia used on their phones’. Needless to say, I was quite wrong
So off I trundled & downloaded the Qt SDK & Visual Studio 2010 plugin. At first I was just messing around making a form & playing with the controls that can be used on the form, then I had an idea on how I could use Qt for a ‘proper’ sample project. One of my assignments during the second year of University covered basic AI algorithms (Best-First, Dijkstra’s & A-Star). The idea was to implement the algorithms and in order to gain the higher end of the marking scheme, present them using a graphical representation, this was originally implemented using a pre-built learning engine developed by one of our senior lecturers. Using the Qt framework I decided to remake this assignment with a proper functional GUI using my own DirectX 11 framework.
The whole reason of getting sprite rendering up and running was so that I could make a small game. As I’m not exactly new to programming I thought I’d skip over the usual starting games of pong & breakout and start with something a little more involving and as one of my house-mates was already in process of creating a Tetris clone I thought I’d got for something different. Space Invaders.
Seeing as though I’ve been working on a rendering framework since the beginning of the year I thought it was about time I posted something about it. This is going to be a brief overview of what I’ve done so far with the more recent addition of sprite rendering, which I intend on using for a small game project soon.
So far I have created:
- A wrapper class for the DirectX 11 device & context.
- A templated container class which I use for storing the various objects that are used when rendering e.g.:
- Meshes & Submeshes.
- Textures etc.
- A scene class which has one of each of the containers above for the objects needed for that scene. The scene class will also be responsible for specific scene functionality, for example, the menu scene will be responsible for displaying the correct menu at the appropriate time.
- A render class, which is responsible for rendering scenes.
When using a traditional forward rendering approach to draw objects you will find yourself limited to a small number of lights being able to affect any one object at a time. This is because you are bound by the number of instructions that can be used in a single shader.
Deferred shading is one technique that can be used to overcome the limitations of a standard forward rendering system. It takes it name from the fact that no shading is performed during the first pass when the geometry is actually rendered: instead it is “deferred” to a second pass.