Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

TabriS

Slow Scrolling Background

This topic is 6942 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 all I''m new user. My name is TabriS. nice to meet you all.. Now, I''m developing 2Dshoot ''em up game and I''ve trouble with a background. It so large (about 520x430). When I Blt it to backbuffer it slow down my game! How to optimize it? ( my game work in 640x480x256 mode )

Share this post


Link to post
Share on other sites
Advertisement
Try loading it once, then using dirty rectangles when drawing.

-------------------
Revolver, aka Brian Smith
MIS Programmer Analyst
brian.smith@realpage.com
RealPage >> www.realpage.com

My views aren't even mine, much less my employers. =)

Share this post


Link to post
Share on other sites
Two other possibilities:
1.Write your own blitter. (You could probably get help with this on this messageboard.)
2. DON''T RELY ON THE CLIPPER FOR SCROLLING. Restrict the rectangular areas drawn to those onscreen.

Share this post


Link to post
Share on other sites
to SHilbert:

1. Use function like memcpy()?
2. Yes, I''ve attached Clipper with BackSurface. Is it slow down my game?

Share this post


Link to post
Share on other sites
There''s no reason it should be so slow. Using DirectDraw''s Blt capabilities or using a 3d card to draw sprites as textures should result in blinding framerates.

How are you physically drawing the bitmap?

Share this post


Link to post
Share on other sites
TabriS:

1. Yes. That''s one way.
2. The clipper doesn''t slow it down, but it might be faster if you define the RECT''s you pass to Blt() not to extend offscreen... that way the clipper doesn''t have to do any work.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!