Tuesday, September 25, 2012

Rocketman - Best Game Of 2012

One of the funnest courses at École Polytechnique is definitely INF4715. Our goal for the semester was to design and implement our very own game based on a very open specification document. Also, this project was done in collaboration with the music departement of the University of Montreal.
Being with 3 other people who weren't very experienced in game development and had a much heavier course load than myself was quite the challenge. But all in all, I think I was able to lead my team well. We all learnt a lot in the process and ended up winning the grand prize. During said course, we had to implement a 2.5D Platformer (a 3D game that is played on a single plane). At first I was a little bummed out by the topic, but soon realized that with the amount of freedom we had, I could go ahead and give myself interesting challenges. Another constraint was that we had to use a specific, in-house engine (Vicuna) which had bugs and was far from being feature complete. This requirement was to replicate situations found in the industry where one can't necessarily choose or be familiar with the tools available. Due to my prior experience in much larger engines (at Ubisoft), getting familiar with this one wasn't much of a problem. During the first day of class, the teacher gave an example of technical achievements one could try and implement to distinguish our game from the others (as this was a competition). One of these was skinning, which he also said a lot of teams in the past had tried to implement, but none had succeeded. Challenge Accepted! After the first week I had a functional prototype with hardware skinning :) . During said project I implemented the following technical feats:
  • Volumetric Cloud Rendering
  • Hardware Skinning
  • Data-driven entity-component System with Reflection (used for instantiation)
  • Rebuilt the shader pipeline to support data-driven shaders and hot reloading
  • C++0x event system with lambda functions
  • Black-hole deformation shader
  • Parallax space background with infinite blinking stars (using simplex noise)
  • FMOD event-system integration
  • PhysX 3.1 Integration
  • updated Awesomium integration
As you can see, I'm quite passionate about systems engineering. I think I actually appreciated working on the engine more than on the game itself. It was a lot of fun having so much freedom.

Monday, September 24, 2012

Rocketman - Volumetric Clouds


Rocketman needed to have cool clouds. We were going to be on the edge of planets the whole time, there had to be a little bit of atmosphere around them! After quite a bit of searching, I felt as though the most bang for my buck was going to come from volumetric rendering. The ability to go into said clouds and see that they were actually variable density volumes and not just splatted textures was something I just couldn't get out of my head.


I started off by integrating a simplex noise algorithm in the given engine and using it to generate a VolumeTexture filled with said noise. After playing around with it in a small XNA Renderer I implemented just for toying around with the shader I was amazed by what noise could do! No wonder Ken Perlin got an academy award.

The cloud renderer worked as follows:
  1. Render the back faces of a simple cube mapped with uvw texcoords into a rendertarget

  1. Render the front faces of the same cube into another rendertarget

  1. Use those rendertargets in the next pass to cast rays from the front of the cube to the back specifying the iteration count with which to sample your cube texture and calculate the total density the ray traverses on said pixel.

I found a wonderful description of the previous steps on: Volume Rendering 101

Now for clouds that project shadows it's a little different.

To accomplish my cloud rendering I started by splitting the rendered cube into two halves to then be able to render my planets and characters inside of them. Also as the camera can enter the volume (which would cull the front faces of the cube and destroy our ray), I had to dynamically update the cube halves and texcoords so they would always stay in front of the camera clip plane, while never changing the look of the clouds.

Then using simplex noise harmonics, some simple transforms in time and space to make the clouds evolve and the equation of a sphere, I had some pretty cool clouds!





Also, since the engine already had shadow mapping implemented, I wanted my clouds to project shadows at a very low cost (since they were already quite expensive to render). I decided to do what any self respecting game developer would do! Cheat!


By projecting the noise found in the densest part of my clouds on my cube during the shadow pass I was able to approximate the shadows that my clouds would generate without actually calculating the density of said clouds. My technique was pretty raw, but it was dirt cheap, and gave great results.

We also used the clouds to add fog to our planet of death.

Tuesday, February 7, 2012

NextgenRacer 2, the revival - Intro


The objective of our third year term project was to add networking and integrate a mobile platform. The basic goals were to be able to race with your friends on LAN, have an administrative and chat interface on an iPAQ, and port the interface from Java and JNI to C# and P/Invoke (or C++ CLI).
We as a team decided to turn it up a notch with the following features:
  • a web client with real time player progress in races
  • full online play
  • data-driven entity component architecture
  • revamped rendering with Ogre3D (shadows, real time reflections, bump mapping, custom car colors, skid marks)
  • revamped physics with Bullet Physics
  • Python integration for scripting entities
  • Persistent player statistics.
  • Online gambling system in the web ui
  • 3D WPF ui blended with Native Rendering. (Using D3DImage)
  • and a couple more.

In the following posts I will describe most of these features in detail, but for now I will leave you with a set of cool screen shots :).