Overview

darkHAMMER Game Engine

Version 0.4.7 (pre-alpha)
http://www.hmrengine.com
http://www.bitbucket.org/sepul/dark-hammer

Description

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.

Installation

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
  • Supported compilers: Microsoft Visual studio (tested on 2010/2012), ICC on windows, GCC on linux, Clang on MacOS
  • 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: For Direct3D build under windows (June2010 or win8 SDK). link

Linux Requirements

  • Mesa GL libs: For GLX support (GLFW) compilation. (Package: mesa-libgl)

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 build system, 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://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, If this argument is empty, compiler will use default compiler paths (for ex. Windows sdk) to locate DirectX libraries and headers. If you want to provide directx sdk manually, 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
    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 (required).
  • --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

Additional MSVC2012 projects are maintained separately and included in /path/to/dark-hammer/src/msvc (for main builds) and /path/to/dark-hammer/3rdparty/msvc (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.
To build python modules, select Release_pybind from configurations and build. This will also copy the module files from the bin directory to /src/pymodules.

Media files

To run the test program (game-test), you should download media files for this build, and copy them into dark-hammer/test-data directory.

Issues

Some current known issues (help is very much appreciated):

  • Overriding window management doesn't work for Non-windows versions yet (app_init with wnd_override), This is (in part) because of glfw design flaw in decoupling window and context management.
  • OpenGL performance suffers, comparing to Direct3D implementation
  • Shadows in OSX (OpenGL 3.2) version is not working properly, not tested with Mavericks (GL4.2)

Questions?

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

Credits

  • Founder/Engine Developer: Sepehr Taghdisian (sep.tagh@gmail.com)
  • Tools Developer: Amin Valinejad (amin67v@hotmail), sharphammer
  • MacOSX port: Davide Bacchet (davide.bacchet@gmail.com)

This software is made possible by the following open-source projects:

  • Assimp: Open asset import library (link)
  • efsw: File system monitoring library (link (my fork))
  • nvtt: NVIDIA texture tools (link)
  • glfw: An OpenGL library (link) ([link - my fork)[https://github.com/septag/glfw])
  • ezxml: XML parsing library (link)
  • mongoose: Lightweight web server (link)
  • stb_image: Sean Barret's C image loading library (link)
  • lua: Embedded programming language (link)
  • gl3w: Simple OpenGL profile loading library (link)
  • cjson: C JSON library (link)
  • sfmt: SIMD - Mersenne twister random generator library (link)
  • miniz: mini-zlib (DEFLATE) Compression library (link)
  • Qt: Qt Application framework (link)
  • PyQt4: Qt4 Python bindings (link)
  • SWIG: C/C++ Binding generator tool (link)
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.