hello and welcome to mix and jam a channel about game development. Experimentation today’s. Project is inspired by super hot super hot is a very creative game in which the main mechanic is that time only moves when you move that results into a gameplay that is not only fun to play, but also fun to watch.
I wanted to try and replicate the mechanic and a visual style from the game using unity. So here are the steps I needed to follow for this recreation. Implement the FPS controller and also the target models around the scene figure out how to achieve a similar slow-motion effect and add some final assets, particles and effects in order to get a good FPS controller.
I doubted the FPS created a product from the learn session on unity hub. This kit is basically a template for an FPS game, so I adapted the character controller from it into my project. By the time I was working with this project.
I imported the legacy. Vr samples on the Asus store just to get the slow, poly humanoid model, but that asset now is deprecated, but if you want to download that model specifically, it will be available on this projects repository.
Then I headed over to mix mo and download it a simple shooting animation for the character. One of the first things I did on the project was to create a new material for the character by making its albedo color red, and I also tweaked around the specular color, so that it has a bit of yellow reflection.
Just like in the game, then I created my main script for the shooting and time behavior. So I started by creating a prefab of a bullet that got instantiated when clicking. I noticed that on the game, the bullet gets instantiated in the middle of the screen.
So I just decided to do the same. I created a movement script for that prefab that makes it move forward. The important thing here is to multiply the movement by time.deltatime in order to work on the slow motion mechanic later on and to replicate the visual from the game.
I added a red trail renderer to the bullet prefab. Now, the trick I used to replicate the slow motion mechanic from the game was to have two different time: scale: values, depending on whether there was movement on the horizontal or vertical axis, then the time scale itself gets lurked between those two values, with an interpolation variable That would also change if there was movement from the player.
Another thing present in superhot is whenever there is some kind of action like shooting or throwing an object time moves forward a little bit. So in order to do that, I created an eye enumerator. That was called whenever the players in an action overriding the timescale changes for a while.
The other great thing in the game is the ability to throw and pick up weapons. So I added a rigidbody to the gun and created a do tune sequence that basically Dee attaches the weapon from the player in adds force and a bit of torque the weapons rigidbody for the weapon pickup.
I cast a ray cast at origins from the center of the camera and points forward. So what a weapon is a result of that ray cast and the player clicks the weapon gets attached to the player, and then I reset the position and rotation by using the do move and do rotate functions from do tween, then to make the enemy character react To the bullets I add a ragdoll to it by using unities ragdoll window and now that each body part has a Collider and a rigidbody.
I add a script for each of those body: parts that script disables the characters animation when hit by a bullet and then, when going into ragdoll mode, I made it so that the script detects if the character has a weapon, and if that’s, The case the weapon gets the attach from the character and gets impose towards our player in the game.
The enemy model shatters on specific parts, and I spent a lot of time thinking about how to do this. But then I decided just to split the character into different parts using blender. Basically, I created a version of the model split into five parts and I also exported each individual part of the body as a separate object.
I also applied a new material to the faces that fill up those model cuts so back on the body part script. When the bullet collides for the specific body part, I indicate which mesh of the original model gets deactivated and the object that’s.
Going to replace that part by positioning the new objects in the same position and rotation as a specific body part bone, I was able to replace it in a kind of a seamless way. And when I replace the body part, I had an explosive force to the new object.
So it looks a little bit more like his chattering, and then I made it so that the head object was separated into multiple meshes so that it would have a satisfying shattering effect when hit by a bullet for a gun.
Then I replaced the weapons and bullets model using these assets from sketchfab. I also created some particle effects. One was for when the body collides that renders meshes instead of sprites, and I also did a particle for the gun itself.
That plays an animation based on this sprite grid. Finally, I added a bunch of post-processing the most important one being the color grading that I tweaked a lot to make the visual more similar to the final game.
I also added an emissive material on the body part host so that it reacts to the post-processing bloom in a nice visual way and as a final touch, I added some furniture to the scene using the gray furniture pack from Rennes work, studio on the asset store And after a bit of adjustments, this is our turn now [ Music ], the link for the project’s.
Repository is on the description below mixin Jam really only exists because of these amazing people helping out on patreon, and of course I want to highlight these top-tier supporters. If you want to see more videos like this, please consider subscribing and sharing this video with friends.
Thank you so much for watching and I’ll, see you in the next one.