Saturday, April 9, 2016

X-Fire (2003)

I was recently encouraged to go back and look at a game I made with some uni friends in 2003.
Here I show it off and talk a bit about it.



You can try it out for your self here...


Back in the early 2000’s I was playing around with OpenGL and even managed to make a little racing game with uni mates called IdleTime. It just used light maps for the environments, and the cars had dynamic cube mapped reflections and stencil buffer shadows.


In 2001 I saw the first public showing of Doom 3 at Mac world.
https://youtu.be/Qj3dPyk7hPI
My mind was blown. I wanted to know how it was done. I remember thinking I may as well stop trying to be a graphics programmer because I'll never be able to do something like that.


Anyway, after much reading on every graphics forum I could find, I started to understand how it was done. I saved up my money and bought a GeForce-3 video card and started to play around with it.


Now, of course, the Doom 3 rendering pipeline is well documented. http://bfy.tw/5BfB
In fact you can even download the source code, so I won't go into how it works here. But once I had a little test bed running someone (I can’t remember who) had the idea to make a top down shooter where all the levels are made out of repeated tiles. So we got to work making it.


About a year later we had a demo of X-Fire.

Because all lights were dynamic we really wanted to show it off. We had swinging and flickering lights all around the levels, and a spot light attached to the end of the gun. Even the muzzle flash was a full light that cast shadows.


Every surface had a diffuse map, normal map and a monochrome specular mask. But the specular response was fixed. Looking back I wish I had a colour specular mask and a variable specular response. 

Also when I rendered the ambient pass I just used the diffuse texture. It would have been simple to use the normal map to look up into a cube map or something to stop it looking so flat in shadow. We got around this by having almost no ambient light, it helped with the ambiance anyway.

I should have had fill lights, cheaper lights that had no shadow or specular, so we could have filled in the darker spots in the level.



Game play wise, we only had one enemy type and two different weapons. Of course to turn this into a real game we would've had to expand on that. We had lots of ideas but we ran out of time to implement them.
Because of where the camera was you would potentially see enemy's in rooms that your character should not be able to see. But because there was almost no ambient light, most of the time to find an enemy you had to walk into a room and shine your light in there.


People kept asking us to add a first person mode. So we did, it was actually handy for debugging, allowing you to be able to get up close to problems. however, the game play and art was never designed for this and doesn't really hold up.

We did have two player co-op working over TCP-IP. It was a lot of fun. That's why there is another player character standing at the start of each level. If someone connects to your game, they control that player.


Because the levels were all tile based and Travis made us a nice tile set, we could make levels really quickly. Each level was just rearranging level pieces, so level load times where almost zero. I’m sure if we ever made a real game out of this we would have made more level sets of different environments. It would have been interesting to try and make an auto level generator, but we never had time. Plus it was a lot of fun making levels.

Because all the lighting was real time, you didn’t have to sit around waiting for levels to bake. You could edit levels live in the game. We didn’t hide this and encouraged people to snap pieces together and see what they could come up with.


Because all our lighting was dynamic all our geometry could be dynamic also. However, we never really exploited this. I always wanted to add physics objects to the game. It would have been cool to see objects get flung around the place as you unload your gun.

I would publish the source code, but its too embarrassing. The only thing anyone would learn is what NOT to do ;) But I'm happy to answer any questions about it.

Monday, August 12, 2013

AO good enough?

So here is the bounce lighting combined with the direct lighting.
Got to say I'm a little disappointed, after all that messing around I expected a lot more. There is some nice bounce lighting under the ships bridge coming off the deck. But apart from that it looks mostly like ambient occlusion.
I already have lots of ideas on how to make this better, but I'm keen to get back on to coding rift stuff. So this will have to do for now.

Wednesday, August 7, 2013

Lets bounce

Picked up a new GTX 770 so I felt the need to do some more GPU compute work. I had a go at computing some bounce lighting, this is what I've come up with so far. Its only one bounce and it takes about 24 hours to light 16384 X 16384 pixels. (Think I should stop blaming the hardware and write faster code). I think the sky maybe over influencing the final result. But we'll have to wait until I composite it in before we will know.


Thursday, February 28, 2013

Lawnmower man here we come

I have been reading and watching every thing I can on the Oculus Rift. I can't wait to get my hands (and eyes) on one.
But just because I have never seen one in the flesh doesn't mean I can't try and write code for it.

I had to guess at a lot of stereo properties, but hopefully I want give anyone a stroke.

If you check this video out on a head set please let me know how it looks. Am I even close?

Any way can't wait to play with the real thing, but until then I'll just have to dream.

Thursday, February 21, 2013

3D video test

Started playing around with capturing stereoscopic video and uploading it to YouTube. I used a VT with just AO in it because black and white looks a lot better when viewing with anaglyph glasses.

Looks like the video worked OK  But it doesn't work in HTML 5 mode, so I can't use my Nvidia glasses to view it.

Monday, February 4, 2013

Virtual Texture Demo 05

I have put another video of my Virtual Texture implementation up. This starts as a recap of what a Virtual Texture is then shows off my new decal system.