
-----------------------------------
Zacebdal
Tue Oct 17, 2006 6:49 pm

First program(revised)
-----------------------------------
hey everyone, this is the first program i have really kinda put a little effort into. was wondering if anyone could tell me how to make it stop flickering (instead of drawing over the shapes or cls, i could...). Just try to click on the box:). Thanks.

var x, y, x2, y2, a, b, rx, ry, bcheck, score, xmouse, ymouse, button, count : int := 10
var timer, hper : real := 0.005
var shots : int := 0
setscreen ("graphics,offscreenonly")
count := 0
score := 0
procedure initialize
    if count = 100 then
        count := 0
    end if
    drawbox (9, 9, 631, 391, black)
    mousewhere (xmouse, ymouse, button)
    drawoval (xmouse, ymouse, 30, 30, black)
    drawline (xmouse - 30, ymouse, xmouse + 30, ymouse, black)
    drawline (xmouse, ymouse - 30, xmouse, ymouse + 30, black)
end initialize

procedure ifs
    if button = 1 and bcheck = 1 then
        shots := shots + 1
    end if
    if button = 0 then
        bcheck := 1
    elsif button = 1 then
        bcheck := 0
    end if
    if ymouse >= y - 30 and xmouse >= x - 30 and ymouse = x - 30 and ymouse  i * 20
    end loop
    if timer >= i * 20 then
        locate (15, 15)
        put "GAME OVER"
        exit
    end if
    score := 0
    timer := 0
end for


Any feedback would be greatly appreciated.

-----------------------------------
Cervantes
Tue Oct 17, 2006 7:09 pm


-----------------------------------
Check out [url=http://www.compsci.ca/v2/viewtopic.php?t=12533]View.Update to fix the flickering.
