The get image command will 'catch' a certain part of the screen and make an image out of it. Say, if you were making a test pogram where a blue matrix is created but you didn't want to supply a .bmp file with you code, you would have:
rem clear the screen to give a blank working palette
cls
rem now set our ink colour
ink rgb(0,0,255),0
rem now put a box on the screen
box 0,0,128,128
rem now use GET IMAGE to "grab" this box and make an image
rem syntax: GET IMAGE Image Number, Left, Top, Right, Bottom
get image 1,0,0,128,128
rem now we have image 1, which is a blue box.
People can develop this sort of code further to create random textures, etc.
Now, a sprite. It is like a "frige magnet". You don't have to paint it onto the background, then clear the screen and repaint it again, etc.
With a sprite you just givit in an image number and where on the screen it should go. For example, to make a sprite (#1), made of image #99 and the screen at 10,10 type:
sprite 1,10,10,99
Now let's append our above code with some code that will position sprite 1 at the mouse course. Let's make sprite 1 image 1 we grabbed earlier by using GET IMAGE.
(insert below code)
rem set up a loop, so these actions keep happening
rem clear the screen
cls
do
rem place a sprite
sprite 1,mousex(),mousey(),1
rem sync
sync
loop
So, this is what the finished code looks like:
rem clear the screen to give a blank working palette
cls
rem now set our ink colour
rem try replacing rgb(0,0,255) with rgb(0,255,255)
ink rgb(0,255,255),0
rem now put a box on the screen
box 0,0,128,128
rem now use GET IMAGE to "grab" this box and make an image
rem syntax: GET IMAGE Image Number, Left, Top, Right, Bottom
get image 1,0,0,128,128
rem now we have image 1, which is a blue box.
rem re-clear the screen
cls
rem set up loop
do
rem place a sprite
sprite 1,mousex(),mousey(),1
rem sync
sync
loop
I love Star Trek.
Especially the Episodes with Starships in.