Minetest on Rasbpberry Pi

Dartmouth
Member
Posts: 121
Joined: Sat Dec 06, 2014 14:39

Re: Minetest on Rasbpberry Pi

by Dartmouth » Post

@jp, Thanks for the hint, I'll do this once I get the RPi

julienrat
New member
Posts: 1
Joined: Sat Jun 27, 2015 10:30

Re: Minetest on Rasbpberry Pi

by julienrat » Post

Hi !
Is there any news about Minetest client and Raspberry Pi 2 ?
I hav tryed to compile, it's works with 1-6 fps .... too slow to play ....
Is minetest could be ported with OPENGL ES ?
Thanks again

Amicadi
Member
Posts: 13
Joined: Fri Sep 04, 2015 00:40

Re: Minetest on Rasbpberry Pi

by Amicadi » Post

julienrat wrote:Hi !
Is there any news about Minetest client and Raspberry Pi 2 ?
I hav tryed to compile, it's works with 1-6 fps .... too slow to play ....
Is minetest could be ported with OPENGL ES ?
Thanks again
I don't think minetest needs to be ported with OPENGLES since minetest already works with OPENGLES (as example the android minetest version).

I think the issue here is to compile irrlicht with OPENGLES. At the moment irrlicht 1.9 with OPENGLES support can be found at http://svn.code.sf.net/p/irrlicht/code/branches/ogl-es/ (from where is downloaded by minecraft android build script), I have tried to compile irrlicht 1.9 with OPENGLES support for raspberry pi 2 with no success, tho.

Have anyone compiled irrlicht 1.9 with OPENGLES support for raspberry pi 2 successfully?

User avatar
benrob0329
Member
Posts: 1338
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

Re: Minetest on Rasbpberry Pi

by benrob0329 » Post

I have an Rpi2, I could try building MT from source. I don't do much with it, it pretty much just sits around with Drupal running on top of Apache, so it wouldn't matter if it Sat there for a couple days compiling.
Social: YouTube Peertube Matrix Room: #minetest:matrix.org | Games: The Infinite IKEA

User avatar
programmingchicken
Member
Posts: 540
Joined: Sat Apr 18, 2015 02:20
GitHub: pchicken
IRC: chicken pchicken
Location: not here
Contact:

Re: Minetest on Rasbpberry Pi

by programmingchicken » Post

:3 Why do I not have any devices?
I have a windows laptop and a borrowed wintop(almost but not quite TM), I thought that was good, until I saw people with 5 wintops, one with each server on them, and 3 macbook pros, rooted and overclocked, and then they have 2 phones, one they use for gaming, and the other for calling, and their wallet has a touchscreen and password lock.
And they have a desktop Lubuntu with rooted MacOSX dualboot.
And also their house is scattered with circuit boards and transistors.
Welcome to my disappointing
<gamerdude> I apologize for the above content

User avatar
AgentNagel42
Member
Posts: 33
Joined: Tue Sep 09, 2014 15:41
In-game: AgentNagel42

Re: Minetest on Rasbpberry Pi

by AgentNagel42 » Post

Lol I could only afford for my pi as my pc up until a couple months ago, I used my friends computer for minetest. lol.
My Youtube Channel "NoobsPlayGames": https://www.youtube.com/channel/UCaqGwT ... j_qpqNTyOQ

User avatar
philipbenr
Member
Posts: 1844
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

Re: Minetest on Rasbpberry Pi

by philipbenr » Post

I heard it runs better on the raspberry pi 2... Quad core @ 900MHz ARM Cortex v7 It is overclockable, and some have even made it to 1GHz fine. The 1GB of RAM really helps too.

Amicadi
Member
Posts: 13
Joined: Fri Sep 04, 2015 00:40

Re: Minetest on Rasbpberry Pi

by Amicadi » Post

benrob0329 wrote:I have an Rpi2, I could try building MT from source. I don't do much with it, it pretty much just sits around with Drupal running on top of Apache, so it wouldn't matter if it Sat there for a couple days compiling.
Heh, it doesn't take couple of days. Compile times are around 1 hour for Irrlicht and around 30 mins for Minetest (Compiling directly at Rasperry Pi 2 device). My built (OpenGL 2.1) got running at 3fps. Then I spent hours trying to compile Irrlicht with OpenGL ES support without luck.

Amicadi
Member
Posts: 13
Joined: Fri Sep 04, 2015 00:40

Re: Minetest on Rasbpberry Pi

by Amicadi » Post

philipbenr wrote:I heard it runs better on the raspberry pi 2... Quad core @ 900MHz ARM Cortex v7 It is overclockable, and some have even made it to 1GHz fine. The 1GB of RAM really helps too.
At the profiler (F5 x 2) can be seen that the mainloop_draw is at 100% almost constantly. Other loops take almost no processing time. I believe the issue is OpenGL / OpenGL ES

Sokomine
Member
Posts: 4191
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: Minetest on Rasbpberry Pi

by Sokomine » Post

Amicadi wrote: Heh, it doesn't take couple of days. Compile times are around 1 hour for Irrlicht and around 30 mins for Minetest (Compiling directly at Rasperry Pi 2 device). My built (OpenGL 2.1) got running at 3fps. Then I spent hours trying to compile Irrlicht with OpenGL ES support without luck.
That's a pretty bad result. The compile time is fine - doesn't matter if it takes a while to compile. But 3 fps is really a bit low. Far lower than on smartphones and tablets. Of course the view range is low there. The resolution and view range may matter as well.
A list of my mods can be found here.

Amicadi
Member
Posts: 13
Joined: Fri Sep 04, 2015 00:40

Re: Minetest on Rasbpberry Pi

by Amicadi » Post

Sokomine wrote: That's a pretty bad result. The compile time is fine - doesn't matter if it takes a while to compile. But 3 fps is really a bit low. Far lower than on smartphones and tablets. Of course the view range is low there. The resolution and view range may matter as well.
That result is for Raspberry pi 2 with no overclocking running Minitest at window size 800x600 running at official raspbian-2015-05-05 Xserver with display configured as 1184x624 pixels.

With these extra options:

enable_3d_clouds = false
enable_particles = false
enable_shaders = false
leaves_style = opaque
viewing_range_nodes_min = 48
viewing_range_nodes_max = 48

So, very very low as you can see. Even with viewport on my feet I get no fps change, stuck at 2-3 fps. Pretty low and unplayable. Android Minetest is OK, tho... and just because irrlicht is compiled with OPENGL ES support for android version, I guess :-)

User avatar
philipbenr
Member
Posts: 1844
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

Re: Minetest on Rasbpberry Pi

by philipbenr » Post

I heard there was a way to get Minetest to run at 20ish fps on a raspberry pi model B+. 4aiman and a couple others did get it running... Take a bit of time searching and you'll find it...

Amicadi
Member
Posts: 13
Joined: Fri Sep 04, 2015 00:40

Re: Minetest on Rasbpberry Pi

by Amicadi » Post

philipbenr wrote:I heard there was a way to get Minetest to run at 20ish fps on a raspberry pi model B+. 4aiman and a couple others did get it running... Take a bit of time searching and you'll find it...
Do you mean this?
philipbenr wrote:
Hiradur wrote: Did somebody try glshim for hardware acceleration?
https://github.com/lunixbochs/glshim
//EDIT: It works. I tested it with MT 0.3.1. Text is unreadable, some textures are distorted but the framerate ranges from 3-20fps I guess (although it goes down the longer you play).

Tutorial on how to set up glshim:
http://www.raspberrypi.org/phpBB3/viewt ... 4&p=479445
I also found this:
xranby wrote: I get between 11-15fps when I am running minetest from Raspbian using the new Mesa3d vc4 OpenGL 2 driver on a RaspberryPi 2
You can read more about this new driver here: https://www.raspberrypi.org/forums/view ... 05#p802205
I haven't tried yet, but I believe that Minetest compiled along with irrlicht with OpenGL ES support (as Minetest android version is compiled) would be the correct way (and would have better performance) for Raspberry pi. or?

User avatar
AgentNagel42
Member
Posts: 33
Joined: Tue Sep 09, 2014 15:41
In-game: AgentNagel42

Re: Minetest on Rasbpberry Pi

by AgentNagel42 » Post

This seems promising, if we could build it and somehow solve the "slowing over time" somehow. It would take some optimising, I'm gunna try and get in touch with one of the devs over at the pi forum and see if we can get some help
My Youtube Channel "NoobsPlayGames": https://www.youtube.com/channel/UCaqGwT ... j_qpqNTyOQ

Amicadi
Member
Posts: 13
Joined: Fri Sep 04, 2015 00:40

Re: Minetest on Rasbpberry Pi

by Amicadi » Post

Minetest with glshim at Rasberry pi 2 executed as:

LD_LIBRARY_PATH=/home/pi/glshim/lib LIBGL_FB=1 minetest

Fails with this output:

libGL:loaded: libbcm_host.so
libGL:loaded: libvcos.so
libGL:loaded: /opt/vc/lib/libGLESv1_CM.so
libGL:loaded: libEGL.so
ACTION[Main]: Irrlicht Could not create GLX window
ERROR[Main]: Could not initialize game engine

Same failure and output for Minetest at raspbian-2015-05-05 repository and the version compiled by me (along with irrlicht 1.8.2 with OpenGL support)

I guess this is because glshim only translates Open GL 1 to OpenGL ES 1???. Bloboats works very nicely with glshim at raspberry pi 2, tho :-)

So, now I am trying Minetest with Mesa3d vc4 OpenGL 2 (which translates OpenGL 1 and 2.1 to OpenGL ES 1 and 2) https://www.raspberrypi.org/forums/view ... 05#p802205 ... just to check if Minetest is playable with this driver at RPI2

User avatar
FreeLikeGNU
Member
Posts: 231
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: Minetest on Rasbpberry Pi

by FreeLikeGNU » Post

I'd be happy just to run MT as a server on an RPi2, has anyone found this to work well?

User avatar
philipbenr
Member
Posts: 1844
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

Re: Minetest on Rasbpberry Pi

by philipbenr » Post

I have heard that it runs fine. I think that was even stated earlier in the thread...

Amicadi
Member
Posts: 13
Joined: Fri Sep 04, 2015 00:40

Re: Minetest on Rasbpberry Pi

by Amicadi » Post

I tested today the available raspbian patched with Mesa3d vc4 OpenGL 2 images at http://sukzessiv.net/~gohai/vc4-buildbot/build/ (at the moment of writing this post 20150808-1312-vc4-image.zip and 20150821-1625-vc4-image.zip) and I was able to run Minetest in none of them. Minetest terminates with no output log... I was able to run and play for a while with the Processing 3D application. But, well, raspbian patched with Mesa3d vc4 OpenGL 2 looks like is right now in development state, so I think I'll keep looking at it.

Dartmouth
Member
Posts: 121
Joined: Sat Dec 06, 2014 14:39

Re: Minetest on Rasbpberry Pi

by Dartmouth » Post

Yes, minetestserver runs nicely on the RPi, although I haven't tried with several players or heavier mods (technic + pipeworks or mobs) yet. Mapgen is just a bit slower, but it doesn't really hinder gameplay.

Ivà
Member
Posts: 115
Joined: Sun Feb 22, 2015 07:11
GitHub: melzua
IRC: melzua
In-game: melzua
Location: Catalonia

Re: Minetest on Rasbpberry Pi

by Ivà » Post

FreeLikeGNU wrote:I'd be happy just to run MT as a server on an RPi2, has anyone found this to work well?
I have an RPi 1 (1 not 2 :) ) running a home personal server with 3 people playing on it simultaneously and it works reasonably well.

Bottleneck on RPi1 is the lack of CPU power, so for example when it generates new map freezes for a while.

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: Minetest on Rasbpberry Pi

by 4aiman » Post

Ivà is right.

Generating a whole map on a desktop and then copying that to RPi helps to run almost any subgame relatively "normal" if the use of entities and serialization is restricted (i.e. no mobs, as few "minetest.show_formspec" calls as possible, as few writes to a disk as possible).


Just a note: use qemu or cross-compiler to compile for armhf. RPi does that very slow (it took my nearly 6 hours for my RPi to download all dependencies, libs, compile those and finally start a server).

Amicadi
Member
Posts: 13
Joined: Fri Sep 04, 2015 00:40

Re: Minetest on Rasbpberry Pi

by Amicadi » Post

I continued trying to compile Minetest as client with OpenGL ES 2 for enjoying a decent framerate in my Raspberry pi 2.

Finally I got Irrlicht (ogl-es branch) compiled with OpenGL ES 1 and 2 support.

Then, I continued compiling Minetest:

cmake . -DBCMHOST=1 -DENABLE_GLES=1

returned:

Code: Select all

-- *** Will build version 0.4.13-dev ***
-- cURL support enabled.
-- GetText disabled.
-- Sound enabled.
-- Found system OpenGL ES 2 library: /usr/lib/arm-linux-gnueabihf/libGLESv2.so;/usr/lib/arm-linux-gnueabihf/libX11.so;/usr/lib/arm-linux-gnueabihf/libXext.so;/usr/lib/arm-linux-gnueabihf/libGLESv2.so
-- Could NOT find Freetype (missing:  FREETYPE_INCLUDE_DIRS) 
-- LuaJIT not found, using bundled Lua.
-- Using GMP provided by system.
-- LevelDB not found!
-- Redis not found!
-- Using bundled JSONCPP library.
-- SpatialIndex not found!
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    BCMHOST


-- Build files have been written to: /home/pi/minetest
and after: make -j 4

I got several errors at final linking with Irrlicht:

Code: Select all

Linking CXX executable ../bin/minetest
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(COGLESDriver.o): In function `irr::video::COGLES1Driver::drawVertexPrimitiveList2d3d(void const*, unsigned int, void const*, unsigned int, irr::video::E_VERTEX_TYPE, irr::scene::E_PRIMITIVE_TYPE, irr::video::E_INDEX_TYPE, bool)':
/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLESDriver.cpp:773: undefined reference to `glPointSizePointerOES'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(COGLESDriver.o): In function `irr::video::COGLES1Driver::uploadClipPlane(unsigned int)':
/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLESDriver.cpp:3098: undefined reference to `glClipPlanef'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(COGLESExtensionHandler.o): In function `irr::video::COGLES1ExtensionHandler::initExtensions(irr::video::COGLES1Driver*, bool)':
/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLESExtensionHandler.cpp:248: undefined reference to `eglGetProcAddress'
/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLESExtensionHandler.cpp:249: undefined reference to `eglGetProcAddress'
/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLESExtensionHandler.cpp:250: undefined reference to `eglGetProcAddress'
/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLESExtensionHandler.cpp:251: undefined reference to `eglGetProcAddress'
/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLESExtensionHandler.cpp:255: undefined reference to `eglGetProcAddress'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(COGLESExtensionHandler.o):/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLESExtensionHandler.cpp:259: more undefined references to `eglGetProcAddress' follow
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(COGLES2Driver.o): In function `irr::video::COGLES2Driver::testEGLError()':
/home/pi/irrlicht/ogl-es/source/Irrlicht/COGLES2Driver.cpp:1663: undefined reference to `eglGetError'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::initialize(irr::SIrrlichtCreationParameters const&, irr::video::SExposedVideoData const&)':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:48: undefined reference to `eglGetDisplay'
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:66: undefined reference to `eglInitialize'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::terminate()':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:88: undefined reference to `eglMakeCurrent'
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:90: undefined reference to `eglTerminate'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::generateSurface()':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:160: undefined reference to `eglChooseConfig'
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:249: undefined reference to `eglCreateWindowSurface'
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:252: undefined reference to `eglCreateWindowSurface'
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:259: undefined reference to `eglBindAPI'
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:263: undefined reference to `eglSwapInterval'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::destroySurface()':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:274: undefined reference to `eglMakeCurrent'
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:276: undefined reference to `eglDestroySurface'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::generateContext()':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:310: undefined reference to `eglCreateContext'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::destroyContext()':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:329: undefined reference to `eglMakeCurrent'
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:330: undefined reference to `eglDestroyContext'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::activateContext(irr::video::SExposedVideoData const&)':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:337: undefined reference to `eglMakeCurrent'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::swapBuffers()':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:354: undefined reference to `eglSwapBuffers'
/home/pi/irrlicht/ogl-es/lib/Linux/libIrrlicht.a(CEGLManager.o): In function `irr::video::CEGLManager::testEGLError()':
/home/pi/irrlicht/ogl-es/source/Irrlicht/CEGLManager.cpp:360: undefined reference to `eglGetError'
collect2: ld returned 1 exit status
src/CMakeFiles/minetest.dir/build.make:4826: recipe for target 'bin/minetest' failed
make[2]: *** [bin/minetest] Error 1
CMakeFiles/Makefile2:132: recipe for target 'src/CMakeFiles/minetest.dir/all' failed
make[1]: *** [src/CMakeFiles/minetest.dir/all] Error 2
Makefile:133: recipe for target 'all' failed
make: *** [all] Error 2
Here I got stuck. Looking around for a solution I found Megaf's attempt trying the same and with same result: https://gist.github.com/Megaf/bcae0c623ca46ca29773

Any ideas?

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: Minetest on Rasbpberry Pi

by 4aiman » Post

The last time I've tried, it worked like a charm...
I'll try to build the latest dev MT by tomorrow's morning and let you know about it.

PS: what is BCMHOST?

Amicadi
Member
Posts: 13
Joined: Fri Sep 04, 2015 00:40

Re: Minetest on Rasbpberry Pi

by Amicadi » Post

4aiman wrote:The last time I've tried, it worked like a charm...
I'll try to build the latest dev MT by tomorrow's morning and let you know about it.

PS: what is BCMHOST?
Did you try building Minetest with OpenGL ES support and it worked? If so... you are my man :-)

BCMHOST? you are right, I have no idea. I think I saw it somewhere or maybe something at my .bash_history from other compilation (EDIT: yes, from glshim), but I see that it is completely ignored at cmake :-P

Indeed, BCMHOST=1 flag should be: -DRUN_IN_PLACE=1

Code: Select all

CMake Warning:
  Manually-specified variables were not used by the project:

    BCMHOST
Still, recompiling as:

Code: Select all

cmake . -DRUN_IN_PLACE=1 -DENABLE_GLES=1
make -j 4
I got same error.

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: Minetest on Rasbpberry Pi

by 4aiman » Post

I did, and it worked...
... but that was a little while ago :)


I've tried to compile the latest MT last night, but sadly it didn't finish even half of it when I came up.
And I'll be too late at home today to be able to check what's going on or to post some updates here.
So, it looks like Friday will be the day.


I also have an RPi emu, so I'm trying to build there right now.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests