Hi,

Le dimanche 20 novembre 2005 à 12:25 +0100, Jean-Christophe Duberga a
écrit :
> Agree, but the way we have choosen to write wormux make it impossible to 
> be runned on so old hardware :

(...) Yes I know ... I just would like to say, I you wrote, that "we can
do it better" ;-)

> Note: For the SDL_SetVideoMode call with the bpp set as 16, I have 
> already telling that 2 monthes ago :
> https://mail.gna.org/public/wormux-dev/2005-09/msg00014.html
> with the explaination of why we don't fix the bpp to 16 bits per pixels.

It really goes slower when I use 16 bpp (8 instead of 21 fps). I choosed
*32* bpp in SDL_SetVideoMode. But 0 is maybe better !?

> Ok, that is really faster when you don't move but when you move the 
> camera, the FPS fall down as before... not?

Yes. But I think that the "cache patch" wouldn't impact on performances.
So on critical moments, the game just would works as yet (display
everything).

But ... on 70% of time (at least) ... nothing happens. So we will have
something like 200 fps (we can dream) on 70% of time, and maybe 100 fps
on critical moments :-)

> Ok, if you are intersted, I can write a map method to redraw the map( 
> sky / ground ) of a rectangle area and not all the screen then with a 
> such method you can apply your patch ?

I think that with SDL it would be *very* easy because Blit function
accept (need) rectangles :-) But we also need a cache for TTF rendering
(eg. keep 200 objects with a algorithm to sort them as "last used", good
algorithms exist).

> Oh oh... with our software graphic surface alpha blending functions, 
> that would be always faster to draw A and B as drawing the big A+B (ok, 
> that is not true when A and B measure each 1pixel and are adjacent but 
> for our surfaces that will be always true). Why ? the alpha blitting 
> functions have a small overhead and are  very dependents of the number 
> of blended pixels .

Ok, so we can start with dumb cache, and then maybe improve it.

Bye, Haypo
-- 
Victor Stinner - étudiant à l'UTBM (Belfort, France)
http://www.haypocalc.com/wiki/Accueil

Attachment: signature.asc
Description: This is a digitally signed message part

Répondre à