Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] ftwl: Rewrite main redraw loop
Home

[Freeciv-Dev] ftwl: Rewrite main redraw loop

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: Raimar Falke <hawk@xxxxxxxxxxxxxxxxx>
Subject: [Freeciv-Dev] ftwl: Rewrite main redraw loop
From: Per Inge Mathisen <per@xxxxxxxxxxx>
Date: Sat, 9 Oct 2004 13:42:01 +0000 (GMT)

(Reposting this to list only, as RT seems defunct ATM.)

I found the problem with the SDL backend. SDL was innocent of all charges,
and the same was the SDL backend code. Turns out the problem was that the
redraw loop was ... pretty much non-existent. Basically there would be
redraws at random intervals due to other stuff happening, but not as a
result of actual map movement. The x11 backend had fixed this by inserting
a call to the high-level sw_paint_all() function directly into the
low-level backend code. The sdl backend did not have this incredible
kludge.

So, I decided to make a change I had long wanted, making ftwl a
constant-frame-rate application. This is nice for doing animations. The
framerate should probably be either user set or dynamic, depending on
speed of graphics hardware, but so far a fixed FPS of 20 at least makes
the graphics smooth pretty much irrespective of backend choice.

To change the FPS, just change the #define FTWL_FPS in the top of
client/gui-ftwl/gui_main.c to another value.

  - Per

Attachment: ftwlfps.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] ftwl: Rewrite main redraw loop, Per Inge Mathisen <=