Jump to content
  • Advertisement
Sign in to follow this  
Felix Ullrich

Parallax Backgrounds - Simply Move or Blit?

This topic is 2627 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone,

right now, I'm prototyping a 2D platformer engine in Actionscript 3 (Flex IDE) that I intend to use as a prototype for implementing the same engine in C++ using the SDL library.

Right now, I'm about to code the functionality for bitmap background layers with parallax functionality.

I stumbled upon the following design/performance question:

When the bitmap layer scrolls, it's the nature of scrolling that part of the whole background image on the one side vanishes whereas on the other side new parts appear.
Now, which of the following uses less CPU/GPU power:
- Leave the background image as a whole and simply move it across the screen
- Blit only the displayed part of the background image with each loop?

Maybe there even is a performance difference in AS3 and SDL, but what do you think? My intention tells me that blitting the background area might improve the overall performance, but maybe I'm misleaded and it would be a waste of time implementing a background blitting system when it doesn't improve anything.

What do you think about this?

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!