Background and Developers

After waking up a mysterious island with no recollection of how you arrived, you are driven by the basic human instinct to survive. Gather resources, build shelter and live off the land. Tame animals and explore the island. Hunt or be hunted. But most importantly: Survive. However you can.

Wilderness is an open world survival game in development by Dark Window Studios, a dedicated team of developers based in the UK. It is being developed on the flexible and powerful Unity3d game engine with tools like Photoshop, Blender and MakeHuman. Wilderness is planned for a Steam Greenlight in late 2017, with Steam Early Access following soon. Check back regularly for updates and changes. Welcome to the Wilderness.


These individuals have backed Wilderness from very early stages of development. Without them, Wilderness wouldn't be possible.

  • A. Dermont
  • J. Prescott
  • A. Shaz
  • S. Bramwell
  • P. Steane
  • I. Ahmed


Preorder is now availiable via the Humble Bundle Store. However, before purchasing, remember that this game is in Early Access and that this current state does in no way represent the final product. There will be unpolished features, bugs (minor and game-breaking), many minor updates and potentially game-changing updates. If you are not happy with this, then please wait until the game is out of Early Access.

Humble Bundle

Steam Store

Web Links

Website, Facebook, Twitter, Reddit, Forum, Trello Roadmap, Steam, Presskit

© Dark Window Studios Ltd. 2015-2016, All Rights Reserved

  • View media
  • View media
  • View media
  • View media
  • View media
  • View media
RSS feed Articles

Bullet Penetration

Feature 0 comments


Bullet penetration is something that is very common in today's AAA games. However, it isn't as common in Indie games as it should be. Settings up a basic system, like the one we use, took about a week and a half, but the result is another layer of immersion and realism. The idea of having bullet penetration may seem like a very complicated subject, having to take many values into account, such as bullet velocity and damage, but thanks to Unity, it can be a lot easier than first anticipated. For our approach, we decided to use raycasting but there are other approaches, such as particle systems.

Bullet Penetration (5.56x45)

As this picture shows, the bullet has declining damage and velocity, which is indicated in the colour strength (Green being high velocity/damage, Red being low velocity/damage). As the bullet passes through each material, the velocity is reduced depending on the material. Here is a comparison of a 9x19mm bullet vs. a 5.56x45mm bullet.

9x19mm Parabellum bullet:

9mm Bullet Penetration

5.56x45mm NATO bullet:

Island 01 11 2016 15 21 screensh

The 9mm bullet fails to punch through two layers of wood, but the 5.56mm bullet powers on through more than 5 layers.

How we did it:

Lets get right into it. Before programming a solution, we needed to set up tags. We already set up a few named "Wood", "Concrete", "Water", ect. for differentiating our footsteps on different materials. However, we want more precise control over material penetration, so we set up a few more tags named "WoodThin", "WoodThick", "ConcreteThin", "ConcreteThick", "MetalThin", "MetalThick" so we could have different penetration values for the same material. We originally looked into calculating the mesh width at that particular angle, but it wasn't practical for runtime. However, Unity has very handy function named Physics.RaycastAll. This sends a ray through all objects for a specified range, logging each collider hit.

Ray ray = new Ray(cam.position, direction);
RaycastHit[] hits = Physics.RaycastAll(ray, 1000.0f);

This returns an array of RaycastHits, a struct that contains information about the hit point and collider that was hit. We can then loop through each of the hits and check information from them.

foreach (RaycastHit hit in hits)
     if (hit.collider.tag.ToLower() == "dirt")
          // Do stuff here

This is an easy way to loop through the hits and check information. However, we need to record the bullet's current velocity and damage. We just do this via two floats, currentDamage and currentVelocity.

float currentVelocity = 1f;
float currentDamge = 1f;

To simply things, we made a data class named BulletPenetrationStats. This class has a simple constructor, taking in the tag name as a string, bullet damage reduction value, bullet force reduction value and a minimum velocity to penetrate value.

private class BulletPenetrationStats
     public string m_sTag;
     public float m_fDamageReduction;
     public float m_fVelocityReduction;
     public float m_fMinimumPenetrateForce;

     public BulletPenetrationStats (string tag, float damageReduction, float velocityReduction, float minPenetrationForce)
          m_sTag = tag;
          m_fDamageReduction = damageReduction;
          m_fVelocityReduction = velocityReduction;
          m_fMinimumPenetrateForce = minPenetrationForce;

Earlier in our weapon script, we can declare a private array of variables for each kind of bullet we want, like 9mm High Velocity or 9mm Armour Piercing. For the moment, we just have 9x19 and 5.56x45 rounds balanced and in-game.

private BulletPenetrationStats[] nineMilimetreRoundStats = new BulletPenetrationStats {
    new BulletPenetrationStats ("WoodThin", 0.2f, 0.1f, 0f),
    new BulletPenetrationStats ("Wood", 0.4f, 0.4f, 0.2f),
    new BulletPenetrationStats ("WoodThick", 0.6f, 0.7f, 0.3f),
    new BulletPenetrationStats ("ConcreteThick", 1f, 1f, 1.1f),

These aren't representative of the real stats, but a quick example of how we set up the data.

Then, we check at the end of our foreach bracket, looping through the stats and taking away the velocity and damage values. Finally, we check that they are above zero, otherwise we return out of our Shoot function.

BulletPenetrationStats currentStats;
foreach (BulletPenetrationStats entry in nineMilimetreStats)
     if (entry.m_sTag.ToLower() == hit.collider.tag.ToLower()
          currentDamage -= entry.m_fDamageReduction;
          currentVelocity -= entry.m_fVelocityReduction;
          currentStats = entry;
if (currentVelocity <= 0 || currentDamage <= 0 || currentVelocity <= currentStats.m_fMinimumPenetrateForce)

However, I'm very pedantic about little details. I wanted bullet holes on both sides of the object, so that you could visually trace the path of the bullet. As this foreach statement is run in a single frame, every object is static, so we don't need to worry about accidentally hitting a different object. A single Physics.Raycast will suffice, saving much needed performance on the server side. To calculate the Raycast angle, we just need to take the last hit point away from the current hit point, to get the exact angle needed for the bullet hole on the other side.

Vector3 startPos = hit.point;
Vector3 endPos = lastHitPoint;
Vector3 dir = startPos - endPos;
Ray ray = new Ray(transform.position, dir);
if (Physics.Raycast(ray, 1000f)) {
     // Check surface and instantiate bullet hole


And that is a very brief and simple introduction to bullet penetration. It will definitely be taken further and expanded, but this is the depth and complexity required at the moment. One way to expand it would to have a custom shader that has different penetration values, so you could adjust them for each material, but that's an idea for the future. Thanks very much to IRetrograde, who explains it in much more depth than I could. A very handy article on bullet penetration by him can be found here.

Remember to check our Trello Roadmap for real-time updates and follow us on Twitter. Keep Surviving!


Dark Window Studios

© Dark Window Studios 2015-2016


I have attempted to play a beta of this game, and it doesn't work as promised. I hope that the developers fix these problems before releasing the game to the public. Currently I am a disappointed user.

Reply Good karma Bad karma-1 votes
DWSMatt Creator

We haven't released any version yet, so I don't know what you played. It definitely wasn't this game.

Reply Good 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.

Windows, Mac, Linux
Developer & Publisher
Dark Window Studios
Send Message
Release date
Game watch
Start tracking

Latest tweets from @wildrnsupdates, @wildernessgame

Key binding UI elements are now procedurally generated, making it easier to add new keys - DWSMatt

17hours 51mins ago by wildrnsupdates

Improvements to procedural animations - DWSMatt

May 24 2016 by wildrnsupdates

Improvements to player procedural animation, added jump and land sounds, more general runtime proceduralisation - DWSMatt

May 24 2016 by wildrnsupdates

Improvements to new player movement and improvements to procedural animations - DWSMatt

May 22 2016 by wildrnsupdates

Converted player movement to character controller - DWSMatt

May 22 2016 by wildrnsupdates

Added improved procedural breathing - DWSMatt

May 22 2016 by wildrnsupdates

Experimentation with AnimationCurves in procedural animation - DWSMatt

May 21 2016 by wildrnsupdates

Inventory shift-clicking now combines with pre-existing stack in inventory and handles overflowing - DWSMatt

May 20 2016 by wildrnsupdates

Changed adding item logic so that it now adds to pre-existing stacks before checking for empty spaces - DWSMatt

May 20 2016 by wildrnsupdates

Added saving of crafting queue for each player - DWSMatt

May 20 2016 by wildrnsupdates

Embed Buttons
Link to Wilderness by selecting a button and using the embed code provided more...
Last Update
6 members