• Can GPU be used for ingame simulation?
    11 replies, posted
This is just something random I was thinking about. Let's say a game runs a lot of simulations. Of course you tuse threads and such. But it might not be enough. Let's say you wanna simulate a city (ie game simcity). I imagine doing so will require a lot of simple operations that will be fed to CPU. But since operations might not be so complicated, would it not be much better to use GPU for such purpose? Of course this will work with two gpu cards. But would it make any sense at all? Is there an actually advance or disadvantage? Pardon my poorly written English. And perhaps about my inexperienced self.
I may not be correct in saying this, but a GPU is [B]far[/B] more suited to processing graphic-intensive operations than everyday computer operations. I think they also don't have most features needed in modern operating systems. Edit: yeah, I'm wrong - I expected to be :v:
Like a Quadro series nVidia card, or PhysX? [editline]30th January 2013[/editline] Or Tesla or whatever they're called these days.
Yes, it would be possible by using either OpenCL or CUDA. I wouldn't say it is easy.
"Can i simulate it on the graphics card" generally boils down to a few things: The amount of communication you need between threads, and realistically how easily you can split your problem into threads In a case like simcity, say you were trying to simulate a bunch of citizens - then yes, it wouldn't be too impossibly difficult to simulate them on the graphics card. Each sim gets their own thread. You might have to do a little crosstalk between threads to ensure none of the sims collide with each other, but it should be possible
Feel free to rate me dumb, but how would you actually go about redirecting those operations to the GPU?
[QUOTE=Mozartkugeln;39427570]Feel free to rate me dumb, but how would you actually go about redirecting those operations to the GPU?[/QUOTE] [QUOTE=dije;39422975]Yes, it would be possible by using either OpenCL or CUDA. I wouldn't say it is easy.[/QUOTE]
Thanks. Apologies for not reading the thread fully.
If you pick opencl (which i would recommend over cuda simply because it runs on both ati and nvidia graphics cards), feel free to pm me if you need help
I know one person. His job is to repair all kind of phones. He used some kind of software that used the GPU's threads to hack the phone's firmware or to repair something. So yeah it would probably be better to use the GPU.
The GPU is very well suited to largely parallel tasks. It's good at graphical operations because it can operate on large blocks of pixels on the screen simultaneously. If the calculations you want to perform aren't largely parallel, you won't benefit from using the GPU. If you wanted to simulate millions of people walking around a town, for example, using the GPU might be beneficial, but interactions between threads on the GPU are hard to perform relative to on the CPU.
[QUOTE=thomasfn;39436640]The GPU is very well suited to largely parallel tasks. It's good at graphical operations because it can operate on large blocks of pixels on the screen simultaneously. If the calculations you want to perform aren't largely parallel, you won't benefit from using the GPU. If you wanted to simulate millions of people walking around a town, for example, using the GPU might be beneficial, but interactions between threads on the GPU are hard to perform relative to on the CPU.[/QUOTE] Would it be possible to simulate each Sim on the gpu and then let CPU thread take care of communications between Sim threads? Not worth it? Too much extra work?
Sorry, you need to Log In to post a reply to this thread.