Jul 14, 2017

Suzy Cube Update: July 14, 2017

#SuzyCube #gamedev #indiedev #madewithunity 
My week was heavily disrupted by embassy stuff, so nothing earth shattering to report. Progress on improvements and updating to the latest release of Unity are the name of the game in this update.

So, before I go into the update proper, I just wanted to point out how nice Unity's new approach to updating the engine has been for me as a developer having decided to stay up to date with the latest version of the engine. I think it was about a year ago that the folks at Unity announced they wouldn't be doing 'major releases' anymore. It used to be that moving from Unity 3 to Unity 4 or Unity 4 to 5 was a big deal! They would actually delay releases to try and pack new versions of the engine with lots of new features which would make a big splash on the conference stage. The problem was, updating between major releases broke projects. If you had reason to update your engine version, you had to grit your teeth and buckle up for a long migration process over to the newer Unity version. Since then, however, Unity has opted to ditch the flashy big releases in favour of more stable features rolled out in more incremental releases when they are individually ready. This, for me anyway, has meant that updating to newer versions of the Unity engine has become less and less work with each new release. By checking the Unity release notes, I've also been able to focus my attention on checking those areas of the game most likely to have been affected by each update. All this to say, my transition to Unity 2017, released this week, was almost completely headache free! On that happy note, let's get to the update!

Out Of Time

The nice thing about staying up to date with the latest version of Unity has been the fact I've been able to take advantage of new features and improvements as they make their way into the engine. Sometimes, though, a new feature is added which duplicates functionality I had previously implemented via custom scripting. Such is the case of timescale-independent particle emitters. 

Get it on!

Notice how time pauses when Suzy gets the power-up, but the splash of particles does not. The particles are updates independently of the game's main timer. I do something similar when Suzy takes damage, the game slows down to accentuate the hit, but the impact effect plays at normal speed. Until yesterday, I achieved this via a custom script which would manually update any particle effect found under it. Since Unity 2017, however, it's a built in feature of the particle system!

Easy peezy!

By simply setting the Delta Time parameter to 'Unscaled' a particle emitter will now ignore any scaling applied to the global timer and allow the effect to play at normal speed. This functionality can also be handy for allowing effects to be played while the game is paused, like, say, in the pause menu or over the level end screen.

I took a little time out of my day yesterday to convert all effects which used to use my unscaled time script to use Unity's new built-in feature.

Top Secret!

I also finished the World 3 Special Level on Monday which, as with previous Special Levels, I will only tease with a blurry screenshot.

What trials will I put Suzy through next!?

These levels have been a lot of fun to create because they are all so small and focused. I've been able to knock each of them out in a day or two meaning I should be in good shape to finish the last two next week.

Odds and Ends

And the rest of what I was able to get done this week has been a hodge podge of tweaks and fixes mostly coming from playtest data.

You better not give me any more trouble!

One really thorough tester found some fun ways of breaking the game's Spring Pads, which I think I've fixed. The Spring Pads are, essentially, locked into place using a ground-pound and after a short delay, launch Suzy into the air. It turned out to be possible to get some really weird behaviours out of it by pounding it again during different parts of the sequence. I rejiggered the set up and they seem to be behaving well now.

Give me a second!

A problem that seemed to come up in a number of playtest videos involved players having trouble getting around the Blocker enemies. These enemies roll to prevent Suzy from passing and will even jump when she does to prevent her from getting over them. The easiest trick for getting around them is to take advantage of the fact they need a bit of time to recover from landing after jumping to get around them. The two problems I observed was that some players never figured out this tactic, instead getting by the Blockers by jumping over them, (which is much riskier because of those spikes!) while others seemed to figure out the trick but still end up getting hit by the blocker because they were trying to get around them too slowly. What you can see in the GIF is that I've extended the Blocker's recovery period after landing from a jump and added a funny head bob as well. This extra time will, hopefully, help both with the discovery and the execution of the bypassing tactic.


Another issue I've been addressing bit by bit is that of ensuring players have more lives for later levels. Mostly, this has meant adding 1Ups (extra life pickups) and coins (100 = 1up) to levels while I'm in there making other fixes.

Yes, Suzy Cube uses lives and 1Ups, something I wish I had designed an alternative to early on but which is now my only mechanical justification for coins, which are useful for a bunch more design reasons. What this means, though, is that players can run out of lives and run into a Game Over screen. I think consequences are important to introduce stakes to the game's challenges, but I also don't want players to constantly be facing Game Over screens either! That's why I've been paying close attention to how many extra lives players are gaining during their playthroughs on various levels and upping the number of potential 1Ups to be earned. Suzy, after all, is not meant to be a hardcore game.

I Was Walking With a Ghost

A few updates ago, I mentioned that I had solved my issue of making Suzy visible behind obstacles in a visually pleasing way. Well, turns out the technique had some issues and weird artifacts and needed some work. As I set off to fix the problem, though, I discovered the Stencil Buffer!! If it hadn't been for Simon Lavigne, the guy who originally helped me figure this all out, I wouldn't have even known what the stencil buffer could do for me. I, thus, present to you Suzy's New new 'behind stuff' effect!

I see you! Again!

In order to understand why this is a big deal, one must realise what a naive translucency blending effect would look like without the use of the stencil buffer.


You'll notice that, if you simply blend pixels using good ol' alpha blending, Suzy's various body parts end up visible through each other as one part is translucently drawn, and then another on top of it and so forth. I don't know about the rest of you, but I have no interest in seeing the inside of Suzy's neck hole!

What the stencil buffer does is allow the shader to keep information about pixels which have already been drawn, allowing subsequent pixels being drawn over the same area to be kept or discarded based on various conditions. In my case, I simply set things up so that no new pixel should be drawn if one has already been drawn at that location, avoiding any parts of Suzy from blending over each other. This is what achieves the nice silhouette effect while still being translucently blended.

So, as I said, nothing big but lots of little things fixed, tweaked and addressed this week. I don't foresee any major disruptions next week, so I hope to make more progress on things like Special Levels as well and getting an updated test build out to a new set of testers. See you all next week!

No comments:

Post a Comment