Disapearing Background
Author |
Message |
Jessica359
|
|
|
|
|
Sponsor Sponsor
|
|
|
lordroba
|
Posted: Tue Apr 29, 2008 10:53 am Post subject: Re: Disapearing Background |
|
|
Notice some of the changes I've made. Try to see what I did different and how it might affect the program.
Turing: |
View.Set ("graphics, offscreenonly")
var x, y : int := 100
var chars : array char of boolean
var anglex : int := 135
var angley : int := 225
var tmp : boolean := true
var back : int := Pic.FileNew ("background.bmp")
procedure frog
if tmp then
%exit when anglex = 135 and angley = 225
Draw.FillOval (x, y, 20, 20, green)
anglex := anglex - 1
angley := angley + 1
delay (20)
if anglex = 135 and angley = 225 then
tmp := true
end if
end if
end frog
loop
Input.KeyDown (chars )
if chars (KEY_UP_ARROW) and y < 390 then
y := y + 5
end if
if chars (KEY_DOWN_ARROW) and y > 10 then
y := y - 5
end if
if chars (KEY_RIGHT_ARROW) and x < 630 then
x := x + 5
end if
if chars (KEY_LEFT_ARROW) and x > 10 then
x := x - 5
end if
Pic.Draw (back, 0, 0, picCopy)
frog
View.Update
end loop
|
|
|
|
|
|
|
Insectoid
|
Posted: Wed Apr 30, 2008 10:15 am Post subject: RE:Disapearing Background |
|
|
Use a sprite?
|
|
|
|
|
|
Jessica359
|
Posted: Wed Apr 30, 2008 11:58 am Post subject: RE:Disapearing Background |
|
|
Awesome thanks
and for sprites i don't know anything about them, once i'm done this game i'm going to start reading on sprites, but thanks anyways
|
|
|
|
|
|
darkangel
|
Posted: Wed Apr 30, 2008 3:30 pm Post subject: Re: Disapearing Background |
|
|
THIS tutorial was how i learned.
|
|
|
|
|
|
|
|