Off Topic > Games
Dwarf Fortress Megathread! - Necro'd enough to count as a vampire
Jacob/Lee:
For the sake of being correct, there is a single dev.
blaman:
--- Quote from: Jacob/Lee on August 21, 2011, 05:04:21 PM ---For the sake of being correct, there is a single dev.
--- End quote ---
Well, a single dev and an idea guy, but yeah.
IkeTheGeneric:
--- Quote from: blaman on August 21, 2011, 04:47:02 PM ---I think the devs should have a go at offloading some of the simulation workload onto the graphics card. I mean, a graphics card is basically a massively parallel processor, it does absolutely huge amounts of number crunching extremely quickly. And the graphics card is hardly being used in the game, but as it is there's a hugeeeeee amount of load dumped on the CPU.
--- End quote ---
So you want the game to take as much graphic memory as it does CPU?
Doomonkey:
--- Quote from: IkeTheGeneric on August 21, 2011, 05:41:24 PM ---So you want the game to take as much graphic memory as it does CPU?
--- End quote ---
It would use the GPU as a second CPU.
blaman:
--- Quote from: IkeTheGeneric on August 21, 2011, 05:41:24 PM ---So you want the game to take as much graphic memory as it does CPU?
--- End quote ---
The GPU is much much faster at doing thousands of calculations extremely quickly compared to the the CPU, even when it's not for rendering things.
Dwarf Fortress does a huge amount of small calculations for everything from path finding to water flow simulation to dwarven psychology etc etc, if all that load was shifted from the CPU to the GPU, because the GPU is effectively totally free in the game, then I would expect the game would get a huge boost in fps.
As an example for clarification, take something like a graphics shader, which is a simple program that does a bit of math to modulate colours for every pixel on the screen, every frame. It can run on a graphics card thousands upon thousands of times per second, achieving hundreds of frames per second on the screen. If you write a similar shader to run on the CPU, you would be lucky to get maybe 0.5 frames per second.
Take the same idea and apply it to the simulation in the game. On newer graphics cards this is totally possible, and not exceedingly difficult to do.