Computer Science Canada

Flickering Images

Author:  Jessica359 [ Thu Apr 24, 2008 10:31 am ]
Post subject:  Flickering Images

Hey,
I am making instructions for my game and i have an image in it but its flickering, i tried View.Update but it doesn't work.
what can i do Question Exclamation Question
Cool

code:

% Introduction Screen
setscreen ("offscreenonly:700;650")
setscreen ("graphics:700;650")
var font1, font2 : int
font1 := Font.New ("Castellar:100")
font2 := Font.New ("Comic Sans MS:18:bold")
Draw.Fill (50,50,7,7)

loop
Font.Draw ("FROGGER", 10, 550, font1, 110)
Font.Draw ("FROGGER", 10, 550, font1, 10)
Font.Draw ("FROGGER", 10, 550, font1, 120)
Font.Draw ("FROGGER", 10, 550, font1, 10)
Font.Draw ("FROGGER", 10, 550, font1, 130)
Font.Draw ("FROGGER", 10, 550, font1, 10)
Font.Draw ("FROGGER", 10, 550, font1, 140)
colorback (black)
color (0)
locatexy (250,500)
put "Welcome to the game of FROGGER"
Font.Draw ("***Rules***", 50, 400, font2, 10)


locatexy (20,350)
put "1. This is a 1 Player Game."
locatexy (20,300)
put "2. You have 3 lives."
locatexy (20,250)
put "3. Get to the water without getting hit by the cars."
locatexy (20,200)
put "4. Use the arrown keys to move around."
locatexy (20,130)
put "Pretty simple right? GOOD LUCK!"


Pic.ScreenLoad ("frog.gif", 300, 200, picMerge)
Pic.ScreenLoad ("frog.gif", 300, -50, picMerge)
 View.Update
    Time.Delay (5)
end loop




Author:  Tony [ Thu Apr 24, 2008 10:53 am ]
Post subject:  RE:Flickering Images

Quote:

setscreen ("offscreenonly:700;650")
setscreen ("graphics:700;650")

Well there's your problem.

Author:  Jessica359 [ Thu Apr 24, 2008 1:19 pm ]
Post subject:  RE:Flickering Images

Alright so i fixed it but now my title isn't trippy no more.
code:

% Introduction Screen
 
setscreen ("graphics:700;650")
var font1, font2 : int
font1 := Font.New ("Castellar:100")
font2 := Font.New ("Comic Sans MS:18:bold")
Draw.Fill (50,50,7,7)



loop
Font.Draw ("FROGGER", 10, 550, font1, 110)
Font.Draw ("FROGGER", 10, 550, font1, 10)
Font.Draw ("FROGGER", 10, 550, font1, 120)
Font.Draw ("FROGGER", 10, 550, font1, 10)
Font.Draw ("FROGGER", 10, 550, font1, 130)
Font.Draw ("FROGGER", 10, 550, font1, 10)
Font.Draw ("FROGGER", 10, 550, font1, 140)
colorback (black)
color (0)
locatexy (250,500)
put "Welcome to the game of FROGGER"
Font.Draw ("***Rules***", 50, 400, font2, 10)


locatexy (20,350)
put "1. This is a 1 Player Game."
locatexy (20,300)
put "2. You have 3 lives."
locatexy (20,250)
put "3. Get to the water without getting hit by the cars."
locatexy (20,200)
put "4. Use the arrown keys to move around."
locatexy (20,130)
put "Pretty simple right? GOOD LUCK!"

View.Set ("offscreenonly")
Pic.ScreenLoad ("frog.gif", 300, 200, picMerge)
Pic.ScreenLoad ("frog.gif", 300, -50, picMerge)
 View.Update

end loop

Author:  Nick [ Thu Apr 24, 2008 1:23 pm ]
Post subject:  RE:Flickering Images

what Tony weant was, why do you have numbers after the offscreen only? also you can combine them like so

setscreen("nobuttonbar,graphics:500;300")

Author:  I Smell Death [ Fri Apr 25, 2008 10:46 am ]
Post subject:  RE:Flickering Images

the order doesn't matter as long as things that are suposed to be toghether stay together, so

setscreen("nobuttonbar,graphics:500;300")

is the same as saying

setscreen("graphics:500;300,nobuttonbar")

Author:  jinjin [ Sat Apr 26, 2008 7:43 pm ]
Post subject:  Re: RE:Flickering Images

Quote:
Alright so i fixed it but now my title isn't trippy no more.


If you only want a specific area for your screen to be updated (i.e. part other than the space the title occupies), you could always use the View.UpdateArea function. More here:
http://compsci.ca/v3/viewtopic.php?t=12533
(Credits to Clayton for the tutorial)

Author:  Tallguy [ Mon Apr 28, 2008 8:12 am ]
Post subject:  RE:Flickering Images

i guess it all depends wat u want ur title to do, flash colors, then re'write the tiitle over in a different color and loop it, its not that hard


: