Schematic of joystick or game port for PC (15-pin Cannon) is very simple. It contains only 2-4 buttons (jump, weapon, sometimes other 2 auxiliary buttons
to switch weapons etc). The joystick stick is mechanically connected to two potentiometers (2 axis).
Similarly, you can build gamepad, which has four directional buttons. These keys are switching resistors replacing potentiometers.
I built an unusual game controller on this principle. It consists of two mouses. Each mouse has 3 buttons (or 2 buttons + scroll wheel press switch).
Nothing but the mouse buttons is used (mouse can be faulty).
One mouse is used to move up and down and jumping, the other one to move left, right and shooting. The device is thus controlled by two hands.
This control may seem confusing at first,
but after a while you get used to it. The odd thing is that almost always using one button on the left and one on the right mouse.
I liked to play Bio Menace game this way (on this computer).