2

I am running the Jessie version of Raspbian on my RPi 2, with berryboot as the boot loader (I dual-boot RasPlex).

I installed Minetest with sudo apt-get install minetest. It installed v0.4.10 and it ran successfully, but the frame rate is extremely low, making the game unplayable. Less than 1 FPS.

In ~/.minetest/minetest.conf I set all the graphics options to 0/minimum as listed here and it made a small difference but the FPS is still around 1 and the draw time as shown by the debug info moves around between 800 - 1300ms to draw a frame.

What might be going wrong here to make it so slow -- is there something I can change to make the game playable?

When I boot Plex it has no problem drawing 30+ FPS of 1080p so it seems to me the hardware should be sufficient for such a low-graphics game as Minetest.

  • 1
    I found this thread after posting but it's 2 years old and has no resolution – M.M Nov 11 '17 at 4:21
  • Have you tried enabling the OpenGL Full Driver ? – CoderMike Nov 11 '17 at 11:19
  • "it has no problem drawing 30+ FPS of 1080p" -> Being able to play specific video formats at a given rate does not mean that any and every form of graphical output with the same resolution will match that rate. – goldilocks Nov 13 '17 at 17:41
4

OpenGL

My Pi 2 with Jessie runs Minetest out of the box at 15 fps for a typical scene with trees. (You'll of course get a higher fps looking at the sky.)

I've seen a "1 fps" bug affect both Minetest and full-blown Minecraft, and it seems to happen when the OpenGL driver isn't properly configured. Run sudo raspi-config and select the OpenGL driver with full KMS. Check that /boot/config.txt contains dtoverlay=vc4-kms-v3d so that it takes effect on reboot. If that doesn't resolve it, try with fake KMS.

(Edit: If running BerryBoot, this is notorious for causing performance problems with Irrlicht and will not play well with the full OpenGL driver. For Minetest you may have to invest in a dedicated SD card and give up dual-booting.)

If the issue persists and you have a bit more time, rule out the usual concerns with sudo apt update; sudo apt upgrade; sudo rpi-update

Once you have the lag bug gone, framerate is most visibly affected by drawing text (press F2 to disable chat / log), followed by the HUD due to its transparency and some text (press F1 to disable). Ironically, this means pressing F5 to view the FPS counter makes the framerate instantly drop, so I ended up tweaking src/game.cpp to report stats to stdout instead. On the bright side, opaque objects like "Steve" (press F7 to change camera view) are not computationally expensive.

You might squeeze out a few more fps by with enable_clouds = 0, new_style_leaves = 0, opaque_water = 1, or disabling fog (press F3), but most options have little effect on performance. In fact a Pi 3 runs Minetest at about the same quality.

OpenGL ES (Mesa driver with VC4 support)

It's worth noting you can compile Irrlicht for standard GLES and configure Minetest with video_driver = ogles1. I have used these instructions, although for faster compilation and keeping enough RAM on-device I use clang instead of gcc. Also note: requires the stable-0.4 branch of minetest.

However, the resulting configuration has slightly worse performance than full OpenGL. This makes some sense, given that it's much the same software rendering with limited VC4 acceleration.

OpenGL ES (Broadcom VC4 driver)

Besides the thread from 2015 you linked, there's this thread last updated in March. I have responded on the latter with instructions for building Minetest linked with brcmEGL + brcmGLESv2.

This performs significantly better than the Mesa GLES configuration, often 50+ fps with a fair amount of geometry in the scene. The same tuning tips apply as with OpenGL, although little things like text rendering can cause a more severe fps drop.

There may be further bottlenecks in Irrlicht/Minetest aside from rendering that could be identified by first building with USE_GPROF=ON.

However, now that both minecraft-pi and PC Minecraft run faster on the Pi, that could be a reason Minetest is getting less attention.

  • minecraft-pi hasn't been updated for nearly 5 years, which is why I'm looking at minetest. What do you mean by running PC Minecraft on the Pi? – M.M Nov 13 '17 at 3:03
  • Understood, and being closed-source is quite a limitation too. Status of running Java-based Minecraft on a Pi 2 or 3 can be found in my answer to this question. – jdonald Nov 13 '17 at 3:22
  • Full Minecraft 1.12.1 instructions : raspberrypi.org/forums/viewtopic.php?f=78&t=186547 – CoderMike Nov 13 '17 at 9:08
  • I did the update process (but without sudo rpi-update - I am worried this will trash berryboot). Enabling KMS or FakeKMS means that after a reboot, the berryboot menu never appears, it's just black screen forever (although things still happen based on the disk light, just no screen display). I guess the problem is that KMS needs firmware support that the berryboot firmware doesn't have; perhaps this is a dead end unless I'm willing to give up dualboot – M.M Nov 18 '17 at 7:59
  • Sounds like that's the real answer to your original question: berryboot and full OpenGL don't yet play well together. For what it's worth I have updated my answer above with details for running Minetest with libbrcmGLESv2.so. This approach has its own glitches and drawbacks, but it gives the best performance and unlike OpenGL or Mesa OpenGL ES you can run it with vc4-kms-v3d disabled. – jdonald Nov 20 '17 at 5:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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