• Register

Hexterminate is a top-down shooter being developed for Windows, which puts the player in the role of an Imperial Captain with the mission of reclaiming a galaxy shattered by centuries of in-fighting.

Customise your ship to your liking, choosing from dozens of different modules, fight side by side with allied fleets and reunite the galaxy under Imperial rule.

  • View media
  • View media
  • View media
  • View media
  • View media
  • View media
Post article RSS Articles

Replacing Havok with Bullet

News

The issue

Most people involved in games development have likely heard of Havok Physics: a middleware solution which provides collision detection. HEXTERMINATE used Havok for a long time, as it was free for Windows even in commercial projects, as long as they didn’t sell over a certain threshold. However, the hobbyist version has stopped being distributed years ago and this caused some issues: more modern versions of Visual Studio weren’t supported (anything past VS2012) and most importantly, could the game still be shipped with it?

An open-source approach

The alternative chosen was to use the open-source library Bullet:

  • Conceptually similar: most of what HEXTERMINATE uses could be done in Bullet without massive refactoring.
  • Functionally equivalent: there were no holes in the feature list, everything I needed was present.
  • Permissive licence: the ZLIB licence puts essentially no restrictions on the game.
  • Source code available: I could republish the library binaries myself, getting me up and running in VS2017 quickly.
  • Linux support: although not something I have spent time on, Havok was the last library holding off multi-platform support.

Making it all work

Getting the basics up and running was fairly straightforward. What ended up taking up most of the time was that many places in the game’s code were using Havok’s maths library rather than GLM, which required some head scratching and debugging to make sure that it was all working. Most of it was fine, but swapped order of operations caught me off-guard a couple of times.

When a battle goes wrong, it can go really wrong.


In the end it was actually the smaller things that took the longest: getting callbacks with the required information for when two ships collide was non-trivial, as I needed information about which two modules were colliding, not just the parent “ships”. The other problem which took a while to figure out was that raycasts which return multiple results do not return results in an ordered fashion, so I was seeing odd behaviour with some weapons, e.g. a beam weapon being blocked by a shield but still damaging the module behind it.

Improved behaviour

Cylindrical shapes

In HEXTERMINATE, each ship is composed of a number of individual modules. Each module can be destroyed separately, so each ship’s physical hull is composed of a number of physics shapes. Historically these shapes have been spheres, as it is algorithmically much faster to calculate the collision between pairs of spheres than pairs of hexagons.

However, a problem that comes with the sphere approach is that it is possible for a projectile to go through two modules and hit the module behind them. It doesn’t happen very often, but because the outer modules are normally some sort of armour, when it does happen the player definitely notices.

The alternative was to use cylinders rather than spheres: still faster than hexagons and it prevents the frustrating projectile punch-through.

In red, the debug draw of the new collision shapes.


Bypassing shields

Shield modules generate the classic science-fiction bubble around a ship. Until the replacement of Havok with Bullet, the shield had to be disabled before the underlying ship took any damage. This had a few issues, such as making the choice of weapon less relevant, but more crucially this meant that the optimal way of building your ship was to put as many shield modules on it as you could.

Missiles now get through shields, so a missile interceptor might be a good choice.


A way to mitigate this was to make certain types of weapons to be able to bypass shields: missiles and torpedoes can now hit the underlying modules directly, making up for the fact that unlike other weapon types they can be intercepted. This worked very well and made some encounters more interesting after a few tweaks to the designs of certain ships.

No more ghost collisions

A long-standing bug had to do with the ships or projectiles colliding with something invisible. This was quite rare, but it was obvious that some of the physics collision shapes weren’t being properly deleted. Tiny memory leak aside, I was concerned this might lead to a memory stomp and crashes, as the parent ship no longer existed.


To help me track this down I’ve made use of Omar’s excellent imgui library to get some of required debug information on screen. In the end this was tracked down to the shields on ships: if the player left the sector, any ships which still had their shields up wouldn't remove the associated physics object correctly.

Other work

In addition to everything that was done to get the physics up and running, I've also received the assets for a some of the characters which the player will run into throughout the campaign:

Chrysamere


Aeria

Next steps

The game is now very much near completion. There are now two chunks of work remaining:

  1. Finish the campaign: the campaign leads the player through the galaxy, providing a direction to head towards without overly constraining the player’s liberty. It is about 80% completed, so the push is to finish the remaining couple of missions.
  2. Steam achievements: achievement support is already in place but not all achievements have been hooked yet, as some depend on the campaign.

You can find further updates in my own website ( pedro-nunes.net ) and in my Twitter.

Thanks for reading!

Devlog #14 - Trailer & Greenlight

Devlog #14 - Trailer & Greenlight

News 3 comments

HEXTERMINATE releases it's first trailer, showing both combat gameplay and ship construction. We've also landed on Steam Greenlight!

Devlog #13 - Ramming speed!

Devlog #13 - Ramming speed!

News 6 comments

Hexterminate is nearly feature complete for release! Today we take a look at some of the remaining perks as well as various improvements to the general...

Devlog #12 - Finish line in sight

Devlog #12 - Finish line in sight

News

It has been another busy month with Hexterminate, making good progress towards having a polished game for people to enjoy! We’re pretty much at the...

Devlog #11 - It's full of stars

Devlog #11 - It's full of stars

News

A look into the new dynamically generated stars, several final models for our modules and the brand new perk system. Several steps closer to release!

Comments  (0 - 10 of 18)
Goschty
Goschty

Hey its me again!

i just wondered, i currently only have a laptop and i wondered if the game will even run on it.

my System Specs(i know its no gaming hardware):

Operating system: Windows 10 64-bit

Prozessor: Intel Celeron N2940 at 1.83 GHz

RAM: 4 GB (3.88 usable)

Grafics Card: Intel HD Grafics Generation, 2015

Reply Good karma Bad karma+2 votes
PedroNunes Creator
PedroNunes

Hey GhostTaker! Sorry for the incredibly slow reply, I keep forgetting I don't get notifications for posts on this section (for some reason...).

I think it will run, I can't guarantee it though. I've run it on a couple of laptops with Intel cards and have had some success. Between EA and full release I'm hoping to re-write a part of the renderer which should allow the game to run at a decent speed even on lower end hardware.

Cheers.

Reply Good karma+3 votes
Goschty
Goschty

thanks!

Reply Good karma Bad karma+2 votes
Freemind357
Freemind357

looks awesome!

Reply Good karma Bad karma+2 votes
PedroNunes Creator
PedroNunes

Thank you!

Reply Good karma+2 votes
Goschty
Goschty

wehn you first relise the game how much will it cost or will it be for free?

Reply Good karma Bad karma+1 vote
PedroNunes Creator
PedroNunes

Hey GhostTaker! I haven't decided on the exact price point yet, but I'm looking at the £6-8 range :)

Reply Good karma+1 vote
Goschty
Goschty

i am sorry but waht is this symbol are these pounds?

Reply Good karma Bad karma+1 vote
PedroNunes Creator
PedroNunes

Sorry, yes, British Pound. Looking at Google for conversion.. about 7 to 9 euros or 7.80 to 10.30 dollars :)

Reply Good karma+1 vote
Goschty
Goschty

ok thanks.

( i am german so we have Euro ;) )

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Icon
HEXTERMINATE
Platforms
Windows
Publisher
STEAKSTEAK
Engine
Custom
Contact
Send Message
Release date
Game watch
Follow
Share
Style
Genre
Arcade
Theme
Sci-Fi
Players
Single Player
Project
Indie
Boxart
Boxart
Twitter

Latest tweets from @hextermination, @pnunes515

RT @include: 🤣🤣 T.co

Oct 21 2018 by pnunes515

RT @archillect: T.co

Oct 21 2018 by pnunes515

RT @RoyalPineapple: @WIRED @squaremum @BostonDynamics T.co

Oct 20 2018 by pnunes515

Erm. "oops?" T.co

Oct 18 2018 by pnunes515

RT @IndieDB: This development update for top-down space shooter Hexterminate details the process of removing Havok in favour of… T.co

Oct 11 2018 by hextermination

Oh, when Fleet Intel said "overwhelming", she meant it. Jump ooooooooooout >_< T.co

Sep 11 2018 by hextermination

Galaxy conquering temporarily suspended due to dentist appointment. Orbital bombardments to resume later today.

Sep 10 2018 by hextermination

Part of the challenge of making games as a hobby is that is very easy to come up with reasons for why X should be r… T.co

Sep 10 2018 by hextermination

Hexterminate's campaign has six different "arcs" which take the player through fighting all the various factions in… T.co

Sep 9 2018 by hextermination

RT @SHODAN_BOT: Join me, human, and we can rule together.

May 30 2018 by hextermination

Embed Buttons
Link to HEXTERMINATE by selecting a button and using the embed code provided more...
HEXTERMINATE
Statistics
Last Update
Watchers
76 members
Articles
16