Heat Signature: Infinitely Scaling Vapour Layers

Excerpt from an e-mail I just sent to artist John:

A brief history of zooming and backgrounds:

  1. We worry about how to make the game look good at all the zooms between ‘local’ and ‘galaxy map’.
  2. You ask if anything actually happens at those zooms. It doesn’t! I rejig the zoom system to skip them.
  3. I find very close zooms are disorienting because there’s no background for a sense of speed.
  4. You make tiling vapour layers and stars/dust.
  5. I tell them to display at certain zoom levels, and fade in between. It looks good but is awkward code-wise, everything’s hard-coded to a certain zoom level and I have to create a new special¬†case instance for each zoom level.
  6. For unrelated reasons, I start to let the camera auto-zoom to keep two things on screen: eg. the player and their ship, if they’ve ejected.
  7. The slow zoom-out gives an awesome sense of scale, except now the star layer tiles very obviously and soon the vapour layers stop showing and it’s all a big blur, which is kinda pretty but you lose the feel of ‘zooming’.
  8. I think: “What we really need is for the layer itself to spot when it’s being asked to tile an unacceptable number of times, like 4, and if so create a new layer of double scale that we can fade up, and then when the old one is fully invisible, it destroys itself, and trusts the new one to spawn bigger or smaller layers as required and fade between them smoothly and destroy itself when it’s no longer needed. And vice versa for zooming in.”
  9. Aeons pass.
  10. I do it!

Update: better video!

  • You can’t fly this fast, I’m using fast-forward.
  • I fade the layers out entirely once the shapes of the galactic blobs are visible, so it doesn’t texture parts where there’s no vapour.
  • The slight pulsing of vapour opacity on zoom is not intentional, though not sure if it’s worth fixing. It’s probably to do with the fact that two 0.5 opacity layers do not equal one 1.0 opacity layer.

It works! I love it. Feels like a real victory of code and art: we had this big scary problem, a gap in what we could do to a good standard, and we dodged around it for a while, and then your perfectly tiling dust layer and my new autozoom system came together in a way that suggested a smarter approach, and it just solves it completely. We fade through hundreds of orders of magnitude of scale, and the background layers just transition seamlessly as you go.¬†And the sense of scale is so much better – it’s actually got easier to catch yourself in your pod now, because you can tell between ‘it got further away’ and ‘the camera zoomed in a bit’ – previously both looked the same.

This new system will mean I can tweak the zoom controls to not skip that big gulf between local and map, and use autozoom more liberally, for things like being chased or approaching an objective or an autopilot destination. Turns out once those zoom levels look good, there are a few gameplay uses for them!

4 Replies to “Heat Signature: Infinitely Scaling Vapour Layers”

  1. I love seeing your updates, keep up the good work. This looks absolutely amazing! Keeping those layers in check sounds like a pain, and the bit of work I’ve done with just website parallax layers… woah! Great job.

Comments are closed.