In which everything became cloudy

Published August 25, 2007
Advertisement
I coded this up a while ago, but now I can actually share the screenshot. [grin]



Fog! Which can be configured on a per-level basis with a few parameters like density, cloud height and movement speed. Initially it was just sprites placed all over the level but that made big levels slow down as they had tons of fog sprites. Now they're generated in a box around the camera (with a certain amount of padding), and when they go off camera they spawn again at the opposite side. This is nice because there is a constant number of cloud sprites (and thus overhead) regardless of the level size.

	"groundFog.weather"
>

"1000" cloudHeight="0" minSpeed="0.3" maxSpeed="0.8" colourGrid="lightClouds.colourgrid" />





Theres also a colour grid used to pick up the colours - all the clouds are solid white here, but setting them up to be varying alpha and colours is easy to do. Trying to find the people to rescue gets very tricky when the fog is this dense!
0 likes 2 comments

Comments

johnhattan
Looks interesting, although I think I need to see it animated to know what's going on.
August 25, 2007 10:19 AM
OrangyTang
Actually that's an old shot - its since been tweeked with cloud alphas between 60% and 90%, which is much less overwhelming.
August 25, 2007 02:28 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement