glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] Threads ?


From: Bo Lorentsen
Subject: Re: [glob2-devel] Threads ?
Date: Wed, 11 May 2005 13:09:16 +0200
User-agent: Debian Thunderbird 1.0.2 (X11/20050331)

Nuage wrote:

Hello, thank you for your interrest.
I like the AI framework, and like to learn something more about this (and maybe play along, too), so it's purely for my own benefit :-)

From a technical poit of view, we could still use sepatate threads and
display every frame exactly once. The idea would be to start the displaying
process just once the first computation step is finished, and to start the
next displaying and computation process step only once both are finished.
              __compute(1)__    __compute(2)__
__compute(0)__/              \__/              \__
             \__display(0)__/  \__display(1)__/  \__display(2)__/
I guess this is more and less what I imagined, but I was thinking about some kind of display event que or hints, to prevent it from any kind of unnessesary updates. Only when some elements in the map have changed state (I know I need to use more glob2 terms), the display will refresh.

The reason for this was also to separate the compute and display thread more clearly, but it is very possible that I may have misunderstood some of the flow in the code.

But this would need some more architecture. More important, we would maybe
loose the greater feature: be able to use "valgrind" wouldn't we ? Anyone
exactly know, because we really need it!
I have used valgrind on applications that was threaded, and it worked OK.

The other thing to say is that we may implement it in a way that both models are possible (two kind of game loops).

Btw. There is a "TODO" list in the CVS, and some of the content is not in English ! Is this an outdated TODO list, or is it just secret :-)

/BL




reply via email to

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