Smooth Scrolling

Okay, I’m hitting a small snag, and it’s most likely because I’m doing
something wrong… or just don’t know the correct way.

I’ve a 800x600 resolution screen and a 1280x1280, 16 bit buffer that is
my map. When I need to scroll one pixel in a direction, I just blit over
the new area from the buffer to the screen, here’s the basic code:

void drawScreen( void )
{

SDL_Rect dest;

dest.x = (currentX * 32) - (tile_Xoffset * 4);
dest.y = currentY * 32;
dest.w = 800;
dest.h = 600;

int result;

result = SDL_BlitSurface(buffer, &dest, screen, NULL);

printf("Result: %d", result);

SDL_UpdateRect(screen, 0, 0, screenW, screenH);

}

My problem is that this is slow… scrolling 32 pixels, one at a time,
crawls at a snail’s pace. Am I doing something wrong? Or is it just
that I’m using such a large surface to blit from?

And yes, I know it’s missing bounds checks and such, it’s alpha code.

Kiyote

James Littlefield wrote:

Okay, I’m hitting a small snag, and it’s most likely because I’m doing
something wrong… or just don’t know the correct way.

I’ve a 800x600 resolution screen and a 1280x1280, 16 bit buffer that is
my map. When I need to scroll one pixel in a direction, I just blit over
the new area from the buffer to the screen, here’s the basic code:

My problem is that this is slow… scrolling 32 pixels, one at a time,
crawls at a snail’s pace. Am I doing something wrong? Or is it just
that I’m using such a large surface to blit from?

The most likely problem is that the source and destination surfaces have
different pixel formats. SDL handles this conversion silently, but it
makes blitting much slower. Use SDL_DisplayFormat on the map to convert
it to the display’s pixel format before you blit with it.

-John–
Underfull \account (badness 10000) has occurred while \spend is active
John R. Hall - Student, Georgia Tech - Contractor, Loki Software

Hello,

I’m new to SDL and experimenting with it by trying to write some simple game. It seems my problem has been brought up before, but I haven’t read anything that solved my problem. Problem is how to scroll smoothly.

I have a large background image that I scroll on a 640x480 screen surface. I init the screen with:

screen=SDL_SetVideoMode(640,480,24,SDL_HWSURFACE|SDL_FULLSCREEN);

I move the picture by:

SDL_Rect dest;
SDL_Rect src;

src.w=640;
src.h=400;

dest.x=0;
dest.y=0;

src.x=player->x+1024;
src.y=player->y+768;
SDL_BlitSurface(levelbg, &src, screen, &dest);
SDL_Flip(screen);

(where something updates the x and y coordinates)

The image moves allright, but not smoothly. I guess it does what people calls “tearing”. I have tried with a SWSURFACE and a HWSURFACE, but it’s pretty much the same result (with or without doublebuffer). I have a geforce4 card, and I have installed the nvidia driver for linux redhat9, and it seems to be working allright (other games run smoothly after I installed the driver). I do not know really how to tell SDL to use the nvidia driver, if it does not do it by default. I have also tried the “dga” driver, since someone said it was the only one supporting double buffering with vertical sync (which seems to be the problem), but SDL exited because it could not find the driver… I think.

What I want to know is, if there’s no way to get smooth scrolling with a SWSURFACE? By syncing with vertival screen updates or something. Or else, how I get to use the HWSURFACE correctly.

It must be possible to get smooth scrolling somehow… I played some SDL games for linux that does it fine enough.

Regards
Henning

Henning,

Try incrementing the Y or X variable of the image rect. Like so:

SDL_Rect backgroundLocation;

pictureLocation.x = 0;
pictureLocation.w = 1024; //this is the width
pictureLocation.h = 768; //this is the height

//blit your background here…

pictureLocation.y = scrollPosition;
scrollPosition–;

SDL_BlitSurface (background, &pictureLocation, screen, NULL);

//Try this for a faster scroll:

pictureLocation.y = scrollPosition;
scrollPosition -= 5;

SDL_BlitSurface (background, &pictureLocation, screen, NULL);

This has given me a wonderfully smooth and controllable scrolling
effect.

Cheers,
MaxOn Wednesday, September 3, 2003, at 02:40 PM, Henning wrote:

Hello,

I’m new to SDL and experimenting with it by trying to write some
simple game. It seems my problem has been brought up before, but I
haven’t read anything that solved my problem. Problem is how to scroll
smoothly.

I have a large background image that I scroll on a 640x480 screen
surface. I init the screen with:

screen=SDL_SetVideoMode(640,480,24,SDL_HWSURFACE|SDL_FULLSCREEN);

I move the picture by:

SDL_Rect dest;
SDL_Rect src;

src.w=640;
src.h=400;

dest.x=0;
dest.y=0;

src.x=player->x+1024;
src.y=player->y+768;
SDL_BlitSurface(levelbg, &src, screen, &dest);
SDL_Flip(screen);

(where something updates the x and y coordinates)

The image moves allright, but not smoothly. I guess it does what
people calls “tearing”. I have tried with a SWSURFACE and a HWSURFACE,
but it’s pretty much the same result (with or without doublebuffer). I
have a geforce4 card, and I have installed the nvidia driver for linux
redhat9, and it seems to be working allright (other games run
smoothly after I installed the driver). I do not know really how to
tell SDL to use the nvidia driver, if it does not do it by default. I
have also tried the “dga” driver, since someone said it was the only
one supporting double buffering with vertical sync (which seems to be
the problem), but SDL exited because it could not find the driver… I
think.

What I want to know is, if there’s no way to get smooth scrolling with
a SWSURFACE? By syncing with vertival screen updates or something. Or
else, how I get to use the HWSURFACE correctly.

It must be possible to get smooth scrolling somehow… I played some
SDL games for linux that does it fine enough.

Regards
Henning


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: text/enriched
Size: 2810 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20030903/a18507db/attachment.bin

It still doesn’t scroll the right way. Also I was updating the X and Y values in the original code, just somewhere else.
It really looks like the screen is updated before the “screen buffer” is filled with the new values.
I’m able to keep my framerate just around 50 constantly, so it’s not a problem with too slow updating (or should not be I think).
Do someone has some advice? Or can post some scrolling code that produces smooth scrolling that I could take a look at?

Thanks in advance.

Regards
HenningOn Wed, 3 Sep 2003 19:07:59 -0700 Max Countryman wrote:

Henning,

Try incrementing the Y or X variable of the image rect. Like so:

SDL_Rect backgroundLocation;

pictureLocation.x = 0;
pictureLocation.w = 1024; //this is the width
pictureLocation.h = 768; //this is the height

//blit your background here…

pictureLocation.y = scrollPosition;
scrollPosition–;

SDL_BlitSurface (background, &pictureLocation, screen, NULL);

//Try this for a faster scroll:

pictureLocation.y = scrollPosition;
scrollPosition -= 5;

SDL_BlitSurface (background, &pictureLocation, screen, NULL);

This has given me a wonderfully smooth and controllable scrolling
effect.

Cheers,
Max

On Wednesday, September 3, 2003, at 02:40 PM, Henning wrote:

Hello,

I’m new to SDL and experimenting with it by trying to write some
simple game. It seems my problem has been brought up before, but I
haven’t read anything that solved my problem. Problem is how to scroll
smoothly.

I have a large background image that I scroll on a 640x480 screen
surface. I init the screen with:

screen=SDL_SetVideoMode(640,480,24,SDL_HWSURFACE|SDL_FULLSCREEN);

I move the picture by:

SDL_Rect dest;
SDL_Rect src;

src.w=640;
src.h=400;

dest.x=0;
dest.y=0;

src.x=player->x+1024;
src.y=player->y+768;
SDL_BlitSurface(levelbg, &src, screen, &dest);
SDL_Flip(screen);

(where something updates the x and y coordinates)

The image moves allright, but not smoothly. I guess it does what
people calls “tearing”. I have tried with a SWSURFACE and a HWSURFACE,
but it’s pretty much the same result (with or without doublebuffer). I
have a geforce4 card, and I have installed the nvidia driver for linux
redhat9, and it seems to be working allright (other games run
smoothly after I installed the driver). I do not know really how to
tell SDL to use the nvidia driver, if it does not do it by default. I
have also tried the “dga” driver, since someone said it was the only
one supporting double buffering with vertical sync (which seems to be
the problem), but SDL exited because it could not find the driver… I
think.

What I want to know is, if there’s no way to get smooth scrolling with
a SWSURFACE? By syncing with vertival screen updates or something. Or
else, how I get to use the HWSURFACE correctly.

It must be possible to get smooth scrolling somehow… I played some
SDL games for linux that does it fine enough.

Regards
Henning


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

Henning, we are not here to write your code for you. The code you are
using, and the example I provided should work just fine. I suggest you
spend some time working on this problem rather than having others do it
for you.

Cheers,
MaxOn Thursday, September 4, 2003, at 11:27 AM, Henning wrote:

It still doesn’t scroll the right way. Also I was updating the X and Y
values in the original code, just somewhere else.
It really looks like the screen is updated before the "screen buffer"
is filled with the new values.
I’m able to keep my framerate just around 50 constantly, so it’s not a
problem with too slow updating (or should not be I think).
Do someone has some advice? Or can post some scrolling code that
produces smooth scrolling that I could take a look at?

Thanks in advance.

Regards
Henning

On Wed, 3 Sep 2003 19:07:59 -0700 Max Countryman <@Max_Countryman> wrote:

Henning,

Try incrementing the Y or X variable of the image rect. Like so:

SDL_Rect backgroundLocation;

pictureLocation.x = 0;
pictureLocation.w = 1024; //this is the width
pictureLocation.h = 768; //this is the height

//blit your background here…

pictureLocation.y = scrollPosition;
scrollPosition–;

SDL_BlitSurface (background, &pictureLocation, screen, NULL);

//Try this for a faster scroll:

pictureLocation.y = scrollPosition;
scrollPosition -= 5;

SDL_BlitSurface (background, &pictureLocation, screen, NULL);

This has given me a wonderfully smooth and controllable scrolling
effect.

Cheers,
Max

On Wednesday, September 3, 2003, at 02:40 PM, Henning wrote:

Hello,

I’m new to SDL and experimenting with it by trying to write some
simple game. It seems my problem has been brought up before, but I
haven’t read anything that solved my problem. Problem is how to
scroll
smoothly.

I have a large background image that I scroll on a 640x480 screen
surface. I init the screen with:

screen=SDL_SetVideoMode(640,480,24,SDL_HWSURFACE|SDL_FULLSCREEN);

I move the picture by:

SDL_Rect dest;
SDL_Rect src;

src.w=640;
src.h=400;

dest.x=0;
dest.y=0;

src.x=player->x+1024;
src.y=player->y+768;
SDL_BlitSurface(levelbg, &src, screen, &dest);
SDL_Flip(screen);

(where something updates the x and y coordinates)

The image moves allright, but not smoothly. I guess it does what
people calls “tearing”. I have tried with a SWSURFACE and a
HWSURFACE,
but it’s pretty much the same result (with or without doublebuffer).
I
have a geforce4 card, and I have installed the nvidia driver for
linux
redhat9, and it seems to be working allright (other games run
smoothly after I installed the driver). I do not know really how to
tell SDL to use the nvidia driver, if it does not do it by default. I
have also tried the “dga” driver, since someone said it was the only
one supporting double buffering with vertical sync (which seems to be
the problem), but SDL exited because it could not find the driver…
I
think.

What I want to know is, if there’s no way to get smooth scrolling
with
a SWSURFACE? By syncing with vertival screen updates or something. Or
else, how I get to use the HWSURFACE correctly.

It must be possible to get smooth scrolling somehow… I played some
SDL games for linux that does it fine enough.

Regards
Henning


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


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

Take a look at :
http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/index… the
last tutorial is about scrolling.

Julien> ----- Original Message -----

From: eddie@imada.sdu.dk (Henning)
To:
Sent: Thursday, September 04, 2003 8:27 PM
Subject: Re: [SDL] Smooth Scrolling

It still doesn’t scroll the right way. Also I was updating the X and Y
values in the original code, just somewhere else.
It really looks like the screen is updated before the “screen buffer” is
filled with the new values.
I’m able to keep my framerate just around 50 constantly, so it’s not a
problem with too slow updating (or should not be I think).
Do someone has some advice? Or can post some scrolling code that produces
smooth scrolling that I could take a look at?

Thanks in advance.

Regards
Henning

On Wed, 3 Sep 2003 19:07:59 -0700 Max Countryman wrote:

Henning,

Try incrementing the Y or X variable of the image rect. Like so:

SDL_Rect backgroundLocation;

pictureLocation.x = 0;
pictureLocation.w = 1024; //this is the width
pictureLocation.h = 768; //this is the height

//blit your background here…

pictureLocation.y = scrollPosition;
scrollPosition–;

SDL_BlitSurface (background, &pictureLocation, screen, NULL);

//Try this for a faster scroll:

pictureLocation.y = scrollPosition;
scrollPosition -= 5;

SDL_BlitSurface (background, &pictureLocation, screen, NULL);

This has given me a wonderfully smooth and controllable scrolling
effect.

Cheers,
Max

On Wednesday, September 3, 2003, at 02:40 PM, Henning wrote:

Hello,

I’m new to SDL and experimenting with it by trying to write some
simple game. It seems my problem has been brought up before, but I
haven’t read anything that solved my problem. Problem is how to scroll
smoothly.

I have a large background image that I scroll on a 640x480 screen
surface. I init the screen with:

screen=SDL_SetVideoMode(640,480,24,SDL_HWSURFACE|SDL_FULLSCREEN);

I move the picture by:

SDL_Rect dest;
SDL_Rect src;

src.w=640;
src.h=400;

dest.x=0;
dest.y=0;

src.x=player->x+1024;
src.y=player->y+768;
SDL_BlitSurface(levelbg, &src, screen, &dest);
SDL_Flip(screen);

(where something updates the x and y coordinates)

The image moves allright, but not smoothly. I guess it does what
people calls “tearing”. I have tried with a SWSURFACE and a HWSURFACE,
but it’s pretty much the same result (with or without doublebuffer). I
have a geforce4 card, and I have installed the nvidia driver for linux
redhat9, and it seems to be working allright (other games run
smoothly after I installed the driver). I do not know really how to
tell SDL to use the nvidia driver, if it does not do it by default. I
have also tried the “dga” driver, since someone said it was the only
one supporting double buffering with vertical sync (which seems to be
the problem), but SDL exited because it could not find the driver… I
think.

What I want to know is, if there’s no way to get smooth scrolling with
a SWSURFACE? By syncing with vertival screen updates or something. Or
else, how I get to use the HWSURFACE correctly.

It must be possible to get smooth scrolling somehow… I played some
SDL games for linux that does it fine enough.

Regards
Henning


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


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

I am working on it. But as I said, I have tried different methods and it
does scroll, but not very smoothly. Therefore I asked around for help, I
fail to see the crime in that.
I think I know what my problem is, I have described it and asked for help,
nothing more.

Regards
Henning> Henning, we are not here to write your code for you. The code you are

using, and the example I provided should work just fine. I suggest you
spend some time working on this problem rather than having others do it
for you.

Ok I will try to give you some tips. First, you must convert the surfe you
are blitting on the sreen to the correct format, otherwise the surfaces are
converted on the fly, which slow down your app. Then, to get a reasonable
amount of fps with software suface, you should try a lower bitdepth like 16
bit to reduce the amount of data transfered from the main memory to the
video memory. With hardware surfaces you don’t have this problem, since all
surfaces are stored in the video memory, the data doesn’t travel by the
system bus (correct me if I am wrong). I think this assumes that the video
card is able to copy the data by itself.

Hope that helps a bit

Julien> ----- Original Message -----

From: @Julien_Pauty (Julien Pauty)
To:
Sent: Friday, September 05, 2003 10:19 AM
Subject: Re: [SDL] Smooth Scrolling

Take a look at :
http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/index
the
last tutorial is about scrolling.

Julien
----- Original Message -----
From: “Henning”
To:
Sent: Thursday, September 04, 2003 8:27 PM
Subject: Re: [SDL] Smooth Scrolling

It still doesn’t scroll the right way. Also I was updating the X and Y
values in the original code, just somewhere else.
It really looks like the screen is updated before the “screen buffer” is
filled with the new values.
I’m able to keep my framerate just around 50 constantly, so it’s not a
problem with too slow updating (or should not be I think).
Do someone has some advice? Or can post some scrolling code that
produces
smooth scrolling that I could take a look at?

Thanks in advance.

Regards
Henning

On Wed, 3 Sep 2003 19:07:59 -0700 Max Countryman wrote:

Henning,

Try incrementing the Y or X variable of the image rect. Like so:

SDL_Rect backgroundLocation;

pictureLocation.x = 0;
pictureLocation.w = 1024; //this is the width
pictureLocation.h = 768; //this is the height

//blit your background here…

pictureLocation.y = scrollPosition;
scrollPosition–;

SDL_BlitSurface (background, &pictureLocation, screen, NULL);

//Try this for a faster scroll:

pictureLocation.y = scrollPosition;
scrollPosition -= 5;

SDL_BlitSurface (background, &pictureLocation, screen, NULL);

This has given me a wonderfully smooth and controllable scrolling
effect.

Cheers,
Max

On Wednesday, September 3, 2003, at 02:40 PM, Henning wrote:

Hello,

I’m new to SDL and experimenting with it by trying to write some
simple game. It seems my problem has been brought up before, but I
haven’t read anything that solved my problem. Problem is how to
scroll

smoothly.

I have a large background image that I scroll on a 640x480 screen
surface. I init the screen with:

screen=SDL_SetVideoMode(640,480,24,SDL_HWSURFACE|SDL_FULLSCREEN);

I move the picture by:

SDL_Rect dest;
SDL_Rect src;

src.w=640;
src.h=400;

dest.x=0;
dest.y=0;

src.x=player->x+1024;
src.y=player->y+768;
SDL_BlitSurface(levelbg, &src, screen, &dest);
SDL_Flip(screen);

(where something updates the x and y coordinates)

The image moves allright, but not smoothly. I guess it does what
people calls “tearing”. I have tried with a SWSURFACE and a
HWSURFACE,

but it’s pretty much the same result (with or without doublebuffer).
I

have a geforce4 card, and I have installed the nvidia driver for
linux

redhat9, and it seems to be working allright (other games run
smoothly after I installed the driver). I do not know really how to
tell SDL to use the nvidia driver, if it does not do it by default.
I

have also tried the “dga” driver, since someone said it was the only
one supporting double buffering with vertical sync (which seems to
be

the problem), but SDL exited because it could not find the driver…
I

think.

What I want to know is, if there’s no way to get smooth scrolling
with

a SWSURFACE? By syncing with vertival screen updates or something.
Or

else, how I get to use the HWSURFACE correctly.

It must be possible to get smooth scrolling somehow… I played some
SDL games for linux that does it fine enough.

Regards
Henning


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


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


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

Check this out:
http://olofson.net/examples.html

There are parallax scrolling and OpenGL smooth scrolling examples.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Henning, the ‘crime’ is that you ARE NOT working on this problem before
asking us. You expect us to give you the answers. You should know that
some people get paid to give the answers and write code for others. I
suggest you take this elsewhere if you expect someone to write out the
code for you.

Cheers,
MaxOn Friday, September 5, 2003, at 02:13 AM, eddie at odense.kollegienet.dk wrote:

I am working on it. But as I said, I have tried different methods and
it
does scroll, but not very smoothly. Therefore I asked around for
help, I
fail to see the crime in that.
I think I know what my problem is, I have described it and asked for
help,
nothing more.

Regards
Henning

Henning, we are not here to write your code for you. The code you are
using, and the example I provided should work just fine. I suggest you
spend some time working on this problem rather than having others do
it
for you.


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

You said something about tearing among other things, which leads me to
believe your “problem” is that you expect scrolling to be perfectly
smooth, arcade machine style. However, there are various problems
that makes this very hard to achieve on PC style platforms. Most
importantly:

* You cannot reliably select a fixed video refresh
  rate that you can base scrolling speeds and animation
  timing upon. You have to make the game work with
  whatever you get.

  Check out my scrolling examples. Have a look at the
  Kobo Deluxe graphics engine for a much more
  sophisticated approach, with a fixed logic frame rate
  and interpolated graphics coordinates.

  URLs:
	http://olofson.net/examples.html
	http://www.olofson.net/kobodl/

* There are many drivers that just don't support
  retrace sync or hardware page flipping. Without that,
  you're basically out of luck; there will always be
  tearing. Deal with it.

  Or maybe not! While experimenting with ultra smooth
  scrolling using OpenGL and sub-pixel accurate
  positioning, I discovered that this, combined with
  abuse of the extreme fillrates of modern 3D cards
  has the side effect of minimizing tearing, even if
  there is no retrace sync. Check out my smoothscroll
  demo:

	http://olofson.net/examples.html

That’s about it. If this won’t do, you’re still doing something wrong,
or your demands are just too high for PC-like gaming platforms. If my
demos look ok to you, it’s probably the former. If not, well, I guess
you should consider developing only for game consoles and/or arcade
machines. :wink:

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Friday 05 September 2003 11.13, eddie at odense.kollegienet.dk wrote:

I am working on it. But as I said, I have tried different methods
and it does scroll, but not very smoothly. Therefore I asked
around for help, I fail to see the crime in that.
I think I know what my problem is, I have described it and asked
for help, nothing more.

That’s about it. If this won’t do, you’re still doing something wrong,
or your demands are just too high for PC-like gaming platforms. If my
demos look ok to you, it’s probably the former.

It’s definetely the former. Your demos look great and I guess there’s nothing wrong with the setup on my computer, since it seems like it can be done. Thanks for your help.
One thing that seems to help making my scrolling look smoother is to not delay the loop (trying to get a more or less fixed framerate), but I guess this will mean trouble on faster computers, so still experimenting.

Regards
Henning

P.S Yes, my observations may seem obvious. Please remember I’m new to this.

That’s about it. If this won’t do, you’re still doing something
wrong, or your demands are just too high for PC-like gaming
platforms. If my demos look ok to you, it’s probably the former.

It’s definetely the former. Your demos look great and I guess
there’s nothing wrong with the setup on my computer, since it seems
like it can be done. Thanks for your help. One thing that seems to
help making my scrolling look smoother is to not delay the loop
(trying to get a more or less fixed framerate), but I guess this
will mean trouble on faster computers, so still experimenting.

Uh oh… Trying to fix the frame rate is usually futile, since it just
doesn’t work very well (unless you have a real time OS), and even if
it did, it would interfere with the video refresh rate. The latter is
more obvious with retrace sync, but OTOH, if you don’t have retrace
sync, the best you can do is try to keep the frame rate as high as
possible. Actually, as the smoothscroll demo will show if you disable
retrace sync on a fast 3D card, higher is better, without
restriction. If you get 1000 fps on a 100 Hz display, that means you
get approximately ten “bands” of tearing across the screen. This may
sound terrible, but the thing is that as you get more of these bands,
they get less visible (smaller change between rendered frames), and
thus, the tearing becomes more of a slight, gradual "time shear"
across the screen.

Anyway, the only problem fast computers will give you is that they
allow you to consume lots of power if there’s no retrace sync. That
may be a real issue on battery powered machines! In such cases,
you’ll have to let the user decide; retricted frame rate, or the
smoothest possible scrolling.

Just keep in mind that you really can get over 1000 fps with a fast
3D card, so be careful with how you deal with delta times for the
game logic. You may get deltas of 0 ms every now and then, and even
if you don’t, you have to prevent error build-up, as that could get
very significant when you have some 1-5 ms/frame.

P.S Yes, my observations may seem obvious. Please remember I’m new
to this.

Nothing is obvious about this stuff…! :wink:

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Friday 05 September 2003 23.49, Henning wrote: