I understand that Minecraft runs on Java which is very demanding on the CPU (garbage collection and JVM processes), but I still don't understand how FPS is the CPU's responsibility. Shouldn't the CPU handle game logic while the GPU handles rendering the results of that logic asynchronously? Minecraft was developed using OpenGL libraries afterall. But I still see a ton of people saying that upgrading your CPU is more worth it than upgrading your GPU if you want good FPS on Minecraft. What's actually happening under the hood?

  • \$\begingroup\$ We can't really answer, since we didn't make minecraft, but I guess the terrain generation, lighting updates and AI is handled by the CPU, while the GPU only has to render a couple of triangles. \$\endgroup\$ – Bálint Jun 6 '18 at 8:45
  • 7
    \$\begingroup\$ I'm voting to close this question as off-topic because it is not about game development. It is a question about technical issues with one specific game. Such questions should be asked on gaming.stackexchange.com \$\endgroup\$ – Philipp Jun 6 '18 at 9:12
  • \$\begingroup\$ Hi Badr B, and welcome to GameDev.StackExchange. This Q&A site is specialized in helping developers solve problems in designing & implementing their own games and mods. If you're working on a game or mod of your own, and using Minecraft as an example, please consider editing your question to instead describe your own project. Minecraft (like any game) has its own particular history and situation, and answers that apply to Minecraft might not say much about what's right for your game project. \$\endgroup\$ – DMGregory Jun 6 '18 at 10:18
  • \$\begingroup\$ Sorry for posting on the wrong site. I thought it would've been appropriate since it was more a development/technical question than a question about the actual gameplay. I'll do my best to post on the correct site thanks to the advice provided! \$\endgroup\$ – Badr B Jun 6 '18 at 10:30

The point here is that although CPU and GPU works asynchronously they also work alternately. GPU can't draw what CPU didn't compute yet.

If you have fast CPU and slow GPU then there's no point in computing many frames on CPU in advance, while GPU is still drawing the first one.

If you have slow CPU and fast GPU then the GPU will wait for its job.

Every game is different, some do much work on CPU, some work more in GPU and almost always one of this component will wait for another (but it may change frame-by-frame). In general, if you want 30fps then both your CPU and GPU have to do their job in less than 1/30s.

According to Minecraft specifically:

  • It has VERY simple shading and texturing (little work for GPU)
  • Uses a lot of geometry (this may become very hard for GPU)
  • To optimize GPU drawing it does some magic on geometric data on CPU

Given those points I believe that Minecraft may be CPU-bound.

| improve this answer | |
  • 1
    \$\begingroup\$ I'd quibble with this line: "there's no point in computing many frames on CPU in advance, while GPU is still drawing the first one." In fact, it's often advantageous for the CPU-side simulation to run at a faster framerate than the display. This can help get smoother, more accurate physics, consistent game time to real time speed ratios, and make it easier to scale the game to a range of display framerates depending on the graphics hardware and current rendering load, without altering the gameplay. \$\endgroup\$ – DMGregory Jun 6 '18 at 10:41
  • \$\begingroup\$ You're mostly right @DMGregory, I've intentionally omitted more complex cases to make it easier to understand :). Even if you compute few frames into the future, your GPU needs to keep up with this speed, there's still no point in doing few frame updates per one frame rendered. From your comment it seems you're talking about multiple physics iterations per frame and not about frame updates per frame. I agree that you may do few physics iterations but you don't compute i.e. skinning matrices few times per rendered frame. \$\endgroup\$ – kolenda Jun 6 '18 at 11:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.