t1m3l3ss Posted April 3, 2012 Share Posted April 3, 2012 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 More sharing options...
SimpleGuy Posted April 3, 2012 Share Posted April 3, 2012 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 More sharing options...
jakj Posted April 3, 2012 Share Posted April 3, 2012 You'd have to rewrite the game. Right now it is almost completely atomic on the tick with a little bit ofpartial-tick support for smooth animation. Link to comment Share on other sites More sharing options...
t1m3l3ss Posted April 3, 2012 Author Share Posted April 3, 2012 All I can say to this is: -.-' lol 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 More sharing options...
Synthetica Posted April 4, 2012 Share Posted April 4, 2012 You'd have to rewrite the game. Would be a pretty cool project though: porting Minecraft to a CUDA-compatible language. But it wouldn't be a easy project... (read: it's gonna be pretty super duper hard.) Link to comment Share on other sites More sharing options...
jakj Posted April 4, 2012 Share Posted April 4, 2012 Oh, I have the occasional fantasy of rewriting minecraft to not be awful, but then I wake up. :P Link to comment Share on other sites More sharing options...
Jesse Bates Posted January 8, 2013 Share Posted January 8, 2013 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 More sharing options...
Jesse Bates Posted January 8, 2013 Share Posted January 8, 2013 Is the source code for minecraft available? Link to comment Share on other sites More sharing options...
BurningCake Posted January 8, 2013 Share Posted January 8, 2013 Is the source code for minecraft available? No, Minecraft isn't open source, so I don't believe you can access the source code short of asking Mojang to give it to you, :P Link to comment Share on other sites More sharing options...
Lethosos Posted January 8, 2013 Share Posted January 8, 2013 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 More sharing options...
Jesse Bates Posted January 8, 2013 Share Posted January 8, 2013 I figured if it was a grid of blocks, that to render each chunk, divide the work so that each block uses a cuda core or something like that. The cores can each run the same java process that already runs, if im correct. Link to comment Share on other sites More sharing options...
Torezu Posted January 8, 2013 Share Posted January 8, 2013 Actually for rendering... Next time check the last post date before hitting the Post Reply button. This thread should have died. Link to comment Share on other sites More sharing options...
Recommended Posts