Sign in to follow this  
  • entries
    162
  • comments
    262
  • views
    167074

In which everything became cloudy

Sign in to follow this  
OrangyTang

170 views

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.







Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now