Again about frame rate

I promise that it’s the last e-mail about the fps.
I don’t understand why I have only 32 fps with 3 surface:

1 screen 640x480x32
1 vs 1280x1024x32
1 tiles 320x178x24 (destroyed after the making of map)

all the surface are passed through the SDL_DisplayFormat(), before that
I use this.

I would like do get the tiles from the image in png, grab this and blit
this into the Virtual Screen.
When I get the tiles from the image by the grab funciont I modify all
the tiles by SDL_DisplayFormat();

Under Windows, in my office laptop (P4 2.8Ghz, 512 MB DDR, ATI MOBILITY
RADEON 9000) I have 32 fps.

What’s wrong?

Can anybody help me? I can send all the project, for me is important to
understand where is the mistake.
tnx

Your writing raises a few doubts for me -

all the surface are passed through the SDL_DisplayFormat(), before that I use
this.

By “passed through” you mean you do this

pNewSurf = SDL_DisplayFormat(pOldSurf)
SDL_FreeSurface(pOldSurf)

and not just

SDL_DisplayFormat(pOldSurf)

right?

When I get the tiles from the image by the grab funciont I modify all the
tiles by SDL_DisplayFormat();

Why grab the tiles? Just blit parts of the whole image, using the SDL_Rect parameters. If you do grab, and if you do grab each frame, there’s your major slowdown.

Hope that helps!
–Gabriel

If you look at previous threads on frame rates, I think the general
conclusion was to use OpenGL for the 2D rendering if your target
plaforms are “modern” PC’s.

http://olofson.net/mixed.html

Otherwise, like Gabriel says, you should only be calling
SDL_DisplayFormat once after you have a screen, when your images are
loaded.> I promise that it’s the last e-mail about the fps.

I don’t understand why I have only 32 fps with 3 surface:

1 screen 640x480x32
1 vs 1280x1024x32
1 tiles 320x178x24 (destroyed after the making of map)

all the surface are passed through the SDL_DisplayFormat(), before
that I use this.

I would like do get the tiles from the image in png, grab this and
blit this into the Virtual Screen.
When I get the tiles from the image by the grab funciont I modify all
the tiles by SDL_DisplayFormat();

Under Windows, in my office laptop (P4 2.8Ghz, 512 MB DDR, ATI
MOBILITY RADEON 9000) I have 32 fps.

What’s wrong?

Can anybody help me? I can send all the project, for me is important
to understand where is the mistake.
tnx


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

Could you post your source code? Sounds like a simple project… I’m running
SDL on a much slower machine than yours, and I’ve got FPS to spare… and
I’m redrawing the whole screen each frame in software mode. I’m sure we can
get your code running much faster… well at least just faster.
-Dave> ----- Original Message -----

From: nightiger@gameprog.it (NighTiger)
To: “SDL”
Sent: Friday, March 04, 2005 6:38 AM
Subject: [SDL] Again about frame rate

I promise that it’s the last e-mail about the fps.
I don’t understand why I have only 32 fps with 3 surface:

1 screen 640x480x32
1 vs 1280x1024x32
1 tiles 320x178x24 (destroyed after the making of map)

all the surface are passed through the SDL_DisplayFormat(), before that
I use this.

I would like do get the tiles from the image in png, grab this and blit
this into the Virtual Screen.
When I get the tiles from the image by the grab funciont I modify all
the tiles by SDL_DisplayFormat();

Under Windows, in my office laptop (P4 2.8Ghz, 512 MB DDR, ATI MOBILITY
RADEON 9000) I have 32 fps.

What’s wrong?

Can anybody help me? I can send all the project, for me is important to
understand where is the mistake.
tnx


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

Hi NighTiger, if you look back at one of my posts, I asked if you where
using a laptop, and now you answered that indirectly so I can make some
other conjectures.

Laptops usually support only *ONE* actual video resolution (and lower 

with scaling), associated to the video display. So if you are using a
640x480x32bpp surface and you displays resolution is 1024x768, the video
driver will have to convert that from 640x480 to 1024x768 BEFORE showing
it properly on the screen - and we are talking software conversion here.
This must be making your application run slower - it happened on my
iBook, so I know this problem quite well. Running really fast on the
desktop and about 33fps in the notebook.

BTW, have you ever tried your code on a desktop system?

To see if this is happening to you, try making your game screen the 

same as the usual display resolution (don’t worry about your code, just
change the screen size), if it runs faster (I don’t expect a lot faster,
as the screen will be quite large now), you may be better off with
OpenGL, which is blazing fast and work really well with systems limited
to a single display resolution. I use it and it has solved my issues.

Besides that, one point that bothers me in your code is that you use 

SDL ttf to draw text. If you’re using a hardware surface for the game,
this may be another performance hit. SDL ttf is great for software
surfaces, but blitting the text directly to a hardware surface may
impact performance, so if the previous test doesn’t help, try commenting
the text rendering in your game to see if there’s any change.

Best regards,

Paulo V W Radtke - Chien Loco Jogos de Garagem?

http://blog.chienloco.com
http://www.chienloco.com

NighTiger escreveu:> I promise that it’s the last e-mail about the fps.

I don’t understand why I have only 32 fps with 3 surface:

1 screen 640x480x32
1 vs 1280x1024x32
1 tiles 320x178x24 (destroyed after the making of map)

all the surface are passed through the SDL_DisplayFormat(), before that
I use this.

I would like do get the tiles from the image in png, grab this and blit
this into the Virtual Screen.
When I get the tiles from the image by the grab funciont I modify all
the tiles by SDL_DisplayFormat();

Under Windows, in my office laptop (P4 2.8Ghz, 512 MB DDR, ATI MOBILITY
RADEON 9000) I have 32 fps.

What’s wrong?

Can anybody help me? I can send all the project, for me is important to
understand where is the mistake.
tnx


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

Paulo V W Radtke wrote:

Laptops usually support only ONE actual video resolution (and lower
with scaling), associated to the video display. So if you are using a
640x480x32bpp surface and you displays resolution is 1024x768, the
video driver will have to convert that from 640x480 to 1024x768 BEFORE
showing it properly on the screen - and we are talking software
conversion here.

i doubt that. tft displays are usually connected to a hardware scaler to
avoid this problem, othervise you would not see anything on the screen
when the bios initializes the pc hardware. the pc BIOS only suports VGA
resolution means 640x480. also the os does not know anything about the
fixed resolution of the tft. either you get a proper (but maybe ugly)
scaled display or you will see the infamous letter box thing on your
screen, when you use a resolution other then the displays native one.

to get a software scaled display you have to code that explicitly. there
are solutions out there, though. (gl-scale backend patch)

best regards …
clemens

i doubt that. tft displays are usually connected to a hardware scaler to
avoid this problem, othervise you would not see anything on the screen
when the bios initializes the pc hardware. the pc BIOS only suports VGA
resolution means 640x480. also the os does not know anything about the
fixed resolution of the tft. either you get a proper (but maybe ugly)
scaled display or you will see the infamous letter box thing on your
screen, when you use a resolution other then the displays native one.

That is true for TFT displays for desktop computers (which can cost 

half the price of a whole notebook). But to save costs on notebooks, the
motherboard is custom made and they can make whatever they want with the
boot screen to fit the TFT resolution, which can then be much simpler to
avoid hardware re scalers which increase prices. On a MAC notebook I am
100% sure that this happens (I have one and faced this myself), the
system has only one resolution and all others are rescaled by the
system. And it does slow down a lot the performance of full screen SDL
surfaces on my iBook 900. Changing from 2D SDL to OpenGL was a change
from 33fps to over 500fps.

Not to mention that recently someone was discussing here a problem with 

a game that was running small in the center of a notebook’s display,
when someone mentioned that the problem was the video driver
configuration that was not configured correctly to stretch resolutions
smaller than the notebook fixed TFT display.

Anyway, NighTiger should FIRST try his code on another system to see if 

the problem persists, and I recommend a desktop computer.

Best regards,

Paulo V W Radtke - Chien Loco Jogos de Garagem?

http://blog.chienloco.com
http://www.chienloco.com

Mensaje citado por: Paulo V W Radtke :

i doubt that. tft displays are usually connected to a hardware scaler
to
avoid this problem, othervise you would not see anything on the
screen
when the bios initializes the pc hardware. the pc BIOS only suports
VGA
resolution means 640x480. also the os does not know anything about
the
fixed resolution of the tft. either you get a proper (but maybe
ugly)
scaled display or you will see the infamous letter box thing on your
screen, when you use a resolution other then the displays native
one.

That is true for TFT displays for desktop computers (which can cost
half the price of a whole notebook). But to save costs on notebooks, the

motherboard is custom made and they can make whatever they want with the

boot screen to fit the TFT resolution, which can then be much simpler to

avoid hardware re scalers which increase prices. On a MAC notebook I am

100% sure that this happens (I have one and faced this myself), the
system has only one resolution and all others are rescaled by the
system. And it does slow down a lot the performance of full screen SDL

surfaces on my iBook 900. Changing from 2D SDL to OpenGL was a change
from 33fps to over 500fps.

Not to mention that recently someone was discussing here a problem with

a game that was running small in the center of a notebook’s display,
when someone mentioned that the problem was the video driver
configuration that was not configured correctly to stretch resolutions

smaller than the notebook fixed TFT display.

Anyway, NighTiger should FIRST try his code on another system to see if

the problem persists, and I recommend a desktop computer.

Best regards,

Paulo V W Radtke - Chien Loco Jogos de Garagem?

http://blog.chienloco.com
http://www.chienloco.com


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

Hello

I have a Dell Inspiron 5150 with a Sharp screen (1600x1200) and an Ati M9 64MB
video card. In the Bios of the notebook is a Resize Option. If this option is
enabled all lower resolution will be scaled in hardware to cover the whole
screen, no perfomance hit detected. If the option is disabled the lower
resolutions are centered in the screen with a black frame around them, the Bios
screen too. I dont know if the resize is done by the video card or something
else attached to the screen, but its fast.

Maybe PPC notebooks are different. Which video card has your notebook?

Bye—
Alejandro Arrieta Rios
Ms Cs Student UTFSM
Bs Computer Science UTFSM
Chile

Maybe PPC notebooks are different. Which video card has your notebook?

Mine is a 32MB Radeon 7500 Mobility on a G3 900 iBook. Good to know that there are notebooks that do it properly (hardware, not software), but there IS at least one maker (Apple) that does it the other way, so I would not be so surprised if someone else did it as well.

Paulo

That is true for TFT displays for desktop computers (which can cost
half the price of a whole notebook). But to save costs on notebooks,
the motherboard is custom made and they can make whatever they want
with the boot screen to fit the TFT resolution, which can then be much
simpler to avoid hardware re scalers which increase prices. On a MAC
notebook I am 100% sure that this happens (I have one and faced this
myself), the system has only one resolution and all others are
rescaled by the system. And it does slow down a lot the performance of
full screen SDL surfaces on my iBook 900. Changing from 2D SDL to
OpenGL was a change from 33fps to over 500fps.

Just a comment that this is definitely not true for all Apple
notebooks, I can confirm that an Aluminium Powerbook 12", Titanium
Powerbook 15" and iBook SE do not have this problem.

OTOH I have recently heard from a user of my software that they have
experienced this problem (though I don’t know which Mac model they have
yet).

FredOn 07/03/2005, at 8:46, Paulo V W Radtke wrote:

OTOH I have recently heard from a user of my software that they have
experienced this problem (though I don’t know which Mac model they have
yet).

Just for the record, mine is an iBook G3 900 with a 32MB ATI Radeon 7500.

Best regards,

Paulo V W Radtke - Chien Loco Jogos de Garagem?

http://blog.chienloco.com
http://www.chienloco.com

Just a comment that this is definitely not true for all Apple
notebooks, I can confirm that an Aluminium Powerbook 12", Titanium
Powerbook 15" and iBook SE do not have this problem.

Actually, I don’t know when this started happening, but my Powerbook
12" has started doing this too. Driver changes in 10.3.8?

FredOn 07/03/2005, at 22:07, Fredrick Meunier wrote: