Post by johnno56 on Oct 3, 2019 18:38:09 GMT -6
"In the beginning.." Well, maybe not 'that' far back... lol More like the 1950's... The Great-grand father of computer graphics was born.
Back in 1897, the first Cathode Ray Tube - Baun Tube -, was invented and would then be developed into an Oscilloscope and finally the humble CRT Television.
Before the Television, electronic art, was being developed. in 1959 saw the introduction of the Light Pen. Capable of detecting AND placing Pixels on the display.
The first animated game, Pong, was released by Atari in 1972 and the rest of it is now part of history.
It all started with the dream to create electronic art and that started with one Pixel.
In the beginning was the Pixel.
The Oxford dictionary defines a Pixel as: "a minute area of illumination on a display screen, one of many from which an image is composed."
RC Basic, like many other 'basics', can configure the dimension of the display. The old 8 bit games would use simple graphics on screen sizes such as: 640x480, 800x600 and 1024x768. Of course, the computer's graphics card, would naturally effect the ultimate size of the display.
For this example I will use the basic 640x480 screen.
Like a light switch, pixels are turned on and off, as the program dictates. When you first run a 640x480 screen, all 307,200 pixels, will be present. They are 'switched off' but are still there...
Run the following:
Wow! 307,200 pixels! Yawn! Not much point is you can't see them... lol
Let's try that again, this time, let's put a single pixel in the centre of the screen.
Ok. A single pixel. Not exactly a DaVinci but, at least, it's a start.
Of course, there are commands that can effect the appearance, even if it is only one pixel, to make it a little more interesting.
Colour. Change the colour of the pixel using the setColor() command. Read Colour 101 tutorial for an explanation. Tip: Changing
the colour to 'black' (rgb(0,0,0)) and placing the pixel in the same spot... see what happens...
Movement: Read the 'Movement' tutorials on how to make the pixel move around the screen. Experiment to change the speed
at which the pixel moves. One pixel movement at a time can be mind numbing slow... lol
This may not be a proper game, but each sprite, is a collection of pixels.
A journey of 1,000 miles starts with just one step.
I hope that this has been useful. I am hoping that the next tutorial will be the humble 'line'.
Back in 1897, the first Cathode Ray Tube - Baun Tube -, was invented and would then be developed into an Oscilloscope and finally the humble CRT Television.
Before the Television, electronic art, was being developed. in 1959 saw the introduction of the Light Pen. Capable of detecting AND placing Pixels on the display.
The first animated game, Pong, was released by Atari in 1972 and the rest of it is now part of history.
It all started with the dream to create electronic art and that started with one Pixel.
In the beginning was the Pixel.
The Oxford dictionary defines a Pixel as: "a minute area of illumination on a display screen, one of many from which an image is composed."
RC Basic, like many other 'basics', can configure the dimension of the display. The old 8 bit games would use simple graphics on screen sizes such as: 640x480, 800x600 and 1024x768. Of course, the computer's graphics card, would naturally effect the ultimate size of the display.
For this example I will use the basic 640x480 screen.
Like a light switch, pixels are turned on and off, as the program dictates. When you first run a 640x480 screen, all 307,200 pixels, will be present. They are 'switched off' but are still there...
Run the following:
xmax = 640
ymax = 480
title$ = "Blank Screen"
WindowOpen(1,title$,0,0,xmax,ymax,0)
CanvasOpen(1,xmax,ymax,0,0,xmax,ymax,0)
do
ClearCanvas
Update()
loop until key(k_escape) = 1
Wow! 307,200 pixels! Yawn! Not much point is you can't see them... lol
Let's try that again, this time, let's put a single pixel in the centre of the screen.
xmax = 640
ymax = 480
title$ = "Single Pixel 640x480"
WindowOpen(1,title$,0,0,xmax,ymax,0)
CanvasOpen(1,xmax,ymax,0,0,xmax,ymax,0)
setColor(rgb(255,255,0))
' Set the colour to Yellow.
do
ClearCanvas
Pset(xmax / 2, ymax / 2)
' Place a single pixel at the centre of
' the X axis and the center of the Y axis
' on the current canvas.
' xmax / 2 = 320 ymax / 2 = 240
' Pset(320,240)
Update()
loop until key(k_escape) = 1
Ok. A single pixel. Not exactly a DaVinci but, at least, it's a start.
Of course, there are commands that can effect the appearance, even if it is only one pixel, to make it a little more interesting.
Colour. Change the colour of the pixel using the setColor() command. Read Colour 101 tutorial for an explanation. Tip: Changing
the colour to 'black' (rgb(0,0,0)) and placing the pixel in the same spot... see what happens...
Movement: Read the 'Movement' tutorials on how to make the pixel move around the screen. Experiment to change the speed
at which the pixel moves. One pixel movement at a time can be mind numbing slow... lol
This may not be a proper game, but each sprite, is a collection of pixels.
A journey of 1,000 miles starts with just one step.
I hope that this has been useful. I am hoping that the next tutorial will be the humble 'line'.