Habib Loew's Code Samples

A small sampling of my work in various languages

HomePrototypesGamesDemos

About the Samples

These samples are representative of my recent work. While I understand that it's common practice to "tidy up" code samples by improving commenting, etc. I want to be clear that these are unmodified samples of my code. My goal here is certainly to impress, but I also want to give potential employers an accurate idea of what sort of code I generate.

Stylistically I'm very flexible, both about my code and my comments. I believe the uniformity of style across a project is far more important than any specific style choices and I'm happy to conform to any easily readable standard.

 C/C++

Inverse Kinematics                (12/03/06)                           IKSample.cpp

    This is and aggregation of code that was used in Daredevil Zombie Hunter (DDZH) to implement the IK used when the giants needed to catch the player.  As DDZH never made it past the prototype stage this code was eventually shelved and hasn't been optimized or generalized much.  Still, it's  a relatively succinct implementation of IK using the Jacobian Transpose method.


EventManager                        (09/16/06)              EventManager.h/.cpp

   This is the event manager which is at the heart of my senior game project.  It uses double buffered event queues to dispatch evetns to any and all listeners which have subscribed to the event type.  This code is heavily influenced by various books I've read on game engine design and it has worked very well in my current project.

 

EffectManager                        (07/13/06)              EffectManager.h/.cpp

   This is a D3D effect manager I wrote as part of a personal graphics project.  The file and function header comments are designed for use with Doxygen.


 A* Pathfinder                          (10/20/05)                     Pathfinder.h/.cpp

   This is the A* pathfinder I wrote for my junior game project Fling.  It's designed to work on a grid rather than an arbitrary graph and contains several optimizations tailored to that environment.  Paths can be requested from the pathfinder via either a blocking or non-blocking request.  The pathfinder self limits its processing time and makes use of the networking engine to syncronize itself with the server and all clients.  The file and function header comments are designed for use with Doxygen.

 

 SpatialDatabase                     (10/13/05)            SpatialDatabase.h/.cpp

   This is a spatial database that was used in my junior game project Fling to keep all of the game objects organized for easy local lookups by the various agents and subsystems in the game.  The file and function header comments are designed for use with Doxygen.

C# 

 DNA                                          (04/03/06)                                     DNA.cs

   This was a simple DNA object used in a team project dealing with genetic algorithms.  In this case we were simulating evolving animals in an effort to develop a balanced ecosystem of critters for a (hypothetical) MMO style game world.

 Lua

 Event Compiler                      (09/25/06)                     EventCompiler.lua 

  The event compiler is a simple code generator I wrote for my senior game project at DigiPen.  We needed to generate events for use with our event system, but something like 90% of the code for each event was identical to all other events.  By using the EventCompiler the team was able to write only the unique code in a very simple file and have the actual event code generated, added to the build, and kept up to date for us.  As an example of the results of the EventCompiler, it turns the event entry in this file Game.events into Event_TentacleSmack.h/.cpp.   

Visual Studio Macros 

 Documentation                      (??/??/05)          DocumentationMacros.vb

  I end up rewriting these macros, at least a little bit, every time there's a new Visual Studio release.  As you can probably tell from the rest of my code samples I really like to have uniform, structured file and function header comments.  Normally these would be a pain to write, but with my macros they're easy.  The function header macros simply requires that I select the name of the function and run it, it then parses the function signature and generates the skeleton of a comment block for me.  It's not exactly awesome code, but it probably saves me more time and typing than any other piece of code I've written.