Laurent Defert Simonneau wrote:

Using the map 'Cowland', on a pentium 4 M, at 2.0GHz, with a GeForce 4:
- 20~30 fps in 640x480
- 10~15 fps in 800x600
Which is quite slow compared to your performance :(
Your results are not very different as mines ( as framerate is not the same on every maps and is not constant)

With the map 'Cowland' ( which have a lot of alpha belended wind particules "nuages")

Alpha belnded ground :
-> 21-32 fps in 800x600 -> 15-20 fps in 1024x700
CPU usage : 90%

Colorkey blitted ground :
-> 40-50 fps in 800x600
-> 28-33 fps in 1024x700
CPU usage : 80%

In order to switch the ground transparency to "colorkey", add a line in your ~/.wormux/config.xml file like in the attached file at line 14 :

<transparency>colorkey</transparency>


I don't know many things about SDL flags..
If it helps, there is a function in one of paragui examples, which
initializes sdl with the best gfx flags. It's in the test/dblbuffer.cpp,
or the main part of this code in attachement to this mail.
I have read this file but is there things that looks strange to me:

1) They use the SDL_HWSURFACE flag when your app is fullscreen what is a non sense to me. SDL_HWSURFACE gain to be activated when the system support hardware surface ( fullscreen or not, that make no differences) and for surface you don't want to access/modify by the CPU (i.e static surfaces)

2) It's impossible for a program to determine if this is good or not to use the SDL_RLEACCEL.
Only the coder can know it as it is good when:
- the surface contains mainly long sequences of pixels with the same alpha/color ( which is the case with our ground tiles) - the surface is intented to be mainly blitted and only a few times accessed/modified.


I will write a page about software vs hardware surfaces and alpha blending vs colorkey blitting on the wiki.

a+
Jean-Christophe

--
Jean-Christophe Duberga - http://jeanchristophe.duber.free.fr
webmaster du site MNEA  - http://www.mnea.fr

<?xml version="1.0" encoding="iso-8859-1"?>
<config>
  <data_dir>../data/</data_dir>
  <locale_dir>../locale/</locale_dir>
  <map>Pirates</map>
  <teams>
    <team>pink_floyd</team>
    <team>poulpe</team>
  </teams>
  <video>
    <width>800</width>
    <height>600</height>
    <full_screen>0</full_screen>
    <transparency>alpha</transparency>
  </video>
  <sound>
    <active>1</active>
    <music>1</music>
    <effects>1</effects>
    <frequency>22050</frequency>
  </sound>
  <game_mode>classic</game_mode>
</config>

Répondre à