ELE409 Final Project: Simon SaysGame Logic 1. Stores player’s input sequence as a list 2. Send...

Post on 25-Dec-2019

2 views 0 download

Transcript of ELE409 Final Project: Simon SaysGame Logic 1. Stores player’s input sequence as a list 2. Send...

ELE409 Final Project: Simon Says

Taylor Coogan Jordan Volpe

1

Project Overview

•  Based on “Simon Says” game

•  Multiplayer game using sockets •  Board-to-Board Communication

•  Touch Screen input for gameplay

•  Tracks sequence length and player “lives”

2

High Level Block Diagram

3

Gameplay Specifics •  Players take turns pressing a sequence

of colors on their touch screen

•  Other player must accurately repeat the sequence

•  Sequence length +=1 each round •  Sequence is cumulative for each round

•  If a player enters incorrect sequence, they lose a “life”

•  Once one player loses 3 lives, the game ends 4

Touch Screen I/O •  Screen divided into quadrants

•  Touch/click coordinate data determines which color button was pushed

•  When button (quadrant) is pushed, or when a sequence is repeated on a screen, the corresponding quadrant will flash

•  Quickly change color of quadrant

Responsibility of Taylor

5

Game Logic 1.  Stores player’s input sequence as a list

2.  Send list to opponent

3.  Sequence flashes on opponents screen

4.  Opponent response sequence is saved to a list

5.  Compare the sent sequence list with the response sequence list

6.  If they do not match, player failed

7.  Otherwise game continues

8.  If sequence length > 1, check if sequence matches previous sequence by temporarily removing last element of new sequence and comparing it to the old one

9.  If round/game ends, call appropriate C functions to change LEDs/Sevenseg and display appropriate text to screen

Responsibility of Taylor 6

Networking (Multiplayer) •  Uses python TCP socket to communicate

•  Board sends sequence list through socket using client function

•  Then board listens for response using server function

•  Convert sequence list to byte stream to send through socket

•  Unpack byte stream on other end

Responsibility of Jordan

DE1-SOC DE1-SOC

7

Seven Segment Displays & LEDs •  The current round/sequence length is

displayed on each board

•  Each player’s number of “lives” corresponds with the number of LEDs lit

•  Used shift left to display both players lives on each board

•  Called C Program executables from the python script

Responsibility of Jordan

8

Speaker (Audio) •  Tried to configure audio for game

•  Distinct “beep” tone would play when a button/quadrant is pushed by a player

•  Successfully configured this for a desktop computer (or a device with audio driver)

•  DE1_SoC did not have audio drivers, so our efforts were unsuccessful

9

https://youtu.be/yvL1R0qDTJ0

10

Demo

Thank You! Questions

Taylor Coogan Jordan Volpe

11