Department of Electrical and Computer Engineering Facebook page


  • DEPARTMENT
    • Overview
    • Computing
    • Facilities
    • Organizations
    • Educational Objectives
    • Student Outcomes
    • Scholarship Awards
    • Employment
    • Advisory Committee
    • Contact
  • ACADEMICS
    • Undergraduate
      • Computer Eng.
      • Electrical Eng.
      • Ambassadors
    • Graduate
      • Information for Prospective Students
      • ECE Graduate Handbook
      • Graduate Forms
      • Ph.D. Qualifying Exam
      • Distance Education
      • Frequently Asked Questions (FAQ)
    • Courses
    • Student Survival kit
    • Distance Learning
  • PEOPLE
    • Faculty
    • Staff
  • PROSPECTIVE STUDENTS
    • Overview
    • FAQ
    • Considering ECE
    • Scholarships
    • PC Requirements
    • Office of Admissions
  • RESEARCH
    • Overview
    • Signal Processing & Communications
    • Digital Systems & Microelectronics
    • Power & High Voltage
    • Research Centers
      • Emerging Materials Research Laboratory
      • High Voltage Laboratory
      • Robotics
    • HPCC
  • ALUMNI
Brick - Ece
Personal tools
  • Log in
Views
  • Page
  • Discussion
  • View source
  • History

Brick

From Ece

Jump to: navigation, search

Contents

  • 1 Team Demolition
  • 2 Team Members
  • 3 Phase 1
    • 3.1 Introduction
    • 3.2 Concept
    • 3.3 Proposed Work
    • 3.4 Required Parts
    • 3.5 Expected Deliverables
  • 4 Phase 2
    • 4.1 Introduction
    • 4.2 Concept
    • 4.3 Proposed Work
    • 4.4 Required Parts
    • 4.5 Expected Deliverables
    • 4.6 Block Diagram
  • 5 Phase 3
    • 5.1 Review of Proposed Work
    • 5.2 Modules
  • 6 Phase 4
    • 6.1 Analysis of Proposed Work
    • 6.2 Top-Level Block Diagram
    • 6.3 Project Files

Team Demolition

The objective of this project is to recreate the popular game called Brick.


Team Members

Jason Aycock - Checker

Tina McGlaston - Recorder

Alan Pritchard - Coordinator


Phase 1

Introduction

Brick is a popular game that is found on many of the newer cell phones. The objective of the game is to clear all of the bricks without losing all of the player’s lives. The player’s score will increment on the seven segment display each time a brick is hit. The bricks are square and will be colored differently to be able to tell where each brick begins and ends. The paddle is placed at the bottom of the screen, and there is a wall that appears on all sides of the screen except for the bottom, which is where the paddle is. If the ball goes off the screen, a life is lost.


Concept

By the projects end, the VGA monitor will display the famous brick game. The Basys board will be used to display the lives that a player has left along with their current score. It will control all aspects of the game. The ps/2 keyboard will control the user's input, movement of the paddle.


Proposed Work

1. ps2core module – takes in the raw data from the ps/2 keyboard and converts it into an opcode.

2. ps2decode module – takes the value from the ps2core module and decodes it into a form that can be used by the other various modules.

3. ball_control module – this module is used to control the movement of the ball and how it interacts with the current game environment.

4. paddle_control module – controls the paddles movement

5. draw_vga module – displays the current game state

6. vga_sync module – controls vertical and horizontal synchronization

7. brick_control module – controls whether or not a brick has been hit

8. score module – keeps track of the score of the game and increments the score each time a brick is hit

9. binarytobcd module – converts a binary number into a binary coded decimal

10. segdecode module – this module is used to convert the binary number to display on the seven segment display

11. lives_left module – this module will used LEDs to display the amount of lives left, and the number will decrement each time a life is lost


Required Parts

  • PS/2 keyboard
  • VGA Monitor
  • Basys Spartan 3E Development Board


Expected Deliverables

When the project is completed, the game board will be displayed on the screen. The ball will begin moving, and the player will be able to move the paddle left or right using the arrow keys on the keyboard. At the start of a round, the ball will move downward and make a 45 degree turn if it hits the paddle. When the ball hits the paddle any other time, it should turn at a 90 degree angle. Otherwise, the game will decrement a life and reset the board. If the ball hits a brick, the brick should disappear, and the ball should make a 90 degree turn. When all bricks are cleared, the game is over.



Phase 2

Introduction

Brick is a popular game that is found on many of the newer cell phones. The objective of the game is to clear all of the bricks without losing all of the player’s lives. The player’s score will increment on the seven segment display each time a brick is hit. The bricks are square and will be colored differently to be able to tell where each brick begins and ends. The paddle is placed at the bottom of the screen, and there is a wall that appears on all sides of the screen except for the bottom, which is where the paddle is. If the ball goes off the screen, a life is lost.


Concept

By the projects end, the VGA monitor will display the famous brick game. The Basys board will be used to display the lives that a player has left along with their current score. It will control all aspects of the game. The ps/2 keyboard will control the user's input, movement of the paddle.


Proposed Work

1. ps2core module – takes in the raw data from the ps/2 keyboard and converts it into an opcode.

2. ps2decode module – takes the value from the ps2core module and decodes it into a form that can be used by the other various modules.

3. ball_control module – this module is used to control the movement of the ball and how it interacts with the current game environment.

4. paddle_control module – controls the paddles movement

5. draw_vga module – displays the current game state

6. vga_sync module – controls vertical and horizontal synchronization

7. brick_control module – controls whether or not a brick has been hit

8. score module – keeps track of the score of the game and increments the score each time a brick is hit

9. binarytobcd module – converts a binary number into a binary coded decimal

10. segdecode module – this module is used to convert the binary number to display on the seven segment display

11. lives_left module – this module will used LEDs to display the amount of lives left, and the number will decrement each time a life is lost


Required Parts

  • PS/2 keyboard
  • VGA Monitor
  • Basys Spartan 3E Development Board


Expected Deliverables

When the project is completed, the game board will be displayed on the screen. The ball will begin moving, and the player will be able to move the paddle left or right using the arrow keys on the keyboard. At the start of a round, the ball will move downward and make a 45 degree turn if it hits the paddle. When the ball hits the paddle any other time, it should turn at a 90 degree angle. Otherwise, the game will decrement a life and reset the board. If the ball hits a brick, the brick should disappear, and the ball should make a 90 degree turn. When all bricks are cleared, the game is over.

Block Diagram

Image:Brick_Block_Diagram.jpg



Phase 3

Review of Proposed Work

1. ps2core module – takes in the raw data from the ps/2 keyboard and converts it into an opcode.

2. ps2decode module – takes the value from the ps2core module and decodes it into a form that can be used by the other various modules.

3. ball_control module – this module is used to control the movement of the ball and how it interacts with the current game environment.

4. paddle_control module – controls the paddles movement

5. draw_vga module – displays the current game state

6. vga_sync module – controls vertical and horizontal synchronization

7. brick_control module – controls whether or not a brick has been hit

8. score module – keeps track of the score of the game and increments the score each time a brick is hit

9. binarytobcd module – converts a binary number into a binary coded decimal

10. segdecode module – this module is used to convert the binary number to display on the seven segment display

11. lives_left module – this module will used LEDs to display the amount of lives left, and the number will decrement each time a life is lost

Modules

1. ps2core

  • Input: ps2data – data that comes from the keyboard
  • Input: ps2clock – clock from the keyboard
  • Output: hexcode[15:0] – converted hexcode from the keyboard
  • Output: badparity
  • Output: ready
  • Description – will output the raw code received from the keyboard


2. ps2_decode

  • Input: ps2_raw[15:0] – this is the keyboard code
  • Output: live_left[7:0] – this is used to output the lives left
  • Output: opcode[2:0] – movement code for the keyboard
  • Description – converts the ps2data into a similar opcode


3. ball_control

  • Input: clk
  • Input: paddleY[9:0] – gets the position of the Paddle
  • Input: ps2_raw[15:0] – takes in opcodes to detect a reset
  • Input: brickX[9:0] - takes in the location of the brick so collisions can be detected
  • Input: brickY[9:0] – takes in the location of the brick so collisions can be detected
  • Output: ballX[9:0] – outputs the position of the ball X coordinates
  • Output: ballY[9:0] – output the position of the ball Y coordinates
  • Description – is used to give the location of the ball and to make the movements and detect collisions


4. paddle_control

  • Input: clk
  • Input: opcode[2:0] – takes in the opcode from the keyboard
  • Output: paddleY[9:0] – this will make the movements of the paddle on the screen
  • Description – is used to control the paddle movements


5. draw_vga

  • Input: clk – 50Mhz clock
  • Input: video_on – asserted high when the row/col are valid
  • Input: paddleY – paddles Y coordinate
  • Input: brickX[9:0] – bricks X coordinate
  • Input: brickY[9:0] – bricks Y coordinate
  • Input: ballX[9:0] – balls X coordinate
  • Input: ballY[9:0] – balls Y coordinate
  • Input: row[9:0] – currently drawn pixels Y coordinate
  • Input: col[9:0] – currently drawn pixels X coordinate
  • Output: red – red signal to VGA port
  • Output: green – green signal to VGA port
  • Output: blue – blue signal to VGA port
  • Description – determines the RGB values for the color of the pixel being drawn


6. vga_sync

  • Input: clk – 50Mhz clock
  • Output: h_sync – horizontal sync for VGA port
  • Output: v_sync – vertical sync for the VGA port
  • Output: video_on – high when row/col are valid
  • Output: pixel_row[9:0] – value of the currently drawn Y coordinate
  • Output: pixel_col[9:0] – value of the currently drawn X coordinate
  • Description – it will compute the pixel coordinates that are currently drawn and manages the vertical and horizontal signals to the VGA output.


7. brick_control

  • Input: brick_hit – if asserted high the brick has been hit
  • Input: ballX – gives the positioning of the ball’s X coordinates
  • Input: ballY – gives the positioning of the ball’s Y coordinates
  • Output: brickX – positioning of the brick’s X coordinates
  • Output: brickY – positioning of the brick’s Y coordinates
  • Description – used to give the X and Y coordinates of the created brick


8. score_module

  • Input: clk – 50Mhz clock
  • Input: brick_destroyed – used to erase a destroyed brick
  • Output: score[13:0] – output’s the users current score
  • Description – increments the users score whenever a brick is destroyed.


9. binary2bcd

  • Input: score[13:0]- user’s current score
  • Output: display[15:0]
  • Description – converts the binary score to bcd for the segdecode module


10. segdecode

  • Input clk – 50Mhz clock
  • Input char3[3:0] – fourth seven-segment display
  • Input char2[3:0] – third seven-segment display
  • Input char1[3:0] – second seven-segment display
  • Input char[3:0] – first seven-segment display
  • Output: anode[3:0] – outputs to seven-segment display
  • Output: sevenseg[7:0] – outputs the values to each of the different segments
  • Description – display’s the users score to the seven-segment display


11. lives_left

  • Input: clk – 50Mhz clock
  • Input: ballX[9:0] – gets ball’s X coordinates
  • Input: ballY[9:0] – gets ball’s Y coordinates
  • Output: lives_left[2:0] – outputs the users lives to the led-array
  • Description: it will decrement the lives left if the ball leaves the screen

Phase 4

Analysis of Proposed Work

After completion of the project the following modules were not complete: lives_left module: it was used to inform the user the amount of lives they had left through the LEDs.

Instead of creating the lives lost module, we included the information in the score module instead.

Functionality added:

  1. Instead of our game displaying an abundance of bricks on the screen, like the traditional game of Brick, we decided to only have it display three bricks at a time. Each time that a brick is hit, a new brick is displayed in a random location. This was done to increase the difficulty of the game, because a player would not know where the next brick would be displayed.
  2. Decrementing the paddle length each time a brick was hit is another feature that was added to increase the difficulty of the game. The paddle will only decrement down to the size of the ball.

Top-Level Block Diagram

Image:Brick_Block_Diagram.jpg


Project Files

[[1]]

Retrieved from "http://www.ece.msstate.edu/wiki/index.php/Brick"
Navigation
  • Main Page
  • Community portal
  • Current events
  • Recent changes
  • Random page
  • Help
SEARCH
TOOLBOX
LANGUAGES
 
Toolbox
  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link
Powered by MediaWiki
  • This page was last modified on 24 April 2008, at 19:53.
  • This page has been accessed 2,108 times.
  • Privacy policy
  • About Ece
  • Disclaimers

Mississippi State University Home| PO Box 9571, Mississippi State, MS 39762 | Main Office: 1.662.325.3912

Bagley College of Engineering | Mississippi State University| Legal| Webmaster| Intranet

Page modified: Tue, 23 Sep 2008 15:18:39 CDT