how to play

The game starts when you pull any handle on the title screen. When the game starts, the character riding on the door will start flying forward automatically. This character can be controlled with two handles. When you pull the handle, the character will move according to which handle you pull. If you pull the left handle, the character will move left. Same for the right handle. If you pull both handles at the same time, the character will jump. The goal is to go as far as possible without hitting cars or obstacles.

Controller

The controller has 2 handles, those handles are pre-made and sold as a set of both handles. The angle of the handle is detected by a potentiometer(volume). The part that connects the potentiometer and the handle is made using a 3D printer. The controller also includes a Raspberry pi Pico. The controller has a USB connector. When you connect this controller to a PC, it will be detected as a USB keyboard. This feature makes debugging easier during developing games. Because if I use a keyboard instead, I can test the game without a controller.

The outside is made of laser cut MDF (55mm thick).

controller circuit

3 attempts

1st attempt

First, I tried to detect the handle angle using a rotary encoder. But this attempt is unsuccessful. This is because, although a rotary encoder can detect the direction of rotation, it cannot detect the amount of rotation accurately. I didn’t know the features of the rotary encoder.

2nd attempt

Second, I tried to detect the handle angle using a photointerrupter. Attach a hook to the handle that links with the angle of the handle. And place photointerrupters at each angle. When the handle reaches a certain angle, the hook is detected by the photointerrupter. But this attempt is unsuccessful too.

Photointerrupters are fairly large, so in order to place many of them, they must be placed away from the center of the handle. This requires the length of the hook to be somewhat longer. In this case, the movement of the hook linked to the handle becomes an issue. The handle does not simply move only along the horizontal plane. The rotation axis of the handle is unstable. This problem causes the hook to collide with the photointerrupter. Therefore, this idea was scrapped.

concept drawing

prototype

3rd attempt

Finally, I used a volume to detect the handle angle. Now that I think about it, this is a very simple way to achieve this. By linking the handle angle and the volume value, the angle can be obtained as a voltage value using the ADC.

Now writing...