TaleSpire Dev Log 306

Rewriting Camera Controller
The Camera Controller class in TaleSpire is one of the absolute oldest pieces of code in the project, surviving multiple code iterations to become one of the most convoluted parts by holding on to a bunch of legacy code while being given more and more responsibility. Every time I've had to do anything within that class, it has been followed by a shaking of the head, an audible facepalm and a declaration of a future refactor. And so years went by, and here we are.

Why do this now?  
I started looking at the possibility of bringing the Sequencer into something more feature-complete. The Sequencer is the tool created for doing in-game trailers for TaleSpire. It was initially made to shoot our Early Access release trailer but has since been used for some Asset release teasers as well as the Dimension 20 seasons featuring TaleSpire.

And it is not terrible, usability-wise. But there are certainly some things in need of improvement before it is shippable, even as an experimental feature.

One of those things is how your set up creature movement, call emotes, etc. Rather than going through a bunch of UI for each of the actions performed.

Fixing this should be simple, but the Sequencer uses the Photo-Mode Camera. The Photo-Mode is entirely separate from the CameraController and the tools that work on Creature selection, etc. The implication of this is Camera features have been implemented twice, something that feels unnecessary at best. Eliminating this separation and duplication is the way to go

So to make our life easier when finalizing the Sequencer for Experimental release. It was time to handle the Camera Controller. 

Sadly, there is not a lot to show from this refactor, as if everything goes by plan, the impact on the end-user should be minimal. (initially)

Each of the camera modes has been moved into separate classes executed by the CameraController class, rather than this correlates with how our BoardTools work, which is sort of like the Tool Statemachine keeping track of what set of tools the player is currently using to interact with the game.

Not having a separate PhotoMode Camera means that all board interactions used in BoardTools also work with any Camera Mode. 

This marriage becomes incredibly important, being able to move things around in the Sequencer and for future implemented features such as limited player navigation as an option or other Camera Styles.

Essentially, this refactor is a way to strengthen the foundation for expanding Camera functionality, which in turn sets the stage for the Sequencer.

As a side-effect it also makes this technically plausible: 

And even though it looks quite neat in this video. Trying it out makes it painfully evident how much more work would have to be put into making a top-down experience work well — certainly more than just placing a camera above the board. The TaleSpire assets aren't made to read well from above, so the sense of walls, vertical placement, and where creatures can move becomes totally ambiguous. It looked cool enough for us to discuss potential solutions internally, stuff like an outline plane to show intersecting edges or some depth visualization.

Still, all that would come at a significant time cost. And with so many available tools doing top-down incredibly well, ultimately, we can not justify how much time it would take away from the current roadmap.

Bonus Log:

Another thing the Sequencer needs is the ability to sync multiple creature movements properly simultaneously. This causes a bit of a Tangent into Creature Group Move

After playing around with some physics spheres for a while, this is the latest update:

(Still under heavy Work in Progress)

Thanks for reading!

Keep up the amazing work!