Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 3 Save the Hangman > Changing the Screen - Pg. 40

Video Game Programming for Kids N ow that you can do some BASIC programming, we can learn more about one of my favorite subjects--graphics! Sometimes, graphics programming means just drawing one pixel or dot at a time. To make a whole picture, like the scene of a game, you could draw it with dots and other shapes, like circles and squares. If you want your game to look really awesome, a better way is to load a bitmap and draw it all at once--but we'll hold off on bitmaps for a while yet. Learning about graphics is really fun if we take it in stages and just start programming. So, we'll look at all of the graphics statements and commands in QB64 in this chapter. Changing the Screen In the old days, back in the 1970s and 1980s, computers had very low quality screens. Back then, a computer screen was called a monitor, or a CRT--Cathode Ray Tube. It looked like an old-fash- ioned TV because, well, it was! There were some personal com- , puters back then that did not come with a monitor at all; instead, you would plug it into your TV like you do with a video game sys- tem--like your Xbox 360, Nintendo Wii, or Sony PS3, to name the newest consoles at this time. We can take for granted the crazy high-resolution LCD monitors today because they are so afford- able, but this would have been unbelievable technology back then. Widescreen was unheard of at that time! Today, your typical PC has a 20" or larger widescreen LCD-- Liquid Crystal Display. There is even a newer technology coming out now for TVs and computer monitors: LED--Light Emitting Diode. An LED screen is made up of millions of little LEDs, just like the blinking lights on a phone or the power light on a radio. The LED used for a power indicator is usually red or green. Well, an LED screen uses the same technology but the diodes are tiny, crammed onto the flat screen, and for every pixel there is one lit- tle tiny red, green, and blue diode. Red, Green, and Blue--RGB: these are the three main colors used in computer graphics. They are the prime colors that rule all other colors. By using Red, Green, and Blue, in different combinations, you can create any other color! Including black (0, 0, 0) and white (255, 255, 255). What are those numbers in parentheses? That is how you define an RGB color, in that order: (Red, Green, Blue). 40