Fast Scrolling?

Hi there!
Is there a common solution in SDL to do a fast scrolling of a large picture?

For instance:
I have a screen of 640480. My background have a picture of this height and
width. And on this scren are moving sprites.
If I have a picture of 1280
480, how can I simply and very fast make it
scroll on screen? I think in all case I will always need to do a BlitSurface
on the whole screen no? And this is slow…

I was trying to find an idea by moving the “pixels” property of some surface
but I didn’t succeed to find a good solution…
If someone can help… I am a novice in graphic programmation so maybe my
question was stupid :slight_smile:

Thanks all!

     Ninj

—end quoted text—
Yes, this is a good solution I think…
for scrolling to the right you should do this:

#define TILESIZE 16
#define STEP TILESIZE

for (y = Screen->h - 1; y >= 0; --y)
for (x = 0; x < Screen->w - STEP; ++x)
Screen->pixels[y][x] = Screen->pixels[y][x + STEP];

so on the end you have to add the new tile on the right side… and for scrolling to the left you have to invert the second for…
you’ll need to refresh all… yes… but you don’t need to rewrite the sprites over the new background…

I think this would be much faster… well, this is my two cents…

[]'sOn Sun, Sep 23, 2001 at 04:54:18AM +0200, Ninj wrote:

I was trying to find an idea by moving the “pixels” property of some surface
but I didn’t succeed to find a good solution…
If someone can help… I am a novice in graphic programmation so maybe my
question was stupid :slight_smile:

Marcelo R Leitner
ICQ #: 29966851
Kill’em All … And Justice For All.

Ok, thanks!
And I wondered if I couldn’t use a memcpy for every vertical line, it could
be faster no?

   Ninj

“Marcelo Ricardo Leitner” a ?crit dans le message de
news: mailman.1001257264.20459.sdl at libsdl.org

I was trying to find an idea by moving the “pixels” property of some
surface

but I didn’t succeed to find a good solution…
If someone can help… I am a novice in graphic programmation so maybe
my

question was stupid :slight_smile:
—end quoted text—
Yes, this is a good solution I think…
for scrolling to the right you should do this:

#define TILESIZE 16
#define STEP TILESIZE

for (y = Screen->h - 1; y >= 0; --y)
for (x = 0; x < Screen->w - STEP; ++x)
Screen->pixels[y][x] = Screen->pixels[y][x + STEP];

so on the end you have to add the new tile on the right side… and for
scrolling to the left you have to invert the second for…
you’ll need to refresh all… yes… but you don’t need to rewrite the
sprites over the new background…> On Sun, Sep 23, 2001 at 04:54:18AM +0200, Ninj wrote:

I think this would be much faster… well, this is my two cents…

[]'s

Marcelo R Leitner
ICQ #: 29966851
Kill’em All … And Justice For All.

—end quoted text—
Hmmm… I guess it could be…
but be carefull about memory overlapping…

[]'sOn Sun, Sep 23, 2001 at 10:54:19PM +0200, Ninj wrote:

Ok, thanks!
And I wondered if I couldn’t use a memcpy for every vertical line, it could
be faster no?

Marcelo R Leitner
ICQ #: 29966851
Kill’em All … And Justice For All.

Hi there!
Is there a common solution in SDL to do a fast scrolling of a large
picture?

Well… SDL_BlitSurface() :slight_smile:

For instance:
I have a screen of 640480. My background have a picture of this height
and width. And on this scren are moving sprites.
If I have a picture of 1280
480, how can I simply and very fast make it
scroll on screen? I think in all case I will always need to do a
BlitSurface on the whole screen no? And this is slow…

Well, it is slow on targets that don’t support system RAM -> VRAM DMA
blits, and there’s nothing much to do about that, short of fixing the
drivers…

However, there are a few things to keep in mind:

* Make sure that all graphics is in the screen pixel format.
  (Use SDL_DisplayFormat().)

* DO NOT read from video RAM! Writing to VRAM with the CPU is
  slow, but reading is *ridiculously* slow - even on the
  fastest AGP cards. (Not that this applies to real VRAM - not
  the the screen buffer, if it's a software surface.)

* Note that alpha blending is a read-modify-write operation.
  (And see previous point.)

* AFAIK, it's possible on many targets to keep all surfaces in
  VRAM, and then blit using VRAM->VRAM DMA. However, 2D APIs
  (and thus SDL) rarely support anything beyond colorkey blits,
  so it won't work with alpha blending.

* Use RLE encoding (SDL_RLEACCEL) for alpha blended and
  colorkeyed graphics! It speeds up software blitting a great
  deal.

I was trying to find an idea by moving the “pixels” property of some
surface but I didn’t succeed to find a good solution…

You’re not likely to get it any faster than SDL’s blitting code, even if
you code it in SIMD (MMX, KNI, AltiVec,…) asm code. The problem is not
the blitting itself, but on-the-fly pixel format conversion (fixable) and
slow CPU access to VRAM.

In general, the easiest and fastest way is to construct each frame
entirely in software, in a software surface, and then blit it into
display. This way, you reduce the impact of overdraw and
read-modify-write style operations (such as alpha blending), as all work
is done in the relatively fast system RAM.

One way to do it is to open the screen with the SDL_SWSURFACE flag, and
then use SDL_Flip() to do the blitting.

However, a better solution would be triple buffering with a software
"work" surface. SDL doesn’t inherently support this, but you can
implement it using (SDL_DOUBLEBUF | SDL_HWSURFACE), and a “work” surface
of your own. That is, you render everything into your own surface instead
of into the screen surface, and then flip by blitting the work surface
into the (VRAM) back buffer, and then SDL_Flip(), to switch the back and
display surfaces. This should give you the retrace synced flips (where
available) of ardware pageflipping, as well as the software rendering
performance of system RAM.

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at linuxdj.com -'On Sunday 23 September 2001 04:54, Ninj wrote:

Thank you sincerely very much. I found really all what I was looking for as
informations about fast blitting.
One last question about Format of surface.
Can you give me a fast example how to load all my pictures and sprites to
the screen format to have fatsest blits?
Thank you!

Ninj

“David Olofson” <david.olofson at reologica.se> a ?crit dans le message de
news: mailman.1001372707.11375.sdl at libsdl.org

Hi there!
Is there a common solution in SDL to do a fast scrolling of a large
picture?

Well… SDL_BlitSurface() :slight_smile:

For instance:
I have a screen of 640480. My background have a picture of this height
and width. And on this scren are moving sprites.
If I have a picture of 1280
480, how can I simply and very fast make it
scroll on screen? I think in all case I will always need to do a
BlitSurface on the whole screen no? And this is slow…

Well, it is slow on targets that don’t support system RAM -> VRAM DMA
blits, and there’s nothing much to do about that, short of fixing the
drivers…

However, there are a few things to keep in mind:

  • Make sure that all graphics is in the screen pixel format.
    (Use SDL_DisplayFormat().)

  • DO NOT read from video RAM! Writing to VRAM with the CPU is
    slow, but reading is ridiculously slow - even on the
    fastest AGP cards. (Not that this applies to real VRAM - not
    the the screen buffer, if it’s a software surface.)

  • Note that alpha blending is a read-modify-write operation.
    (And see previous point.)

  • AFAIK, it’s possible on many targets to keep all surfaces in
    VRAM, and then blit using VRAM->VRAM DMA. However, 2D APIs
    (and thus SDL) rarely support anything beyond colorkey blits,
    so it won’t work with alpha blending.

  • Use RLE encoding (SDL_RLEACCEL) for alpha blended and
    colorkeyed graphics! It speeds up software blitting a great
    deal.

I was trying to find an idea by moving the “pixels” property of some
surface but I didn’t succeed to find a good solution…

You’re not likely to get it any faster than SDL’s blitting code, even if
you code it in SIMD (MMX, KNI, AltiVec,…) asm code. The problem is not
the blitting itself, but on-the-fly pixel format conversion (fixable) and
slow CPU access to VRAM.

In general, the easiest and fastest way is to construct each frame
entirely in software, in a software surface, and then blit it into
display. This way, you reduce the impact of overdraw and
read-modify-write style operations (such as alpha blending), as all work
is done in the relatively fast system RAM.

One way to do it is to open the screen with the SDL_SWSURFACE flag, and
then use SDL_Flip() to do the blitting.

However, a better solution would be triple buffering with a software
"work" surface. SDL doesn’t inherently support this, but you can
implement it using (SDL_DOUBLEBUF | SDL_HWSURFACE), and a “work” surface
of your own. That is, you render everything into your own surface instead
of into the screen surface, and then flip by blitting the work surface
into the (VRAM) back buffer, and then SDL_Flip(), to switch the back and
display surfaces. This should give you the retrace synced flips (where
available) of ardware pageflipping, as well as the software rendering
performance of system RAM.

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at linuxdj.com -'On Sunday 23 September 2001 04:54, Ninj wrote:

Look at the parallax examples at:

http://olofson.net/mixed.html

They include pretty much all you need to get started with scrolling.

The most important lines are probably these (from parallax2.c):

—8<-------------------------------------------------------
tiles_bmp = SDL_LoadBMP(“tiles.bmp”);
tiles = SDL_DisplayFormat(tiles_bmp);
SDL_FreeSurface(tiles_bmp);

    /* set colorkey to bright magenta */
    SDL_SetColorKey(tiles,
            SDL_SRCCOLORKEY|SDL_RLEACCEL,
            SDL_MapRGB(tiles->format,255,0,255));

------------------------------------------------------->8—

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at linuxdj.com -'On Tuesday 25 September 2001 01:54, Ninj wrote:

Thank you sincerely very much. I found really all what I was looking
for as informations about fast blitting.
One last question about Format of surface.
Can you give me a fast example how to load all my pictures and sprites
to the screen format to have fatsest blits?

This is all such in-depth and difficult stuff, and I’ve never fully
understood all of it (indeed, you can still do quite a bit without a full
understanding, as I have shown :wink: But I have some questions relating to
this, so I wanted to ask…

However, a better solution would be triple buffering with a software
"work" surface. SDL doesn’t inherently support this, but you can
implement it using (SDL_DOUBLEBUF | SDL_HWSURFACE), and a “work” surface
of your own. That is, you render everything into your own surface instead
of into the screen surface, and then flip by blitting the work surface
into the (VRAM) back buffer, and then SDL_Flip(), to switch the back and
display surfaces. This should give you the retrace synced flips (where
available) of ardware pageflipping, as well as the software rendering
performance of system RAM.

Just to clarify /what/ is meant here (I need to see code, or psuedo-code
;-)…

Here, when you say "blitting the work surface into the (VRAM) back buffer"
you are just blitting your work surface to the current display surface (or
the surface you get from a call to SDL_GetVideoSurface(…) ), right?

In environments that /do not/ support double buffering, is it still faster to
perform one single blit from a work surface to the current display surface
rather than the individual blits comprising the frame (I.e., elliminating the
middle-man)? I personally doubt this is so (but I am checking because I
don’t know for certain).

  • DO NOT read from video RAM! Writing to VRAM with the CPU is
    slow, but reading is ridiculously slow - even on the
    fastest AGP cards. (Not that this applies to real VRAM - not
    the the screen buffer, if it’s a software surface.)

Basically (to clarify) if you set SDL_HWSURFACE to your current display
surface it is in VRAM, but the remainder of your surfaces will not be,
correct?

(I am not a newbie by any means… but I play one on TV ;-)On Monday 24 September 2001 4:07, David Olofson wrote:


Sam “Criswell” Hart <@Sam_Hart> AIM, Yahoo!:
Homepage: < http://www.geekcomix.com/snh/ >
PGP Info: < http://www.geekcomix.com/snh/contact/ >
Tux4Kids: < http://www.geekcomix.com/tux4kids/ >

[…]

However, a better solution would be triple buffering with a software
"work" surface. SDL doesn’t inherently support this, but you can
implement it using (SDL_DOUBLEBUF | SDL_HWSURFACE), and a "work"
surface of your own. That is, you render everything into your own
surface instead of into the screen surface, and then flip by blitting
the work surface into the (VRAM) back buffer, and then SDL_Flip(), to
switch the back and display surfaces. This should give you the
retrace synced flips (where available) of ardware pageflipping, as
well as the software rendering performance of system RAM.

Just to clarify /what/ is meant here (I need to see code, or
psuedo-code ;-)…

Here, when you say “blitting the work surface into the (VRAM) back
buffer” you are just blitting your work surface to the current display
surface (or the surface you get from a call to SDL_GetVideoSurface(…)
), right?

Yes. (You can’t access the front buffer in SDL anyway.)

In environments that /do not/ support double buffering, is it still

You mean hardware page flipping…? (Double buffering is any solution
where you’re not drawing directly into displaying page, in VRAM.)

faster to perform one single blit from a work surface to the current
display surface rather than the individual blits comprising the frame
(I.e., elliminating the middle-man)? I personally doubt this is so
(but I am checking because I don’t know for certain).

This depends on what you do. And note that I focus on full-screen
scrolling - if you animate only minor areas of the screen, it doesn’t
matter much how you do the blits, as long as you avoid the dreaded
"software full screen flip" that SDL does if you ask for double buffering
on a target that doesn’t support it.

If you can get away with no overdraw, and don’t need to read from the
screen surface (ie no alpha blending), rendering directly into the VRAM
buffer (the SDL screen surface) should be faster IF software blitting
is the only way to transfer data from system RAM to VRAM.

If busmaster DMA transfers are used for blitting from the system memory
buffer (whether it’s SDL’s internal software back buffer, or your own
surface) into VRAM, that’s always faster than anything involving directly
writing into VRAM with the CPU. The DMA is much faster than the CPU on
the video card bus (be it PCI or AGP 4x Pro), and it can even run
asynchronously without even wasting too much of the system memory
bandwidth. (System memory is usually much faster than the video card
bus.)

* DO NOT read from video RAM! Writing to VRAM with the CPU is
slow, but reading is *ridiculously* slow - even on the
fastest AGP cards. (Not that this applies to real VRAM - not
                         ^^^^
(This should read "Note", in case that eliminates some confusion. :-)
the the screen buffer, if it's a software surface.)

Basically (to clarify) if you set SDL_HWSURFACE to your current display
surface it is in VRAM, but the remainder of your surfaces will not be,
correct?

Yes - although you can put other surfaces in VRAM as well (using the
SDL_HWSURFACE flag when creating them), if you’re sure that all blitting
you need to do can be done using hardware acceleration. (If it cannot,
you’ll lose big time, as the software blitter will be forced to both read
from and write to VRAM…)

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at linuxdj.com -'On Tuesday 25 September 2001 02:49, Samuel Hart wrote:

On Monday 24 September 2001 4:07, David Olofson wrote:

Using triple buffering though, and SDL_DOUBLEBUF | SDL_HWSURFACE, you
keep the screen surface, a HW back buffer and a software triple buffer.
How do you tell SDL that the HW back buffer is the next in the flipping
chain? So when you call SDL_Flip(screen) it blits the HW surface to the
main surface. I know in Windows and DirectX you need to tell it it is
part of a flipping chain, but in SDL I haven’t seen anything similar,
unless you just mimic buffering by “blit back buffer to screen, blit
triple to back buffer, SDL_Flip(), draw to work surface…” etc. Since
there is no flipping chain, this seems like it’s just a call to
SDL_UpdateRect(); So the final question is: Can you set up a flipping
chain in SDL? Or do you just emulate it like I wrote above?

Thanks in advance…

Jayson Baird
jayson.baird at ndsu.nodak.edu

I just use a little inline assembly using a rep movsd is quite fast.
Just setup esi and edi and ecx and let er rip! Of course this is not
portable to PowerPC platforms.

I am writing a simple 2D game for starters and this method makes for a
frame rate of 400 fps on a 433MHz CPU with a software surface.

Robin.

Ninj wrote:>

Hi there!
Is there a common solution in SDL to do a fast scrolling of a large picture?

For instance:
I have a screen of 640480. My background have a picture of this height and
width. And on this scren are moving sprites.
If I have a picture of 1280
480, how can I simply and very fast make it
scroll on screen? I think in all case I will always need to do a BlitSurface
on the whole screen no? And this is slow…

I was trying to find an idea by moving the “pixels” property of some surface
but I didn’t succeed to find a good solution…
If someone can help… I am a novice in graphic programmation so maybe my
question was stupid :slight_smile:

Thanks all!

     Ninj

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Robin Forster, Systems Engineer,
http://www.rsforster.ottawa.on.ca/

You don’t need to use inline assembly for that - a reasonably smart
compiler (gcc will do) will optimize this (if your code isn’t too
messed up), and it will work on all platforms. For example, if a and
b are pointers, *a = *b uses this. Check it with -S =)

Sorry for beeing offtopic btw…On Wednesday 26. September 2001 00:59 (CEST), you wrote:

I just use a little inline assembly using a rep movsd is quite
fast. Just setup esi and edi and ecx and let er rip! Of course
this is not portable to PowerPC platforms.


Trick


Linux User #229006 * http://counter.li.org

Yeah… Now try and get that software surface transferred to VRAM for
display without dropping the frame rate to some 30-40 Hz or so. heh

This is a major performance issue, and what’s worse; the problem seems to
be the same on Win2k as on XFree86/Linux! No busmaster DMA. It’s faster
on Win2k than on Linux (possibly because the CPU is almost twice as
fast…), but it’s still dog slow.

Is it just the machine I was testing on, my code, or doesn’t SDL attempt
to use DMA transfers from software surfaces to hardware surfaces at all,
on any platform?

I did full screen scrolling with DirectDraw on WinNT 4.0 on a dual P-II
233 some years ago, and could get 60+ FPS in 640x480x16. I would assume
that SDL should be capable of similar or better performance on Win32, on
2-4 times faster hardware, but that doesn’t seem to be the case.
Something’s broken here…

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at linuxdj.com -'On Wednesday 26 September 2001 00:59, Robin Forster wrote:

I just use a little inline assembly using a rep movsd is quite fast.
Just setup esi and edi and ecx and let er rip! Of course this is not
portable to PowerPC platforms.

I am writing a simple 2D game for starters and this method makes for a
frame rate of 400 fps on a 433MHz CPU with a software surface.

I did full screen scrolling with DirectDraw on WinNT 4.0 on a dual P-II
233 some years ago, and could get 60+ FPS in 640x480x16. I would assume
that SDL should be capable of similar or better performance on Win32, on
2-4 times faster hardware, but that doesn’t seem to be the case.
Something’s broken here…

I met a similar problem, but in windowed mode. Just to blit 704x288x32 at
25fps, it was using
90% of a PIII 800 !!! DirectX was not used at all. With a quick and ugly fix,
it is now using about 8% of the cpu.

rono

What did you do to ‘fix’ it?On Wed, Sep 26, 2001 at 03:41:37PM +0200, Renaud Cazoulat wrote:

I did full screen scrolling with DirectDraw on WinNT 4.0 on a dual P-II
233 some years ago, and could get 60+ FPS in 640x480x16. I would assume
that SDL should be capable of similar or better performance on Win32, on
2-4 times faster hardware, but that doesn’t seem to be the case.
Something’s broken here…

I met a similar problem, but in windowed mode. Just to blit 704x288x32 at
25fps, it was using
90% of a PIII 800 !!! DirectX was not used at all. With a quick and ugly fix,
it is now using about 8% of the cpu.

What did you do to ‘fix’ it?

Hum, the DirectX utilization was not so “clear” :slight_smile: So changed the file dx5video.c
to make SDL accept hw acceleration
even if not in full screen and to change the pixel pointer at each surface lock to
follow the window position.
So now writing to surface pixels is really writing directly to the VRAM, without
needs for updating rectangles.
If enough people are interested I can try to clean up this code and to maybe
propose a patch. But may be it would
be obsolete with teh new SDL version ?

Renaud

I did full screen scrolling with DirectDraw on WinNT 4.0 on a dual
P-II 233 some years ago, and could get 60+ FPS in 640x480x16. I would
assume that SDL should be capable of similar or better performance on
Win32, on 2-4 times faster hardware, but that doesn’t seem to be the
case. Something’s broken here…

I met a similar problem, but in windowed mode.

Actually, I supported both fullscreen and windowed mode, and got about
the same performance in both. (Windowed mode is really only a problem if
you want to render directly to the the screen surface. Any software
rendering that requires read-back should be done in system memory anyway.)

Just to blit
704x288x32 at 25fps, it was using
90% of a PIII 800 !!! DirectX was not used at all.

I’m suspecting that’s still the case…

With a quick and
ugly fix, it is now using about 8% of the cpu.

Code? :slight_smile:

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at linuxdj.com -'On Wednesday 26 September 2001 15:41, Renaud Cazoulat wrote:

David Olofson wrote:

I just use a little inline assembly using a rep movsd is quite fast.
Just setup esi and edi and ecx and let er rip! Of course this is not
portable to PowerPC platforms.

I am writing a simple 2D game for starters and this method makes for a
frame rate of 400 fps on a 433MHz CPU with a software surface.

Yeah… Now try and get that software surface transferred to VRAM for
display without dropping the frame rate to some 30-40 Hz or so. heh

That is my frame rate because I only update if there is movement. It
goes down to about 35 fps if I cause continuous movement of the player
map. I have decided to stick to a SW surface for now as I prefer to be
able to use e-mail while I am testing and I hate the glitch when
changing video modes. I won’t bother with them leter I want to play
with OpenGL a bit.> On Wednesday 26 September 2001 00:59, Robin Forster wrote:


Robin Forster, Systems Engineer,
http://www.rsforster.ottawa.on.ca/

David Olofson wrote:

I just use a little inline assembly using a rep movsd is quite
fast. Just setup esi and edi and ecx and let er rip! Of course
this is not portable to PowerPC platforms.

I am writing a simple 2D game for starters and this method makes
for a frame rate of 400 fps on a 433MHz CPU with a software
surface.

Yeah… Now try and get that software surface transferred to VRAM for
display without dropping the frame rate to some 30-40 Hz or so. heh

That is my frame rate because I only update if there is movement.

Yeah, that’s the problem… It’s kind of hard not to update a major
part of the screen every frame in a scrolling game like Kobo Deluxe. :slight_smile:

It
goes down to about 35 fps if I cause continuous movement of the player
map. I have decided to stick to a SW surface for now as I prefer to be
able to use e-mail while I am testing and I hate the glitch when
changing video modes.

What’s wrong with DMA blits or OpenGL in windowed mode? (Except that SDL
won’t do the former, and some 3D cards can’t do the latter… heh)

//David Olofson — Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |--------------------------------------> david at linuxdj.com -'On Wednesday 26 September 2001 21:09, Robin Forster wrote:

On Wednesday 26 September 2001 00:59, Robin Forster wrote:

David Olofson wrote:

It
goes down to about 35 fps if I cause continuous movement of the player
map. I have decided to stick to a SW surface for now as I prefer to be
able to use e-mail while I am testing and I hate the glitch when
changing video modes.

What’s wrong with DMA blits or OpenGL in windowed mode? (Except that SDL
won’t do the former, and some 3D cards can’t do the latter… heh)

I will switch my engine to OpenGL when support becomes available for my
card. Mandrake 8.1 is out soon so I will upgrade and DRI (which I hope
SDL supports) supports OpenGL on the Rage 128 in Xfree 4.1. Hooray!

This will make rotations quick which I need for my player character
sprite.

I admit I am relatively new to game design, by profession I am a real
time and embedded systems programmer doing mostly drivers and the like.

Robin.–
Robin Forster, Systems Engineer,
http://www.rsforster.ottawa.on.ca/

“If I have seen farther than others, it is because I have stood on the
shoulders of giants”, Sir Isaac Newton.