dark-hammer /

The branch 'v0.4.6' does not exist.
Filename Size Date modified Message
100 B
1.3 KB
6.7 KB
1.4 KB
8.1 KB

Dark-Hammer Game Engine

Version 0.4.6 (pre-alpha)


Dark-Hammer is a light-weight, open-source, multi-platform game engine.
Engine itself is written in C programming language (following C99 standard), works with both OpenGL and Direct3D APIs.
Current supported platforms are Windows 7 with Direct3D 10 or higher capable graphics card, Linux Ubuntu 12 with OpenGL 3.3 or higher graphics card, MacOSX 10.8 (Mountain Lion) with OpenGL 3.2 or higher capable graphics card.


In order to compile and build the engine you'll need softwares below, to be installed on your system :

  • Mercurial (Hg) client: For pulling source from the server. link
  • C99 compatible compiler: Tested ICC 12 for windows (MSVC2013 should have C99 support too), GCC 2.6 for linux, and Clang 3.3 for OSX
  • Python 2.7: Used for many tools and waf build system. link
  • Physx 3.2 SDK: Physx is the primary physics SDK for the engine. link
  • Latest Graphics Drivers for your OS: nVIDIA or AMD drivers.

Windows Requirements

  • DirectX SDK June 2010: For Direct3D build under windows. link

Linux Requirements

  • X11 libs: For X11 window system (GLFW) compilation. (Package: xorg-dev)
  • Mesa GL libs: For GLX support (GLFW) compilation. (Package: libglu1-mesa-dev)

Additional (Not required)

  • SWIG: For rebuilding/modifying lua or python bindings. link
  • Python development libs: For linux (Package: python-dev)
  • PyQt4 for python 2.7: Used in many GUI tools. (Required for python tools) link

Preferred build system is waf which is a python based program, and is included in the source repo under /path/to/dark-hammer/var/waf/ directory.
To build with waf, make sure you have installed all above requirements, open up a command terminal , go to your desired directory and run these commands:

hg clone https://sepul@bitbucket.org/sepul/dark-hammer
cd dark-hammer
python var/waf/waf configure --physx_sdk=/path/to/physx_sdk  
python var/waf/waf  
python var/waf/waf install  

By default, these set of commands will find an appropreate compiler and build the code in release mode, then install the shared libraries, binaries in dark-hammer/bin and static libraries in dark-hammer/lib directory. You should also provide a valid path to Physx SDK root directory in --physx_sdk argument.

Debug build

For debug builds (which output files will have -dbg suffix), just add _debug to build and install commands:

python var/waf/waf build_debug  
python var/waf/waf install_debug  

Python module build

To build python module, add _pymodule to build and install commands:

python var/waf/waf build_pymodule
python var/waf/waf install_pymodule

This will build and install platform dependent engine python module files under [dark-hammer]/src/pymodules directory.
Note that you must install python development files for your OS, before building python module.

Additional Flags

These arguments can be used with configure command:

  • --dx_sdk=PATH: For windows and direct3d builds, this argument is also required. In that case, you should provide this argument as example:
    python var/waf/waf configure --physx_sdk=/path/to/physx_sdk --dx_sdk=/path/to/dx_sdk

  • If you want to change compilers, for example use 32bit ICC compiler on windows:
    python var/waf/waf configure --physx_sdk=/path/to/physx_sdk --dx_sdk=/path/to/dx_sdk --msvc_targets=ia32
    For more information and flags check out waf's documentation

  • --prefix=PREFIX_PATH: PREFIX_PATH can be a valid path which you want to install the build files, instead of default path.

  • --assert: Enables assertions in the build, recommended for debug builds.

  • --retail: Enables retail mode build, enables all retail optimizations.
  • --prompt: Prompts for sdk paths, if not provided by user in command line.
  • --gfxdevice=[D3D|GL]: Choose a valid rendering device (D3D or GL).
  • --physx_sdk=PATH: Path to Physx SDK root directory.
  • --profile: Enables profile build, which engine stores profiling information in runtime and can be connected via a browser through port 8888 for profiling information.

Visual Studio 2010

Additional MSVC2010 projects are maintained seperately and included in /path/to/dark-hammer/src/vs2010 (for main builds) and /path/to/dark-hammer/3rdparty/vs2010 (for 3rdparty library builds).
First you have to open the solution file for 3rdparty libraries and build them successfully. Then open main solution file and build those.
Unforetunately, prior to Visual Studio 2013, Microsoft has no support for C99 compilation, so if you are working with Visual studio 2012 and lower, you'll need to install C99 compatible compiler for windows like Intel Compiler (make sure you install the visual-studio addon too).

Note that you should also provide valid SDK paths for DirectX and Physx for your visual studio project. In case you don't know how, open visual studio, open main solution file, right click on engine project in Solution Explorer, Select Properties from drop-down menu, then go to Configuration Properties->VC++ Directories, Add DirectX and Physx include directory paths to Include Directories, and Library directory paths to Library Directories. You should do the same for h3dimport project if you want to build the importer tool too.


Some current known issues (help is very much appreciated): - Overriding window management doesn't work for Non-windows versions (app_init with wnd_override), This is (in part) because of glfw design flaw in decoupling window and context management.


If you have any questions, suggestions or bug reports, please post to developer's forum.


  • Engine Developer: Sepehr Taghdisian (sep.tagh@gmail.com)
  • Tools Developer: Amin Valinejad (amin67v@hotmail), sharphammer
  • MacOSX port and build tools: Davide Bacchet (davide.bacchet@gmail.com)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.