Space Salvager 1.4.2 – Part 1

Pictures!  Pictures galore!  Everyone loves screenshots, right?

Enemy Health Notifcation

One of the enhancements people were asking about at the Norwich Games Expo and GameCitySquared was “targeting” in combat.  Essentially, retaining who you’re shooting at because there can often me a number of enemies on screen and a number visible on your HUD.  Now, the enhancement here is two fold: inform the player of the targets health and inform the player who the target actually is.screenshot_0The former has been done, as shown above: when you shoot at enemy their health (shield, armour or hull – whichever has taken the damage) is displayed.  This works quite nicely and I feel doesn’t clutter things up too much, although I’m considering only showing it when the HUD is visible.  The former however I’m still unsure how to do.  I’m considering having the last person you shot flash on the HUD and perhaps introduce randomly generated names for pirates so you can identify them, displaying their names underneath the new health popup at the top.  If you have any suggestions please tell me or if you hate the changes so far that’s good to know too.

Celestial Objects in HUD

Another suggestion was a way to convey distance of objects in space (hey look, an episode of Firefly!), which resulted in changing the size of the arrows.  Seems like a simple idea right?  I hadn’t done it before because the original concept was that each type of celestial object would have a different size and colour arrow, but using both different sizes and colours is somewhat redundant as turns out.  The change of colour has been retained, but now as your approach the celestial object its arrow gets bigger, likewise when you retreat away it gets smaller.

screenshot_5The other change was the colours in general, because they really just didn’t work.  So now blue means jump gates, brown means asteroids, silver/grey means debris, green means stations and red means death pirates.

Collision Bounds

The last change of note for this post is the collision bounds.  Now, long long ago Space Salvager used “tight pixel” collision detection which was very expensive and didn’t really work.  During my final year at University one of the assignments we had was an investigation into game physics, specifically collision detection.  As with most things I thought this was a good opportunity to shove something new into Space Salvager, so I decided to implement SAT collision detection in.

screenshot_3Unfortunately much like the previous collision detection this didn’t really work either, but recently I’ve actually found out why and fixed it.  Short version: the two-dimensional polygon being created was based on a texture that was colour compressed and wasn’t returning the correct results – between you and I I’m surprised it didn’t crash the entire game.  Now though I have fixed it by rendering out the image into an uncompressed format.  Above shows the debug render where the yellow circle is the collision radius, clearly broken on the ship which I will fix (note added) and the purple wireframe shows the two-dimensions convex hull.  The result is a much, much more realistic collision detection and response.  The physics for the game have responded much better with working SAT collision now, it’s really nice.


That’s all for now, but there will be more.  I’m hoping to do a post every week about what’s coming in 1.4.2.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s