Simulating simple 2D mist

I trying to write a 2D shooter game for each of the planets in the solar system. The next one is for Uranus - I’ll probably call it Planet 7 to stop the snigering. The game itself is reasonably well thought out but my problem is how to portray the background scenery of the planet. The whole screen will just look grey which just looks a bit too dull. I thought swirling mists with the aliens flying through the mists might be acceptable but I’m a bit stuck on how to do this. Any thoughts?

I wondered about having a plain grey background and then drawing lots of irregular shaped grey shapes and changing their transparency on the fly while moving them about slowly on screen. Is there a better way?

Thanks for any thoughts

http://nineplanets.org/images/uranus.jpg

You could find an animated background with the mist already in it.
render background, entities and finally some mist particles/entities which move and change transparency.

I believe that picture shows the high altitude haze on Uranus. If you go to lower altitudes where the pressure is greater and it is a bit warmer, the haze would dissipate (it would be permanently overcast of course).

Must admit I wasn’t aware you could draw animated images. It might be a bit much though even with a low res game 800x600 but I’ll see if I can find an animated mist gif.

Haven’t been but I think it wouldn’t get any clearer lower down though as the gas would just turn to liquid as the pressure increases - probably like pea soup but colder. I think I’ll stick with the popular image though rather than one with any scientific truth :slight_smile:

You don’t need gif’s if you have a sheet with images, you just fill up a TextureRegion[] and use it in the Animation constructor.

If you want to make an atmosphere-like effect I’d go for rendering a number of layers of cloud sprites. First you’d need a cloud texture (or multiple for variety), e.g. something like this (you’ll need it to have a transparent background):

http://wiki.blender.org/uploads/thumb/a/a8/Figure_pd.28.png/600px-Figure_pd.28.png

You could draw one using paint.net and an approach like this.

Then render a number of these clouds in layers, with the further layers scrolling more slowly than the closer layers (parallax effect), and possibly with a lower alpha so they fade out in the distance. You could throw in some slow rotation.

Yep. I’m using overlaid clouds from paint.net and it looks pretty much like you’re travelling through a cloud. I hadn’t thought of parallax with clouds but I’ll try that out.

The game is coming on nicely and it seems like it might be quite playable. The real issue is whether the screen is interesting enough. I guess there’s a downside to setting your game inside a cloud! I’m using brightly coloured icons to symbolise different power ups and then floating everything in bubbles with the mist over laid on top. It’s still very early days but I personally like shoot them up games combined with having to think quite hard on how to complete a level. Obviously each level then gets a bit harder each time.

One thing to consider is using a “lightning” effect. I’ve seen that used in games before: make some clouds light up randomly in flashes.

Anyway, good luck!