INTRODUCTION -
The game I wanted to make was 'whack a mole' inspired and I decided on several design constraints: • Only use logic gates and chips to create the game. • Have a score board that can go up but also decrement if the player plays badly. • Make the game playable alone but also compatible as a 2-player game. • 'Start/Stop' menu, and a tunable game speed. Using a MCU (Microcontroller Unit) or a FPGA (Field Programmable Gate Array) would have been easier, but since I had time and wanted a challenging project, 'easier' was not necessarily desirable. Furthermore, they would introduce some amount of coding, which is something I wanted to avoid for that specific project. NB - every schematic shared in this blog post is taken from the Reflexes Schematic which is licensed under a CC-BY-NC-SA 4.0 license and available on the Reflexes product page. GAME PAD -The game pad is made up of a 4x4 matrix made with pairs of push buttons and LEDs. The aim is for one LED to light up at random, then all LEDs turn off, then another random one lights up, and this keeps on going, clocked at a regular interval.
For example, when the top 'game' clock is low, all LEDs are off. However, the fast bottom clock (the 'master' clock) keeps on making the counter quickly count from 0-15. When the game clock turns high, let's say the counter stops at '7', so the LED associated with the decoded number of '7' lights up. This can simulate 'randomness' as when the game clock stops the counter, it generally stops on a different number each time. This means that the game now has a 4x4 matrix of LEDs where they all turn off, then one lights up, then they all turn off, and this repeats indefinitely. Each LED is paired with a button that will be used to determine if the player made a good hit. GOOD/BAD HIT -
SCORE TRACKER -
Finally, the circuit needs some logic to make sure that the counter does not loop back to the extremities, as decrementing the counter from 0 will go to 15, and the same thing applies in the other direction (from 15 to 0). With this, the score can now be tracked, and there is a 'WIN' flag that is high if the player gets to 15 points, which will later be used to end the game. START/STOP CONTROL LOGIC -The control logic is important in order to create a 'menu' the player can get in and out of. This prevents the game from always being in 'play' mode. Hence, managing a 'PLAY' flag is a good way to go in and out of the game, where the game only starts when the flag is high, and stops when it is low.
2 PLAYER GAME -Making the game 2-player compatible was an idea that came to mind later in the design process, but I thought that making a board compatible with itself would be a fun challenge to overcome, and also a satisfying feature to have. The initial idea was to use a jack socket, and connect two boards with a TRS jack cable, but this meant that people could plug anything in the game which is not a good idea. It also meant that for it to be self-compatible, the data had to be both an input and an output, which is not possible. Instead of a jack cable, I decided to use symmetry as a way to separate inputs from outputs.
POWER -
PCB DESIGN -
CONCLUSION -
All in all, the v1.0 turned out great and only needs subtle changes to get the game exactly as I want it to be. There are still a couple of design flaws, most notably the 'random' source which is definitely not random. After testing the prototype, there are noticeable patterns with a fast clock as the random source, which could be a 'feature' but I think the game would work better with true randomness (e.g. randomly flipping four bits each game clock cycle).
However, as a side project with important constraints (e.g. only using logic chips), this project turned out to be an enormous success, the game is actually fun to play and can be just as fun as a 2-player speed game. I'm very happy about the design choices I made, and even though Reflexes v1.0 might not go for sale, an improved v1.1 might. I hope you found this post interesting, all the documents for the Reflexes game can be found on its product page in the 'GAMES' tab if you want to take a closer look at them. Thanks for reading through :) NOH-Modular |