Sunny Days, Sweeping The …

We decided to hold our deploy until tomorrow. Until then, here’s a little tidbit on the clouds in the game!

I love cheating at making video games. Decorations like clouds are a great place to cheat, because you can’t hurt gameplay too much.

They’re placed as the player flies through an area; they always appear at the same places because whether a cloud is present at a spot or not is completely derived from the grid location. This is a really simple and efficient way of placing things. But it’s a little boring, I want them to drift and move. They can’t drift too far because then they’ll risk leaving their grid square and being onscreen when their grid square is cleaned up.

So the cheat is that their position is set by a long-period sine wave. It’s so slow that you can’t see the sinusoidal nature of it, and it ensures that the clouds can’t move too far away. Also, because it’s deterministic, if you leave the area and come back, the clouds will have “drifted” in the interim and form a new pattern.

Here’s the asset we used for the clouds’ appearance. Looks amazing, though I had to make a lot of changes to get performance up.

Whoa! Hey, now.