[SDL] quick 2D paralax scrolling
James M Best
bestj at nationwide.com
Tue Apr 25 15:25:58 PDT 2000
In fact, I wonder about this. There are many game emulators for these
systems, and they run at full speed on my k6. (I own every ROM I play
on these emulators, of course). There is something that we are doing
way too slow, I think.
Mattias Engdegård wrote:
> >I've got some myself, but their performance leaves quite a bit to be
> >desired.... Specifically, I keep the various background layers (or looping
> >layers) in surfaces which I blit onto the screen surface (using
> >SDL_BlitSurface or the lower blit function) whenever the screen
> >moves. Then I (of course) blit the foreground graphics. I've used various
> >combinations of UpdateRect and UpdateRects, but can seem to increase
> If you are drawing to a software surface (for example, in X11 without DGA),
> then it might pay off to undraw the overlays and sprites, if the background
> stays put. That way you don't have to paint the entire buffer each frame.
> It could be doable on hardware surfaces as well (with page flipping) but
> then you want to minimize the slow reading from the buffer.
> > (I'm basically trying to get performance similar to those old
> >16-bit cart games for SNES/Genesis... and I have a 300 MHz AMD-K6 w/ 128
> >Megs RAM and an 8 Meg graphic card, so I hoped that I could...)
> Don't be so sure. Those machines have dedicated multi-layer tile-based video
> circuits that can do a lot of this in relatively simple hardware, while you
> have to waste a huge amount of cycles each frame to do it.
> What kind of game are you doing, BTW? Is it a space shooter? Please please...
More information about the SDL