It’s been a while that I’m experimenting with RaspberryPI device.
I have also started a child project from darkHAMMER which is called darkHAMMER-lite. As the name suggests, it is a lite version of darkHAMMER engine which includes GL-ES only graphics API and runs on ARM devices (including RaspberryPI).
Currently I’m porting the engine’s 2D only stuff to it, and test it on raspberry, and so far it’s been a lot of fun. On this state, the engine supports 2D primitive drawing (2d canvas, rectangles, gradients, lines, alpha blending and bitmaps), multi-threaded texture loading (png, jpg, dds, gif, tga), Direct drawing (no need for X11), direct input device enumeration and usage.
I’ll open the repo on github as soon as It’s more polished
In: Misc, News, RaspberryPI · Tagged with: 2d graphics, OpenGL-ES, RaspberryPI
Moving to GitHub
I have moved the project to github in order to benefit from greater community and also change the source control to git, so here is the link
Current version is 0.5.0 which brings up multiple improvements over previous one:
- Multithread task manager: Engine now includes a custom multi-threaded task manager as it’s core component
- Background loading: Every object in the engine, including models, physics, textures, scripts and animations can now be loaded in background.
- Updated animation controller: Animation controller is now more matured and bug fixed, it currently needs some more features like root motion and events. But it currently works ok with sharphammer’s DarkMotion tool.
- Build system overhaul: Build system is completely rewritten in order to be cleaner and better support for other platforms like linux.
- Python tools rewrite: Python bindings and tools (some tools still incomplete) are rewritten from scratch, python bindings are now using ctypes, and is now much more cleaner and pythonic, they also doesn’t need python module binary to be built.
- Sharphammer updates: Sharphammer also has many new updates, like more complete bindings for C# and more features for DarkMotion tool, which can now practically used to create animation controllers.
Here’s an example of what python code looks now, this snippet initializes the engine and a scene, and loads a camera and couple of objects (a ground and a soldier with animation controller) into the scene:
from dhcore import * from dheng import * Core.init() Log().console_output = True conf = Config() conf.engine_flags |= EngFlags.DEV | EngFlags.CONSOLE try: Engine.init('test', conf) except: dhlog.Log.fatal(Errors.last_error()) else: testdata_path = os.path.join(Engine.get_share_dir(), 'test-data') FileIO.add_virtual_path(testdata_path) s = Scene('main') s.activate() obj = s.create_object('main_cam', GameObject.Type.CAMERA) obj.add_behavior(OrbitCam(), 'cam') obj.camera.active = True obj.transform.position = Vec3(0, 5, 0) obj.get_behavior('cam').target = Vec3(0, 1, 0) obj = s.create_object('ground', GameObject.Type.MODEL) obj.model.filepath = 'plane.h3dm' obj = s.create_object('soldier', GameObject.Type.MODEL) obj.model.filepath = 'soldier.h3dm' obj.add_component('animator') obj.animator.filepath = 'controller1.json' Engine.run() s.destroy() Engine.release() del conf Core.release()
In: Core Design, Gameplay, Misc, Tools · Tagged with: background loading, github, multi-thread, python bindings
Version 0.4.7 is finished and merged with the tip. The next milestone will be version 0.5
Here’s some changes from 0.4.0:
- Animation: Engine now supports animations, hierarchical or skeletal, animations can now be binded to models and there’s also a component for that purpose.
- Character Animation: Support for character animation is finished (via animchar component), we are still waiting for better test models and animations to test our system. Animation editor tool (something like Unity’s Meckanim), is nearly done and in the final works. I guess we’ll finish and test it till version 0.5
- Hardware Instanced skinning: Skinned meshes can be rendered automatically with hardware skinning just like normal non-skinned meshes.
- Clip edit, model preview: h3dimport-gui tool now includes a model preview and clip editor.
- Documentation: Documents are initiated, I’ve made a new tool called pymdWiki , which eased a lot of wiki and documentation writing, I’ll write more in next iterations, here is the link.
- Tutorials: Initiated and added two tutorials, you can find them in /tutorials directory, their documents are also available in docs.
- Triggers: Support for triggers (and use them in script) is added
- MacOS Support: It now supports MacOS mountaine lion and up. thanks to Davide Bacchet for his constribution
- Waf build system: We had a discussion with Davide about ditching CMake and we finally did it. Currently the engine builds with waf on all supported platforms, and supports MSVC, GCC and Clang compilers.
- MSVC compatible: As you may know, the project was written with C99 standards, and MSVC2012 and lower compilers couldn’t compile it, so I had to use ICC, which raised a lot of problems for me, so I decided to ditch it and make the code compatible with CPP compiler such as MSVC2012.
- GLFW: GLFW library is integrated for OpenGL support, and ditched my previous method of GL Context management
- Attachments: Engine now supports Attach Docks and Attachment (via attachdock and attachment components), that non-physics objects can be attached together. For physics object I have to implement joints in the next version.
- Unified application interface: Previous application interfaces sucked, because there were a lot of platform dependent interfaces that you couldn’t write an app for all platforms with the same interface. But I’ve re-written the whole thing and now it supports all platforms with the same app interface.
- Physics data import: Engine now supports full rigid-body physics data, that can be imported from Physx3 plugins. Now the h3dimport tool supports importing of rigid bodies and their shapes with automatic baking (convex/triangle-mesh)
In the next version, I’ll be focusing on polishing and testing character animation controller, Physics joints, Initiating multi-threaded task manager and moving some workload (including loading resources) to other threads, A flexible GUI system and improving the lighting system.
In: News · Tagged with: animation, attachments, character animation, glfw, hardware instanced skinning, physx data import, triggers, waf
It’s been a while that I haven’t updated the blog. For couple of months, we have been busy with other projects and bunch of other stuff, including me. But for the last 2 months we’ve been working on the engine again and it’s going pretty well.
I’m currently working on the branch 0.4.7, which brings alot of changes, the most important one is engine’s Character Animation System which we are reaching it’s first release. I’m developing the engine side coding and Amin is working on the Animation editor tool and .NET wrapper (Which is another open source project itself). The system roughly mimics the Unity’s awesome Mecanim tool.
I’m also preparing a wiki and couple of tutorials, and update the reference docs. Hopefully branch 0.4.7 will be finished within a week or two. So until then, so long …
It’s becoming ALIVE!
Good news, the project is rolling to version 0.4.6 and becoming more alive …
It’s no one man project anymore, we now have two more developers contributing to the project:
- Amin Valinejad (tools developer): Designed this awesome animation tool (see below), we are currently designing and implementing animation system (which will be released in v0.5). He is also the founder of sharphammer project, which is a collection of software (including editors and tools) and C# bindings for dark-hammer engine.
- Davide Bacchet (OSX port/build tools): Davide liked the engine at this early stage and decided to contribute to the project by porting the current version to OSX, we also worked together to apply more multi-platform changes and implement the awesome waf build scripts, which he introduced to me. The engine currently runs on Windows, OSX and Linux platforms and can be compiled easily with a single script on all platforms (supported compilers are GCC, ICC and Clang).
The new website for the engine is also up, check it out.
Initial physics test
Physics sub-system is setup and integrated in the engine, I have integrated nVIDIA’s physx 3.2 sdk into the engine. It is abstracted as phx_device, So in the future, 3rdparty physics could be replaced if necessary. Currently the basic rigid body is implemented. By importing Physx data files (RepX) (which can be used for other physics engines as well), all shapes including cooking of triangle/convex meshes with their transform, properties, etc. are supported.
In the video, you’ll see two scenes, first scene is rigid-body soup which dozen of rigid bodies are spawned and the script do random impulses to object (well, to make it look more chaotic). Second one is a domino effect scene which simulates a spiral domino scene.
In: News, Physics · Tagged with: physics, Physx, rigid body
I’ve finished working version 0.4.0 of the engine, in this iteration, I mainly focused on rendering optimization methods.
Whats new ? :
- Occlusing culling: software occlusion culling optimized with SSE instructions (no binning, multi-threading yet).
- Uniform Grid Space Partitioning
- Discrete LODs: Definable using JSON data and LOD schemes
- Hot-Loading: Hot-loading and automatic import of all current resources, which are animation files, models, scripts and textures.
- Lua script system overhaul: Different design changes, performance improvements and timer events.
- Python Bindings: Initialized python bindings, now engine can be programmed in python. I mainly will use this feature for tools/editor development.
- Physcally based lighting
In the current demo, I stress tested with a lua script by calculating path movement of 150 objects in the scene, which should be handled by engine’s animation system in the future.
The binaries (for windows) can be downloaded at:
I have also uploaded a new video demonstrating web-based profiler and memory monitor tool:
In: News · Tagged with: hot-loading, occlusion culling, python game engine, Scene management, script system
Content creation and hot-loading
What this video demonstrating dark-hammer’s immediate content update and hot-loading capabilities.
Currently, resource manager implements hot-loading for all resource types like, models, textures,animations and scripts. h3dimport-gui tool is also updated with hot-loading. so there will be automatic mesh import/texture compression whenever anything changes in modeler/photoshop.
Direct link: http://www.youtube.com/watch?v=exOkFoyiCb0
I’ve published the first documentation for API reference:
It’s still very incomplete, I’ll improve it overtime, and right now, don’t have much time for docs.
Core library: http://hmrengine.com/docs/core/html/
Engine Library: http://hmrengine.com/docs/engine/html/
Software occlusion culling
Here’s a video that Demostrates software occlusion culling technique, and simple space partitioning implementation in dark-hammer engine v0.3.5:
Direct link: http://www.youtube.com/watch?v=Onvsn-N7Ruk