@mr_fredricksen You will have to do some research on the interface requirements. The joystick is like buttons--the microswitches will have to lead to some kind of controller interface like an IPAC USB keyboard interface for example, or directly to GPIO, etc. This will largely depend on the other controls you hope to use. For example, is this a single player arcade system? 2-player control panel? 4? How many buttons? I don't really need to know those answers, but you need to plan for all of your inputs and decide how you are going to handle them. The optical part is trickier. The endgame will likely look like a USB mouse when connected to the Pi. You will need to research the rotary joystick you want to get and find out what your options are for a compatible rotary interface. Maybe there is a USB board for it? Maybe they expect you to connect it to a spinner interface. I would read everything I can find via Google on the subject, as people have been building emulator-based arcades for years before retropie, so there is a lot written on the topic of rotary joysticks.

You are asking the right questions though. You definitely need something between the controls and the Pi computer. Depending on how many controls, you might need multiple somethings. You cannot, for example, just plug a rotary joystick into the Pi somehow. You need a USB interface and possibly more than one. A lot depends on your design ideas. Check out Ultimarc for some ideas, or Groovy Game Gear, or follow examples others have used in years past when building systems with rotary.