OVERVIEW
A project that I worked on in my final year of University was to design a game written in C for an embeeded system-on-a-chip (SoC). This was a group project undertaken alongside 2 fellow peers. We created a battleships game using VGA graphics and small vero-board controllers (see below). The code was structured using MVVM (model-view-viewmodel), a standard structure commonly used with the .net framework by Microsoft. The users inputs alter the game "model" which represents the game state. In tern, the model changes are passed through logic in the "view-model" which converts the model to a format that can be presented to the user through the "view". Due to the lack of object-orientated programming with C, carefull naming conventions were required to use the MVVM structure.
|
When the user pressed a button on the controller, this set a digital pin on the SoC development board high which was then handled by the game logic. The game is two-players each with their own VGA display and individual SoCs. To enable communication between SoCs, we used the audio IO to develop a "dial-up" style audio communication between the two which tranmitted the model data. There were many challenges of using an analogue digital-to-analogue converter to transmit data including working around the analogue audio filters that were applied to the signal.
|
DEMO
Below is a demonstration of the game.