Monday, May 16, 2011

Falloff and Avatars

Yesterday's coding resulted in:
  • Finishing the geometry for all useful maze cells (I decided to skip the completely enclosed cell, as you can't get inside it anyway...)
  • Tweaking the normal map for a texture to make it look more totally awesome
  • Adjusting the shader to implement light falloff (things that are farther away appear dimmer according to the Inverse-Square Law)
  • Making the maze walls "work" (not allowing the player to move through the walls)
  • Putting a You-Are-Here blip on a 2D map view
  • Putting the first NPC avatar into the maze
I also decided to have a little fun, and make the NPC avatar dance when the player enters the same cell.  A sort of "yay, you found me!" dance.

While I was at it, I also discovered that the class I've created to implement a camera with Yaw/Pitch/Roll controls has a bug that I cannot seem to chase down.  Adjusting the Yaw parameter sometimes leads to a slowdown in the game.  Actually, I'm not sure the camera class is to blame yet, but it seems a prime suspect.

I also had some fun with rendering.  I added some code to generate an anaglyph stereo image.  Of course it means the colors get distorted, but the effect is pretty exciting.  Unfortunately, the method I've chosen for actually rendering an anaglyph is very time-consuming (because it involves resolving two render targets, which are expensive operations) and blows the framerate to heck. Ah well, the price of coolness.  I'll figure out a way to optimize it if I decide to put it in the finished version.

Anyway, all of this adds up to one very excited Brian!  Nothing like learning new things and making stuff work to really fuel the fire of determination.

No comments:

Post a Comment