Code center > Suggestions
Regarding the enviroment grid!
Greven:
Okay I have thought about the environment grid, and under all circumstances we need it.
What is the problem:
To CPU expensive, will slow down the simulation a lot! (Just to update others)
So what can we do? I have read on our wiki about this, and I recently had a course at uni, about OS' and Multiprogramming, so a simple idea started to form in my tiny head. In the VB version it will be nearly impossible to add threads (the timer being the best bet), but I the C version, it should be no problem, or so I think (but I do not known how we do it exactly). We could have a main thread with as it is now, and a secondary environment grid thread. Still this needs some more considerations, as is, but right now the C version is threaded, by the one main and the GUI.
Please correct me if I am wrong.
Numsgil:
Yes, threading is an option if you have an idea that could use it.
If you've read what I have on the wiki about it, then you know as much as I know about it. Especially be sure to read the posting on the Gamedev forum about it.
Feel free to share
Greven:
Geee I have "easter free" as I might put it. It will think a little more about it, but maybe I come up with nada!
EricL:
In general, threading won't buy us much w.r.t. overall performance unless running on an MP machine. The architecture is CPU bound on a single proc box even in the current VB version. Threading alone, no matter what you thread, won't increase speed of sim execution on a single proc box (and might slow it down a few percent due to context switching overhead) though it does have the potential to improve things like UI responsiveness to the user (I beleive Nums already has the UI in it's own thread in the C++ version). Algorithim improvement like what Nums has been working on is the best bet for notable performance improvements in the new version.
Greven:
EricL that might just be true. About the UI (GUI) I already hinted that Num had incorporated a secondary therad, but it was just some random thoughts shooting wild. I really hope to see a nicely implemented enviroment grid w. diffusion etc., and I really hope that Num will succed.
Regarding the algorithmic approach I cannot agree more, and Num have already found numerous ways to improve both eye-recognition and the collision detection. But w/o some miracle, the improvements in this area (which alone, threads will not improve at all) will do nothing, unless we settle for some less than perfect approach regarding the grid. However this might be the case (f.ex. we just update the grid every 10th cycle or something like this) we will end up with, and I think all (including me) are more than happy to get the grid going, with a more interesting DB as a result.
Btw. DB is not entirely CPU bound. Some autosaving can be switched on, and here threading will do. Maybe we could implement both, I dont know, only time will tell.
Navigation
[0] Message Index
[#] Next page
Go to full version