Skip to content

mahasch/The-Maze-Game

Repository files navigation

Information Processing Coursework The Maze Game

Introduction

This repository contains the code developed for the ELEC50009 Information Processing Module as part of the 2nd year EIE course.

The IoT system designed by our group is a multiplayer maze game. The game consists of 2 modes: The Maze Race and Dodgeball. The Maze Race is a race between players to reach the goal to progress to the next level. Dodgeball is a competition between players where, upon collision, the slower moving ball loses a life. The gamecurrently supports up to 4 players but can be played with players missing. The game uses the FPGA as a controller for the balls. Simultaneously, on the machine runninggame.py, the player can view the position/movement of their ball relative to others in the GUI on a local PC.

Contributors

  • Muhammad Haaris Khan
  • Mahanoor Syed
  • Brendon Ferra
  • Ifte Chowdhury
  • Savraj Sian
  • Emma Wardle

Game Rules

The Maze Game Rules:

  1. Use your FPGA to guide the ball through the maze to the goal.
  2. Do not fall into any other holes or you will lose points.
  3. Pick up powerups to gain an advantage and extra points.
  4. Reach the goal before other players to get the maximum points.

Dodgeball Rules:

  1. Tilt the FPGA towards the other balls, where the faster ball kills the slower ball.
  2. Pick up powerups to gain an advantage over other players.
  3. Keep playing until all other players have 0 lives left.

AWS Server

The AWS EC2 server hosts the scores database and python scripts controlling the score database. It is also responsible for sending game information to the FPGA and vice versa. Scripts: CreateKillsTable.py CreateScoresTable.py LoadKills.py LoadScores.py UpdateKills.py UpdateScores.py DeleteKill.py DeleteScore.py

Software

The game is written in Python and uses the Pygame library for the GUI. The game is run on a local machine and the FPGA is used as a controller for the balls. The game is run by executing the game.py file. Communication between server and game was done using secure TCP sockets. Communication between server and FPGA was done using serial communication.

Hardware

The movement of the ball is directly related to the movement of the FPGA. The game conceptually presents the FPGA as the surface on which the ball is rolling, where increasing the tilt (at any angle) increases the ball’s acceleration in the direction of that angle. Steps for running the NIOS II code:

  1. Compile the Golden_Top/DE10_LITE_GOLDEN_Top.qpf file as the top-level entity to generate the .sopcinfo and .elf files. Click the blue play button to initiate the compilation.

  2. Establish a connection with the DE10 board by accessing Tools > Programmer. Use the Auto Detect option to locate and run the appropriate file.

  3. Launch Eclipse within Quartus.

  4. Create a new NIOS II project by right-clicking on an empty area and selecting the project template option. Utilize the previously generated .sopcinfo file and choose the Hello World template (not Hello World Small).

  5. Replace the contents of the hello-world.c template file provided by Eclipse with the code from the localProcessing/final file named hello_world_final.c.

  6. Generate the Board Support Package (BSP) by right-clicking on the _bsp folder and selecting 'NIOS II > Generate BSP'.

  7. Build the project by right-clicking on the main folder and selecting 'Build Project'.

  8. Run the code by right-clicking on the same folder and selecting 'Run As > NIOS II process'.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors