Thursday, May 19, 2016

Day 4: Press Button to Thing

Today wraps up the hullabaloo with tutorial text. Rather than create an entire component with text and images everywhere, I've decided to just split it up into text components (no procedural function necessary) and use images, which have a much more concentrated use of keyboard to gamepad input and index currently used images to set them in the scene.

Or... Press A to Jump!


I also swung in some gradual post processing changes for dilation, as we can set the weight based on the current fraction of time dilation from 1.0 - dilation to 1.0 - 0.

As for any cool stuff learned today? Perfect Forwarding and Variadic Templates! Perfect Forwarding is a wrapper that allows the value of an object (lvalue, rvalue, const or otherwise) to be used in the same function with a template and std::forward, which forwards the value of args to be used in another function.

Variadic templates are even cooler; they allow a templated set of arguments, so something like a Factory::Create method can take in a variable amount of arguments for a template to check at compile time. Wowzers!

Today was a good day to learn!

No comments:

Post a Comment