Download presentation
Presentation is loading. Please wait.
1
Display of Objects on Screen
2
COUNTERS b A horizontal counter represents the horizontal position of the monitor’s electron beam. b A vertical counter represents the vertical position of the monitor’s electron beam. b The horizontal counter is incremented each clock cycle. b The vertical counter is incremented when the horizontal counter reaches 699.
3
Monitor Processing H_count V_count ELECTRON BEAM
4
OBJECTS b Objects Include Paddles, Ball, Lives, Blocks, etc. b Each object has fixed dimensions (Length and Width). b The location of an object is determined by its upper-left corner. b When the electron beam passes over an object, the color of that pixel is changed. b Paddle = white, Ball = green, block = multicolored, background = blue
5
Example - Draw a Ball b Ball Location: x = 300 y = 200 b Ball Size: width = 10 height = 10 300 200
6
301 200 Example - Draw a Ball b The horizontal counter is incremented. b The next pixel is drawn.
7
310 200 Example - Draw a Ball b Once the width of the ball has been drawn, the color is reset to blue.
8
300 201 Example - Draw a Ball b After the horizontal reaches 599, the vertical counter is incremented.
9
310 210 Example - Draw a Ball b After the 10th row is finished, the ball has been fully drawn.
10
“The End”
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.