Jump to content

Minecraft CUDA


Recommended Posts

Hi. Since I have no idea about mod development and such, I just throw my question in the room:

Do you think it would be possible to develop a mod for MC, that uses CUDA (http://en.wikipedia.org/wiki/CUDA) to relieve the CPU?

I noticed that my GPU and Graphical RAM is almost unused for Minecraft, so i think it almost doesn't matter, wich Graphics Card you have (ALMOST -> intel onboard derps), but as we all know, the CPU is way overused and lags out the game sometimes.

So the best way for performance would be a balance between the CPU- and GPU utilization.

Do you ppl think it would be possible?

Cause if so, I would try to get into it to bring you NVIDIA-Users the revolution in minecraft performance. And hell yeah, it really would be a revolution ;)

EDIT: There are wrappers for java, so it would be possible, or am I wrong?

Link to comment
Share on other sites

I use CUDA/C++ for research, haven't looked into the wrappers for Java. There's not much massively parallelizable code in Minecraft I can think of off the top of my head, and memory management becomes a new nightmare to the point where you're either going to give up trying to make it work for those subset of people that happen to have CUDA, those that have compute capabilities you want to program the hardware for (aka which architectures), and then you have to deal with memcpying everything to/from the GPU and/or using pageable memory (which presents its own special sets of issues), or somehow actually make it work all for just a speedup gain of very little and very little relief of your CPU.

Don't get me wrong, I love CUDA. But it's best used when you can have the GPU run massively parallel by itself with very little Host<->Device memory copies and have your CPU do other things before your GPU finishes. If you're running a specialized server setup I guess you could possibly re-write the source code to be more massively parallel, but that's mere speculation on my part and I don't imagine it going over very well, for many reasons.

CUDA is really best at performing mathematical transformations on huge amounts of data simultaneously (and I mean like millions of elements) in however many dimensions you want your data to be (beyond 3D you have to take the time to derive relationships on your own). Also I haven't looked into CUDA's object-orientation handling as I can imagine that would both slow it down and eat up lots of time transporting large amounts of unneeded data to/from your GPU.

CPUs and GPUs are very different machines in the way they do things. The fact that MC is in Java skews the favor towards the CPU massively (almost to the point of absolutely)

Link to comment
Share on other sites

All I can say to this is: -.-'


Thought I had a pretty cool idea but nah. Thank you for taking away my illusions xD

Btw the servers are not the problem in my opinion. I thought about the client side, but well... nevermind xD

Thank you both for thinking into it

Link to comment
Share on other sites

  • 9 months later...

Actually for rendering you could use CUDA for the drawing onto the game or for the physics of moving objects. You could also use it for any large array manipulation

Im sure that the chunk manipulation would be easy to work in CUDA...

Plus, with different java compilers, there are plenty of ides that let you use cuda with java.

Link to comment
Share on other sites

Actually, have you checked the API suggestion list for rendering/chunk processing hooks for use in CUDA cores? I'm sure Mojang would be thrilled at the idea of further optimizing MC without having to write code utilizing it.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Create New...