This project targeted the execution of a multiplayer video game onto DE10-Nano boards.
The setup was the following: 2 DE10 boards, with each its MTL touch screen and linked by an Ethernet connection. The boards contain a Cyclone V (dual Cortex-A9 + 110k LEs of reconfigurable logic) and numerous I/Os like SPI, UART, HDMI, GPIO, etc. They also embedded an acceleration sensor. The boards were configured with mAbassi, a real-time OS that simplifies the task scheduling for the programmer. With these devices we were supposed to think of a game and implement it using C and the FPGA portion of the board (coded in Verilog).
We came up with the idea of a car chasing game, where 2 taxis would battle for winning clients. The rules were simple:
Click the image herebelow to see a short demonstration of the beta version of the game!
The following figure shows the top-level organization of the game. Each box is a mAbassi task, i.e. a proto-thread with a given task to execute. To implement the timer we used a PIO block embedded in the FPGA logic. The Ethernet connection is divided in two functions, one that sends and the other that receives.

To optimize performances, we used different strategies like dual frame processing, where data for the next image is processed while the current one is diplayed.
To detect the collisions between the players and between the cars and the walls, we used a mask.
