Dec 9, 2016

Suzy Cube Update: Friday December 8, 2016

#suzycube #indiedev #gamedev #madewithunity 

Been a busy week so I'm glad I got some work done in spite of the distractions.

I wrapped up the design of Level 4-2 and was able to move on to Level 2-2. I guess that answers last week's question of whether or not I would work on redesigning the level select screen...

Tumble Dry in High Heat

So, Level 2-2 has Suzy navigating rotating blocks and bridges over deadly hot lava! Nothing mind blowing about the concept but I did want to point out some extra work I put in based on a friend's suggestion many many moons ago.

Smooth Moves

Almost two years ago, back then Suzy was just a tinkering project for trying out gameplay ideas, I had a designer friend of mine (Jimmy Lord of Flathead Games) mention that a set of rotating bridges I had in my prototype level were impossibly hard to cross.

It turned out that, rather than jumping from face to face, he was trying to simply walk diagonally as the bridge rotated under his feet. The reason this wasn't working was that, although the bridge had rounded corners visually, the collision volume did not. So it looked to him like he could walk smoothly from one face of the bridge to another but he couldn't.

Taking this to heart, as I started work on this level, I determined what shapes I was going to want to use for my rotators, modeled these and then created sets of multiple colliders using boxes and capsules in order to have nice smooth collisions around the edges of the blocks.

Here's a 2D cross-section view to illustrate:

Visible shape of the block

Here, we have the block as it appears to players. Simply a box with rounded corners.

A box collider to cover the sides
A first box collider is sized to reach across both sides of the block while stopping short of the top and bottom corners.

A box collider to cover the top and bottom

A second box collider is added to cover the top and bottom of the block.

Overlapping box colliders
Together, both colliders intersect and provide collisions for all four sides of our box. Only the corners remain without collisions.

Capsule colliders as seen from above added to corners
To cover the corners, capsule colliders, represented here by circles, are added to each edge of the block.

All colliders
Together, the overlapping colliders form a perfectly solid representation of the block.

The actual blocks are three dimensional, of course, meaning there's a third box collider added to cover the front and back faces and each of the block's twelve edges is assigned its own capsule. Here's what it looks like in the editor.

Rotator with visible collider outlines (green)
Wireframe view of the rotator with colliders exposed
This is a considerably more complex collider setup than most blocks in the game, which use a single box collider, but it's these rounded corners which allow Suzy to smoothly walk from one face of a rotator block to another as it rotates under foot.

So, Jimmy, this one's for you! You and all other players will now be able to easily walk across the faces of the rotator blocks thanks to some nice, smooth, corners.

So, as I said, it's been a busy week with a lot of non-Suzy related activities so I think that's going to be it until Monday. Check back in next week to find out what I'll have been up to then!

No comments:

Post a Comment