Jump to content
  • Advertisement
Sign in to follow this  
wasted_druid

Side scroller

This topic is 4839 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

In my side scroller, the background is moving most of the time, so I just re-blit the whole thing every time. For the cases where the background doesn't move, i.e. edges of maps, and special case maps, I'm considering not reblitting all the map tiles and doing dirty rectangles, to make my sprite movement nicer. Anybody see any problems with this that I'm missing?

Share this post


Link to post
Share on other sites
Advertisement
Determining where to reblit and where not to reblit would take more time (and more resources) to just blit it completely over. Remember that the blitting method is extremely fast.

Share this post


Link to post
Share on other sites
Okay. I believe you, but it leads me to another question. Why are there methods like dirty rectangles to only reblit a part of the screen that has changed?

Share this post


Link to post
Share on other sites
I would bet that your looking at the allegro demo program. Methods like those you describe, and th eones in the program I mentioned are dated. When computers were and blitting was rarely hardware accelerated you had to avoid blitting the whole screen. Nowadays pcs 2d graphics are optimised for blitting big chunks.

Share this post


Link to post
Share on other sites
Not blitting everything over again comes in handy for a few scenarios, none of which include side-scrolling or action-oriented games. A turn based strategy game would be a perfect candidate for only updating the screen when something changes. For pretty much anything action-oriented, it really is easier to just re-blit the whole mess every frame (IMHO).

Share this post


Link to post
Share on other sites
Quote:
Original post by chad_420
I would bet that your looking at the allegro demo program. Methods like those you describe, and th eones in the program I mentioned are dated. When computers were and blitting was rarely hardware accelerated you had to avoid blitting the whole screen. Nowadays pcs 2d graphics are optimised for blitting big chunks.


Well you're almost right about that. I'm remembering the little I taught myself over 5 years ago when I was playing with Allegro in high school. Good stuff to know. Thanks all.

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!