Philski
Posts: 19
Joined: Sun Feb 21, 2016 12:25 pm

Minecraft Pi Multiplayer

Sat Mar 05, 2016 8:08 am

Can anyone point me in the right direction on how to get a network game of Minecraft Pi up and running?

I've tried connecting two Pis directly via Ethernet and using a router, but I just can't seem to get the Pis to see one another...

Thanks in advance

Phil

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Minecraft Pi Multiplayer

Sat Mar 05, 2016 6:46 pm

http://pimylifeup.com/raspberry-pi-minecraft-server/ (Don't know if that will work with 1.9 because I've not had a chance to test it.)
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Philski
Posts: 19
Joined: Sun Feb 21, 2016 12:25 pm

Re: Minecraft Pi Multiplayer

Sat Mar 05, 2016 6:53 pm

Thanks for the link Dougie. I'm not trying to set up a Minecraft server, but connect multiple Raspberry Pis together, each running Minecraft Pi Edition's local multiplayer.

W. H. Heydt
Posts: 14421
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Minecraft Pi Multiplayer

Sat Mar 05, 2016 8:13 pm

DougieLawson wrote:http://pimylifeup.com/raspberry-pi-minecraft-server/ (Don't know if that will work with 1.9 because I've not had a chance to test it.)
Interesting. He has updated to indicate the existence of the Pi3. Makes one think that the number of concurrent users might be able to be increased to 7 or 8 based on the speed difference between a Pi2 and a Pi3. Also...that's a really nice looking case in the photo.

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Minecraft Pi Multiplayer

Sat Mar 05, 2016 10:24 pm

Philski wrote:Thanks for the link Dougie. I'm not trying to set up a Minecraft server, but connect multiple Raspberry Pis together, each running Minecraft Pi Edition's local multiplayer.
Forget it, that won't work.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Philski
Posts: 19
Joined: Sun Feb 21, 2016 12:25 pm

Re: Minecraft Pi Multiplayer

Sat Mar 05, 2016 11:23 pm

I realise it might be out of date, but the learning resources suggest otherwise

https://www.raspberrypi.org/learning/ge ... worksheet/

"NETWORKED GAME

If multiple people connect Raspberry Pis to a local network, they can join the same Minecraft world and play together. Players can see each other in the Minecraft world."

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Minecraft Pi Multiplayer

Sat Mar 05, 2016 11:53 pm

It looks like if you get Minecraft Pocket Edition running on one RPi then choose "Join Game" from another instance running on another RPi it will scan your LAN looking for the game running on the first RPi.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Philski
Posts: 19
Joined: Sun Feb 21, 2016 12:25 pm

Re: Minecraft Pi Multiplayer

Sat Mar 05, 2016 11:57 pm

Yeah, that's the theory. In practice it scans and scans but never seems to see the other one :|

I don't know if I need to create a static IP or something, but I just can't seem to get them to connect.

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 12:03 am

It's difficult to tell what it's doing and there's no official documentation on getting that to work (unless it's hidden somewhere in a back issue of the MagPi magazine).

I guess we might see what it's trying to do by running tcpdump against the active network interface.

I'll leave my old model B trying to discover the MCPE running on my 3B overnight.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Philski
Posts: 19
Joined: Sun Feb 21, 2016 12:25 pm

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 12:07 am

Thanks! I appreciate the help

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 7:20 am

Seven hours of scanning and it's NOT working. Every machine on my network has a static IPv4 and static IPv6 address. I can see that Minecraft on my 3B is listening on port 4711 but the other machine can't connect to it.

Edit: I checked that the WiFi on my 3B hadn't gone to sleep and now my old B can see that machine. So it does work.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Philski
Posts: 19
Joined: Sun Feb 21, 2016 12:25 pm

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 9:23 am

That's great. Thanks again.

So I have two Pis (B+ and 2), both with a fresh installation of Raspbian from Noobs and want to hook them up via Ethernet.

What should I try first to get them to connect?

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 9:57 am

Start MCPE on the GUI on one RPi- select START GAME, select a world to play.
Start MCPE on the GUI on the other RPi - select JOIN GAME, click on "StevePi 192.168.xxx.xxx" when it appears, click JOIN GAME
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Philski
Posts: 19
Joined: Sun Feb 21, 2016 12:25 pm

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 10:07 am

I thought that might be the solution as I'd always loaded MCPE on both Pis before starting a game on one and joining in the other.

However it still just scans without finding anything.

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 10:18 am

Make sure RPI1 can ping (or ssh) to RPI2
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Philski
Posts: 19
Joined: Sun Feb 21, 2016 12:25 pm

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 10:33 am

That seems to be okay (I had to use sudo ping but they seem to be talking to one another)

EDIT:

Could it have something to do with the sudo requirement?

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 11:20 am

Nope. The sudo requirement was because the package maintainers messed up the ping program.

sudo apt-get update && sudo apt-get -y dist-upgrade
will fix that.

The only requirement is that RPI#1 can see RPI#2 on the network.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Philski
Posts: 19
Joined: Sun Feb 21, 2016 12:25 pm

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 11:26 am

Okay, so the Pis can seem to ping one another, but can't join together in MCPI.

Is there anything else I can try in order to get this to work?

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 11:35 am

Try again, get one running MCPE normally. Get the second RPi scanning your network (I'm assuming you've not got any iptables firewall blocking servers or clients on your LAN).

On RPi#1
sudo netstat -tlnp

Expect to see

Code: Select all

tcp        0      0 0.0.0.0:4711            0.0.0.0:*               LISTEN      4840/minecraft-pi
as one line in the output

sudo apt-get install telnet
telnet 192.168.xxx.2 4711

Expect to see

Code: Select all

pi@eagle:~$ telnet 192.168.1.29 4711
Trying 192.168.1.29...
Connected to 192.168.1.29.
Escape character is '^]'.
foo # <=== This was typed in by me
Fail
^]
telnet> quit
Connection closed.
pi@eagle:~$
I sent it a "foo" command, it sent me back "computer says 'No.'".
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Philski
Posts: 19
Joined: Sun Feb 21, 2016 12:25 pm

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 12:20 pm

Okay, so I've tried this on RP1 (the one running the Minecraft world).

The only difference in the netstat was

696/minecraft-pi

After installing telnet I was unsure of whether I was supposed to use the address of RP1 or RP2.

First of all I tried RP2 (the one attempting to join) and telnet was unable to connect.

Connection refused

Then I tried RP1 and that worked. I also got a fail for the foo command.

Also, incase it makes a difference, the address for both RPIs start 169 rather than 192, due to the ethernet connection rather than WiFi.

EDIT

I also seem to get a fail when entering the escape character ^] and telnet> quit command

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 12:28 pm

169.254 addresses mean that your RPis are not connected to a network with a working DHCP server. That could be the root of your problems 169.254.xxx.xxx/16 is the link-local address block.

Also that means Minecraft (if it does an exhaustive network scan (we don't know how it works)) will take 256 times longer to scan your network than on a 192.168.xxx.xxx/24 network.

You need to look at your wiring and your network address assignments.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Philski
Posts: 19
Joined: Sun Feb 21, 2016 12:25 pm

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 12:37 pm

I have been connecting the RPIs both directly via Ethernet and through a desktop switch.

How do I go about making the necessary changes?

Or do I simply need to be connecting via a router?

Philski
Posts: 19
Joined: Sun Feb 21, 2016 12:25 pm

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 1:43 pm

I've tried adding 192.168 addresses in the Network Preferences GUI to both PIs and rebooting, but they still can't connect in MCPE.

Do I need to add specific addresses to anything else?

The idea is to connect a group of PIs together for an offline LAN game using MCPE.

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 1:43 pm

Connect via your router, that should work.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Philski
Posts: 19
Joined: Sun Feb 21, 2016 12:25 pm

Re: Minecraft Pi Multiplayer

Sun Mar 06, 2016 6:29 pm

It seems to be rather temperamental, but I have managed to join them together!

However the worlds seem to look completely different. I managed to build something in one world but when I joined the game from another Pi I could see a 'slice' of it, however the rest was covered by the generated landscape. It is almost as though it is loading two separate maps.

Return to “General discussion”