decisions

MPF Distribution

Through my long and perilous journey to get MPF into a fit state to run a pinball machine, I learnt a few things. Many of them specific to the time and versions I used, but in general the types of things to look out for are same. And please note, you can just as easily be lucky and have everything work first time – that’s what the developers aim for, and it does happen. 

I had a tremendous amount of frustration getting MPF running properly, or at all.
– me.

 
1️⃣ Always remember – some great pinball machines have MPF at their heart, so don’t give up.

First choice – Windows or Linux

This is a no-brainer for me. I want more control, not less, so Linux. I also set up a Windows system, as my main work machine is Windows by necessity, since Adobe won’t make their software run on my preferred operating system.

 
2️⃣ Don’t assume you got it wrong. Different versions of MPF have been broken in various ways for various times – the no sound problem lasted for ages, and demo machine configs just didn’t work for a few weeks. There are lots of examples like these, it’s not just MPF either – it’s a fact of life for low volume software.

Which Linux?

I wanted to fit my distribution on a small machine. I thought I’d just go with lightweight Linux distribution and iron out any problems that popped up. A fortnight later I gave up. Sometimes, with some distributions and software packages, you end up going around and around in circles, solving one problem after another. At some time you should cut your losses. Yes you can get it to work, but is it worth it? Maybe? If you want to use a particular distribution, I recommend giving it a go, and abandoning it rapidly after a few failures. I went as far as compiling Python to to overcome hurdles. That’s a step too far I think. I eventually took a server install for one of the recommended environments, and built it up to have everything it needed, except that didn’t give me a reliable MPF system. So I took a desktop install, used the text installer and removed almost everything – nice and small, and reliable. The motto is:

 
3️⃣ Try new things, but have alternatives ready.

It Stopped Working after an Update!

Many people have experienced an MPF installation fail after an update, and the difficulty in getting it to work again can be significant. I use Virtual Machines to test different MPF installs on different operating systems. It’s an extra burden, but has saved me many times. I can test updates to MPF, the operating system, and even hardware changes, and when it fails, I can simply roll-back. When it works and tests Ok, I can make the same changes to the production machine. I happen to use VirtualBox, but lots will work.

 
4️⃣ Use virtual machines for testing.

I edited a file and now nothing works

 
This is the bane of software writing, especially for smarty-pants like me that think they can make 5 changes and she’ll be right. I use GIT to track my changes. It’s free and great. The GUI version is a snap to use, and there is a huge amount of HOWTO on the webs.
5️⃣ Use a Revision Control System to track changes in your code.
 
Tips:
  1. Don’t check in huge media files – GIT will take an age looking for differences unless you tell it not too.
  2. You can use GIT to back up your project.
  3. Or you can just backup your GIT repo.

I’m going to Run MPF on this Hardware Platform I like

That’s great, and if it meets the requirements the MPF people build on, then it will probably work a treat. Probably. The Media Controller MC is the most fussy part of MPF. If you have offloaded that to another computer, you probably won’t have any problems at all. If you are using MC, then things like codecs in software and hardware that can trick you, differing audio hardware may or may not work so well.

 
6️⃣ If you are going to use MC on Linux, then use a target OS that matches something in the MPF Linux install instructions. https://missionpinball.org/install/linux/
 
Probably don’t buy something that has not been successfully tested with MPF.
 
7️⃣ If you are going to use MC on Windows, then use a Python version that MC can make sound with. https://missionpinball.org/install/windows/
 
My experience with Windows is that it works or it does not. Making a new user and installing for that user can help.

Time to Upgrade

 
8️⃣ MPF Version 0.57 is on the way, and the dev branch is available for users. Config files are up to v6 and require editing, mainly punctuation to make MPF compliant with YAML. If you are going to use the latest version of MPF remember the syntax in the HOWTO videos won’t always be right.

There are lots more gotchas – but these few tips would have saved me weeks.