Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I’m writing simple strategy game (in xna), and would like to have an animated background. In my game all the actions happens inside one screen and thus standard parallax effect does not look appropriate. However, I found a video of a game with suitable background animation for my game (from 3 to 6s, while main character stays at the same place). What is the algorithm to do this stuff? It would be nice if someone can provide a reference for a similar example (language is not important).

share|improve this question

It's not the same effect as the video you linked, but one simple possibility is to scroll a texture over the entire screen using the wrap texture addressing mode. Here's one example using a cloud texture:

One effect that I think looks pretty cool for a top-down game taking place in the ground, is to create a texture which contains only the shadows formed by the clouds and wrap that over the scene. I've used that in this demo although the effect is subtle.

As for the video you linked, I believe the effect is probably based on some sort of animated perlin noise so look into that. There are many resources on the subject online.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.