Group members: James Fong, Elizabeth Cone, Sarah Bertussi, Edward Hannah
For our final project, our team chose to recreate the old-fashioned arcade game "Frogger" on an FPGA development board. The initial plan was to recreate the game entirely, with cars and logs, a movable frog, and a goal area. Due to time constraints, our team was limited and had to focus on a smaller minimum viable product (MVP). As a constraint to our project, we additionally aimed to have the game working on both FPGAs that were available to us; the Nexys A7-100T and the Cmod A7-15T.
Our team began working with the code that we had from Lab 3, which was a bouncing ball on a VGA display. This gave us significant direction as we started out our extensive task. This allowed us to draw a 'frog' on the screen, which was ultimately a green square that we could move using different parameters specified within our constraint files. On my Cmod A7-15T, this translated to external buttons that I had wired up on a breadboard.
We then created separate processes for each 'car' enemy, which were represented with red boxes bouncing back and forth on the screen. We moved them solely in the horizontal direction and varied the speeds. Given the constraints we had, it was too challenging to create logs that the player would be able to hop onto. We did not want to work with altering the velocities too significantly, nor worrying about the graphical representations.
To implement collision detection, we used the sample code Lab 3 offered for detecting wall collision as a basis. While FPGAs do not have readily available physics engines we could have utilized, this served as an effective substitute. Unfortunately, this meant that there was a fair amount of hard coding.
After all of this, we had our MVP and were able to focus on different features we had initially set out to achieve. We had the frog change its color based upon whether or not it was 'dead' or had 'won'. We also implemented a reset button. We also used a 4 digit 7 segment display to represent the score, which in this case was the number of times that the player had won the game. Finally, we added a wider range of colors by making use of more of the VGA color ports available us.
The final code can be found on Liz's repository here.