Archive for the 'Prototyping' Category

Fun with Haskell

Saturday, October 22nd, 2011

Haskell is a great programming language and I have a lot of fun programming in it. I’ve been working fiddling around with a simple prototype for a board-game style game (more details on that later) and was figuring out how to draw a line connecting some positions on the game board. Specifically, I needed to […]

Functional Refactoring in C++

Sunday, July 11th, 2010

Consider the following C++ code snippet: bool UNIVERSE::Initialize(const std::string & assetpath, const std::string & shippath, const std::string & behaviorpath, MODELMANAGER & modelmanager, std::ostream & info_output, std::ostream & error_output){ if (LoadAssets(assetpath, modelmanager, error_output)) { info_output << "Loaded universe assets successfully" << std::endl; } else { error_output << "Error loading universe assets" << std::endl; return false; }  […]

Simple physics library

Saturday, July 18th, 2009

I have bundled up the rigid body physics engine from VDrift into the joerigidbody library.  This is a simple C++ rigid body physics library.  See the link above for more info.

joeserialize: a simple C++ serialization library

Wednesday, April 15th, 2009

I wrote a simple, one-header serialization library and put it online here. The library allows you to load and save the state of a C++ object to a file, and comes with example text and binary formats.

Numerical Integration

Saturday, April 4th, 2009

I updated the VDrift wiki with a new analysis of various numerical integration methods. It provides some justification for using lower order integrators such as the Euler method.

Standard C++ algorithm and functional headers

Tuesday, November 25th, 2008

I’ve found joy in the standard C++ algorithm and functional headers. I finally found a nice, neat way to iterate through a container calling a specific function on all elements of the container! I used to do this sort of thing everywhere in my code: for (std::list <ROADSTRIP>::iterator i = roads.begin(); i != roads.end(); i++) […]

C++ Reseatable Reference

Friday, November 14th, 2008

After reading this article and being inspired, I decided to write a simple “reseatable_reference” class that’s sort of like boost::weak_ptr but lighter weight. The idea is that I often use pointers as reseatable references, since in C++ references cannot be reseated. So I created a reseatable_references class that’s basically a wrapper around a pointer but […]

C++ Optional Return Values

Friday, November 14th, 2008

After reading this article and being inspired, I decided to write a simple “optional” class that’s similar to boost::optional but lighter weight.  The idea is that often I write functions which should return a value but which might not have a value to return — and for those cases, I should be able to specify […]

Logging using ostream and streambuf

Saturday, October 11th, 2008

I architected all of my subsystems in the VDrift refactor to receive ostream objects that they use to output logging information/errors. This is convenient because it keeps all of my subsystems independent from a central logging class; all they have to know about is std::ostream. Of course, to get any advanced functionality out of this […]

Screenspace depth-based contast enhancement effect

Saturday, October 11th, 2008

I spent a little bit of time with the VDrift refactor code implementing this effect: It’s kind of like a cheap version of the Crysis SSAO that isn’t very convincing as AO, but when it’s applied lightly makes for a good improvement in apparent image quality.  The improvement is especially noticeable with flat-shaded objects.  […]

Dev Journal and Project Hosting