Skip to main content
GameDev.net gamedev.net
🔒 Locked

Slow Scrolling Background

Started by TabriS Apr 21, 2000 at 12:10 PM 4 replies 550+ views
Original Post
TabriS
TabriS
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 )
revolver
revolver
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. =)
Creativity is a bloody nuisance and an evil curse that will see to it that you die from stress and alcohol abuse at a very early age, that you piss off all your friends, break appointments, show up late, and have this strange bohemian urge (you know that decadent laid-back pimp-style way of life). The truly creative people I know all live lousy lives, never have time to see you, don't take care of themselves properly, have weird tastes in women and behave badly. They don't wash and they eat
SHilbert
SHilbert
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.
TabriS
TabriS
to SHilbert:

1. Use function like memcpy()?
2. Yes, I''ve attached Clipper with BackSurface. Is it slow down my game?
daveb
daveb
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?
Volition, Inc.
SHilbert
SHilbert
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.