Ever since I was young, I've been an avid listener of Taylor Swift. My favorite thing about her songs were her lyrics, and as I've grown up through my teen years, I've watched her lyrics develop with her career. Some of her later work has very sophisticated lyricism drawing from famous poetry and literature. I wanted to make a game that was both engaging and challenging, and made the player acknowledge some of their inherent preconception of Taylor Swift lyrics. It's been really fun seeing my friends get shocked by some of the answers!
Buildingthe Trivia Game
To build the Trivia game, I first made a design system diagram that outlined what hardware I needed to integrate and how I would connect these to my Pocket Beagle. These are included in the System and Power Diagram Figures. Then, I created a circuit to implement my hardware.
To set up the arcade buttons, I used this simple configuration using a 1k resistor:
The breadboard for each of the two arcade buttons was wired as follows. Note that the red and orange wires correspond to the 5V voltage input terminals of the arcade buttons, the grey wires correspond to the 5V power supply, and the yellow wires correspond to ground source. Buttons 1 and 2 were wired to P2.2 and P2.10 pins on the Pocketbeagle, respectively, and configured accordingly in the python code.
Setting up the SPIScreen
To set up the SPI screen, I first soldered bridges IM1/IM2/IM3 on the back of the screen. On the board, pins P1.2, P1.4, P1.8, P1.10, P1.12, and P1.14 were used to hook up the screen to power and to the PocketBeagle. The Pocketbeagle pin connections for the SPI screen are listed:
The resulting wiring on the board looked as follows:
After the SPI screen was wired, the pins were configured in the python file under spi_screen.py. After the SPI screen was wired and tested, the SPI screen was detached from the breadboard and female-to-female jumper wires were used to connect the SPI Pocketbeagle pin connections to the male connectors on the SPI screen itself.
Building a housing for the game re-wiring circuitry to accommodate housingFinally, a housing unit was made for the game using 1/2" ply wood and a laser cutting machine. The SVG file used to laser cut is included under the schematics section of this project description.
The final wiring of all of the elements is shown in the images below:
After the wiring was completed and placed inside the housing, the housing unit was closed and the game became a portable unit. The final appearance of the game with supplied voltage from a USB wall outlet (5V) is seen below, and a video demonstration of the functional prototype is attached.
There are a few improvements that I envision working on in the future as I continue to develop this project. First, some of the quotes get truncated to fit on the screen at awkward spots. That is to say, a word's last letter may be cut off between lines on the screen, which may create confusion for the user. For this game, I had to incorporate a function that "wrapped" the text to fit inside the screen, since the original implemented code truncated the text instead. In the future, it may be helpful to optimize this wrap function to keep words together in each line, and not truncate words.
Another way to improve the game going forward would be to incorporate non-cumulative score options. Right now, the configuration of the game is intended to have different players playing sequentially who are working together to get the highest possible cumulative score. In the future, I could incorporate an option to start a new, independent game, or continue to play cumulative score rounds.
Finally, another future improvement for this game would be to include a function that prevents the repetition of quotes throughout the duration of one game. Right now, the large amount of quotes in the quote repository prevents frequent repetition of quotes. However, sometimes the quotes may repeat themselves due to the randomized nature of the quote-fetching algorithm. As such, incorporating code that removes a quote every time it is used may be helpful in eliminating quote repetition and generating a more enjoyable playing experience.
AcknowledgementsI would like to thank professor Erik Welsh for his guidance on this project as well as his help troubleshooting hardware and code integration. I would also like to thank ChatGPT for code structure inspiration and troubleshooting help.
Comments