« Enable Visual Studio Intellisense for DocBook | Main | Rendering an in-memory Graphviz image with C# »
Sunday
Dec272009

Valve Map Format Utility Library v1.0 Released

Valve Software's Source Engine uses a level editor called Hammer. The files produced by Hammer are in the Valve Map Format (VMF), which are simply text files that define the structure of a map. This file gets passed to a BSP (Binary Space Partitioning) compiler that builds the final product.

A little side project of mine called for a library that could parse VMF files and read the interactive parts of a Source Engine map. So, I built one. The result is the VMF Utility Library. It includes a complete parser, writer, object graph, and special classes for common VMF data types (such as color and vertex). The library is open source and includes documentation, along with a Getting Started tutorial.

I haven't put this one up on CodePlex yet, but you can download it directly (ZIP, 200kb).

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (3)

Fantastic work. I've been thinking about writing an alternative to Hammer in C# to overcome its various issues but the VMF parsing put me off; if this is as awesome as I hope it is, you are a godsend.

May 4, 2010 | Unregistered CommenterNacimota

Thanks for the comment! Admittedly, this is the first time I've written a parser from scratch, so I'm sure it can be done better. For example, there's a bug that causes it to choke when a space doesn't exist between a section name and its opening brace. It should get you started on a path to doing it correctly, though. I didn't end up needing a VMF parser as much as I thought I would, so I'm not sure if this will be updated any further.

May 4, 2010 | Registered CommenterDavid Brown

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>