Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] SDL speed test
Home

[Freeciv-Dev] SDL speed test

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] SDL speed test
From: Per Inge Mathisen <per@xxxxxxxxxxx>
Date: Sun, 10 Oct 2004 14:58:27 +0000 (GMT)

To learn more about what SDL can and cannot do, I set down to make a
rather simple demo. It is a 1024x768 scrolling + animation demo. You can
scroll with arrow keys (30 pixels precision), shift+arrow keys (1 pixel
precision), with alt+arrow keys (3 pixels precision) or drag with mouse as
in ftwl client. Click with left mouse button to draw on the map.

The program runs in a loop, attempting to redraw the entire map at once
and put the mapview graphics on top up to 60 times per second. Each 300ms
it will change the animations. It will report how many frames per second
it manages each second.

To compile you need SDL, SDL_image and SDL_gfx. You can find SDL_gfx here:
http://www.ferzkopp.net/~aschiffler/Software/SDL_gfx-2.0/

Download test app: http://www.leftist.net/perrin/fc.test2.tar.gz (~200kb)

Please give it a try and report what kind of numbers you get, and if you
get hardware surfaces or double buffering (it says if you do on start).

  - Per



[Prev in Thread] Current Thread [Next in Thread]