Categories
Development

Smash Hit Plunder: Getting physical

Code is nearly done after over four years of development! So we’re sharing what we’ve been doing and how it’s been done over a series of blogs. Last week was concept, this is looking at how we make the world feel so real and physical.


From the prototype is was clear that when we broke with the expectations that you have from real life interactions, it broke any sense of immersion you had. Every step that we took to make interactions in Smash Hit Plunder more accurate to real life, the better the second to second game feel.

 

It starts by making sure the objects are all relatively the right scale to real life and to each other. If something looked out of place it was often the size that was wrong.

Smash Hit Plunder Holding Skulls

Every object in the game has the correct weight set for what it is. If something should be 10kg in real life – it is that in the game. It’s not something you can tell is wrong until you start throwing that object around and seeing how it knocks over other objects. Somehow we all seem to know the weight of something through its movement.

 

Traditional physics colliders would always break my expectations. When you set a standard mesh collider in Unity and you want that object to move, you have to set it as a convex mesh. In the case of an open chest, it would mean that no objects will be able to be put inside of it as that would have a concave hole. The convex colliders basically wrap a skin around every object which means when you are attempting to put an object inside that open chest – it bounces off in mid air. This inaccurate collision would always be reminding me that none of it was real – so I went on a long crusade of creating super accurate collision out of lots of ‘box’ colliders.

 

I spent hours on each object trying to make rounded surfaces out of boxes, but it was worth it. There’s such a delight and satisfaction gained when you can thread game objects through each other, drag them on surfaces and see the nooks and crannies having an effect on their movement, and running around a level holding a box filled with items you put in there for safe keeping.

Smash Hit Plunder Colliders

Eventually John created a tool for me which allowed me to paint on individual mesh and box colliders onto areas of a prop – which has saved me weeks of markup and my sanity as well as making the collision super accurate. I got him to package it up, called it Technie Collider Creator and now that tool is on sale on the Asset Store.

Technie Collider Creator

Accurate collision audio game much later in the project. John and I just didn’t have the ears, but we’ve had some great audio developers request a lot of features that has made our noises really sound like they would in real life. We couldn’t nail down why things sounded flat – but now we have code checking for things like impact forces and speeds, adjusting the SFX accordingly.

 

It was really unsatisfying to throw a glass in other experiences, and for that to not react as expected. When we started putting breakable objects in the game, these needed to actually smash as expected, and would eventually turn out to be a core gameplay feature as players had to smash objects to find more loot. There’s more to smashing than you think however;

  • – The object needs to disappear
  • – There is a smash particle effect that happens on the point of contact
  • – Loot doesn’t just spawn from a point, it’s from a designer marked up volume on each object so that it ‘makes sense’, scatters, and doesn’t end up with a pile of coins on one spot
  • – Loot spawned inherts the momentum, so it scatters nicely and moves as expected
  • – The audio adjusts to the smash impact forces
  • – Depending on the object, debris should be left behind. This debris should look like it’s made out of the previous object and should scatter in a similar fashion to loot while having its own physical properties

 

Players are deviant people! If given the time and space, they play by testing the world, seeing what works and what doesn’t and this has been seen in the past as ‘trying to break the game’. This is more so in VR as you are in an unfamiliar world – you just want to try things and experiment. Again, playing other titles I have felt robbed of my immersion when an object hasn’t behaved as expected in combination with another object. When I put something in a fire and it’s made out of wood – I expect it to burn!

 

Log On Fire

 

So in Smash Hit Plunder we have spent a lot of time programming in behaviour of objects and giving them properties with how they interact with each other. I don’t want to share too many of the interactions as they are a joy to find! But let’s take setting an object on fire as an example of the way we think about all the possibilities;

  • – Some objects easily catch fire and will set alight with a small candle, some are much harder and require big fires, and some require fires so big that you can’t realistically set them alight
  • – Objects take varying time to actually catch alight
  • – Different objects have different particle effects
  • – You can use something that is on fire to spread that fire to other objects, but of course when an object is on fire, it has a varying amount of ‘power’ of fire so may be able to set some objects alight and not others
  • – They can take different amount of times to burn out
  • – Some parts of an object may not be flammable, so when the object gets burnt out it may leave behind old parts of it
  • – And we can use this combination in… OK, shouldn’t spoil that interaction!

We believe it’s not the graphics that makes VR feel real, it’s the interaction. There’s a lot in the game which you will have to discover yourself – but what we have achieved is a VR experience which makes you honestly feel like you actually inside a video game that has come to life. We are looking forward to being able to finally share it with you all!