This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
labs:pong_part_2 [2019/12/03 16:25] jgoeders [Exercise #2 - Bouncing Ball] |
labs:pong_part_2 [2019/12/03 16:26] (current) jgoeders [Exercise #1 - Drawing the objects] |
||
---|---|---|---|
Line 197: | Line 197: | ||
6. Implement the other components as follows: | 6. Implement the other components as follows: | ||
- | * **Ball Location:** You should create a new ''always_ff'' block to manage the ball location. Create two registers, ''BallX'' and ''BallY'' that are reset to the center of the screen when ''initGame'' is true. This is sufficient for this exercise. | + | * **Ball Location:** You should create a new ''always_ff'' block to manage the ball location. Create two registers, ''ballX'' and ''ballY'' that are reset to the center of the screen when ''initGame'' is true. This is sufficient for this exercise. |
* **Paddle Locations:** You should create a new ''always_ff'' block to manage the paddle locations. Create two registers, ''LPaddleY'' and ''RPaddleY'' that position the paddles halfway down the screen when ''initGame'' is true. This is sufficient for this exercise. | * **Paddle Locations:** You should create a new ''always_ff'' block to manage the paddle locations. Create two registers, ''LPaddleY'' and ''RPaddleY'' that position the paddles halfway down the screen when ''initGame'' is true. This is sufficient for this exercise. | ||
* **Player Scores:** You should create a new ''always_ff'' block to manage the player scores. For this exercise, just assign the ''P1score'' and ''P2score'' registers to 0 when ''initGame'' is true. | * **Player Scores:** You should create a new ''always_ff'' block to manage the player scores. For this exercise, just assign the ''P1score'' and ''P2score'' registers to 0 when ''initGame'' is true. |