Über-Gore © Tech Sneak PeekFrom the start, a huge goal for STRAFE® has been to make the player feel as powerful and impactful as possible. This included a lot of gameplay and design decisions yada, yada, yada… To cut to the chase, we wanted gallons of BLOOD and pounds of GIBS and it had to be persistent. Lone Wolf and Cub style arterial squirts and sprays that paint the world, drip from the ceiling and run down the walls.
Since STRAFE® is both procedural and 3-D, it is super important that we do all we can to keep the player from getting lost. In a 2-D world it is a bit easier for the player to keep mental track of where they’d been (I was going right, now I’m going left). During combat in STRAFE®, the players destruction paints a room red so getting lost is no longer a problem. Players will leave their mark and then move to clean rooms to make a new mess.
I experimented with three approaches decals, projected mesh’s and a blood map/shader deal.
When the game was first coming together and the levels were being grey boxed it seemed like maybe we could get away with some clever decaling. Sweeping areas where blood was landing and making some simple decisions to do an auto tiling style thing with a few sizes. Smallest around the edges and larger tiles working inward. As levels grew and the geometry got more complex/less predictable the fantasy of using any “large tiles” to save calls fell apart.
I saw a post showing a decal system that was projecting decals and building mesh’s that wrapped around the geometry they hit. The one I saw wasn’t meant for runtime and after poking around it was pretty clear that modifying and combining a ton of mesh’s wasn’t going to work out. Definitely a slick tool for static decals though.
The bloodmap approach I ended up going with is definitely the most immediately intuitive. The concept is the whole worlds a canvas and you can paint it. We’re already baking lightmaps so we can just use parallel UV’s from that and draw the blood in shader. Updating a bunch of textures and pushing them to the GPU every frame is crazy slow. So the biggest obstacle was compressing our bloodmap data in a way that was fast to encode and decode by both CPU and GPU operations. This way we can modify our bloodmap encode it to a tiny file then push it to the GPU and have it decode and draw without the performance bottleneck. After some managerial optimizations the bloodmap model was in a good enough place to start playing around in our procedural world! Definitely still room for optimizations but fun to play with.
Our blood is smart. It behaves differently dependent on a surfaces orientation. For instance if blood hits the wall it will procedurally run down the wall.
If blood hits a flat surface overhead the blood will begin to form droplets and when they reach a certain size they will fall to the ground creating a bigger mess.
Yeah we love this feature
The blood is only half the fun, we’ve used a more conventional approach for the physical GIBS. When a portion of the enemy is damaged enough we remove that part from the enemies body and spawn in that body part in physics to blast off. This process is accompanied by spawning in little meat chunks and some bloody bursts and sprays!
Keep in mind this is still early on and using mostly programmer art for the blood and GIBS. We just got too excited to not share some gore! We intend for each of the 3 weapon types to have different style blood emitters, (shotgun wounds creates multiple blobs of blood where a clean railgun shot will create a concentrated blood spray with some distance!) We will be adding some simple specular highlights to give the blood that wet sexy shine. We also plan on a bunch of fun little elements like tracking blood around after walking through puddles as well as secret easter eggs to discover!
Video Here -