May 13, 2016

Suzy Cube Update: Friday May 13, 2016

#suzycube #indiedev #gamedev #madewithunity 
Wow! Crazy day! I'm so sorry for the super late update, but the internet's been out almost all day! I'm glad to finally be back online, though I have to say, not having internet access sure made this a productive Friday!
As you can see above, I'm STILL working on Level 5-B. It's now playable from start to finish, all major areas of the level are built and functional, though I do have a list of about a half dozen challenges I'm not quite happy with and want to change.

More Work Than Expected

I knew it was going to be a lot of work to put together the game's final level, but man! Still at it after two weeks! The major reason it's taking so long is that this level has a number of different interactive elements and hazards that all need careful testing and tweaking to get working right.

Going Up!

If you look at the screenshot above, you can see there's a large vertical climbing section near the end of the level. During this part, the surrounding lava relentlessly rises to threaten overly cautious players. It's all very tense! And was a pain in the ass to set up correctly! 

That's gettin' close!
The two major issues I wrestled with were having it play nice with checkpoints and balancing the pacing. Checkpoints were tricky because the lava plane needs to be pushed up artificially on respawn so as to not be way at the bottom of the level if Suzy respawns midway up the tower. This seems like it would be rather straightforward, and on a regular level, it would be, but on this level, the lava plane goes through three changes of height and behaviour so things got complicated. The second issue, that of balancing, posed it's own challenge. If you are struggling to climb up quickly, fast moving lava will feel punishing, if you're jumping your way up like a champ, then you're going to leave the slow moving lava behind and all sense of urgency is lost. So, how did I solve both these issues? Well, after struggling with it for a good while, trying to piece stuff together out of existing scripts and system, things got harder and harder to debug and maintain. I finally decided to scrap all the complexity and just write a simple custom script to handle these kind of rising hazard cases. The jist of it is simple, the script causes the lava to rise slowly while keeping track of the difference between the player's height and the surface of the lava. If the player's height ever exceeds the adjustable threshold, the lava is moved up by an equivalent amount. This ensures that, though the lava rises slowly, it never gets so far behind as to pose no threat or lose all tension. And as a nice bonus, this behaviour completely solved the issue presented by checkpoints and respawns. When Suzy spawns at a checkpoint, the lava automatically catches up!

A Warm Glow

Glowy goodness
Finally, I spent a few hours this evening playing around with a shader made using ShaderForge which gives the impression that objects sink into the lava. How it works is there's a glow plane above the opaque lava which uses this custom shader to fade out the surface's alpha based on the depth difference between the glow plane and the underlying geometry. As you can see, it works quite well! Except that I just can't get it to play nice with other translucent objects like particles. The screenshot above was just a lucky screengrab during a frame where the particles happened to render on top. It's really fleckeri.

I would love to get it to work, somehow, though, as it looks really cool in motion.

Ok.. Maybe a little too high...
I also haven't tested it on mobile yet to see how it performs. 

WTF!?

And why haven't I tested on mobile yet? Because I'm stuck between a rock and a hard place! I have to upgrade to the latest Mac OSX in order to be able to build to my device, which I'm scared to do because the download will take forever (so much opportunity for things to go wrong!) and if there are any problems with the install, I'll have very little recourse to fix things living where I do. Oh.. And Unity Cloud Build has been failing to check out my SVN repository for a week now, no clue why... So I'm getting no builds that way either... yep... I've spent over a week without a build to test on actual target hardware... I don't recommend it!

Well, on that cheery note, I'll bid you all farewell for the time being and I'll make no promises about whether or not I'll be done building Level 5-B by next Friday. See you then!



No comments:

Post a Comment