Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Fix the code "Stop the flashing"!!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
nate




PostPosted: Tue Apr 08, 2003 7:30 pm   Post subject: Fix the code "Stop the flashing"!!

I have this game, but its not complete the first part before i make badguys which the crosshair you will have to hit. But I am having this problem with the graphics flashing to much. Its givin people seezurs!(can't spell). So if you could fix it or suggest how to fix it that would be great.

** THE TImere is the worst if flashes the most ***
Could u try and rewrite the code to make it not flash! Thnks


Here is my code:
code:

View.Set ("graphics,onscreenonly,nocursor")

var oldtime : int := Time.Sec
var totaltime : int := Time.Sec - oldtime
var score : int := 0
var leveltime : int
var level : int := 1
var crosshairXcord : int := maxx div 2
var crosshairYcord : int := maxy div 2
var button : int := 0

%===============================================================
%Purpose: To have a status bar with time, and score on it      |
%===============================================================
process statusbar

    if level = 1 then
        leveltime := 20
    else
        leveltime := 30
    end if

    loop
        locatexy (560, 390)
        put "Time = ", Time.Sec - oldtime
        exit when Time.Sec - oldtime = leveltime

        locatexy (10, 390)
        put "Level = ", level

        locatexy (250, 380)
        put "Score  =  ", score

        locatexy (0, 360)
        put "================================================================================"
    end loop

end statusbar

%===============================================================
%End Process                                                   |
%===============================================================

%===============================================================
%Purpose: Aimer moved when you move the mouse                  |
%===============================================================

process crosshair
    loop
        Mouse.Where (crosshairXcord, crosshairYcord, button)
        drawline (crosshairXcord, crosshairYcord, crosshairXcord, crosshairYcord + 20, 10)
        drawline (crosshairXcord - 10, crosshairYcord + 10, crosshairXcord + 10, crosshairYcord + 10, 10)
        drawoval (crosshairXcord, crosshairYcord + 10, 10, 10, 10)
        delay (10)
        drawline (crosshairXcord, crosshairYcord, crosshairXcord, crosshairYcord + 20, 255)
        drawline (crosshairXcord - 10, crosshairYcord + 10, crosshairXcord + 10, crosshairYcord + 10, 255)
        drawoval (crosshairXcord, crosshairYcord + 10, 10, 10, 255)
        end loop
    end crosshair
    process bomb
        loop
            if button = 1 then
                const bloodXcord := crosshairXcord
                const bloodYcord := crosshairYcord
                for a : 1 .. 20
                    drawfilloval (bloodXcord, bloodYcord + 10, a, a, red)
                    delay (10)
                end for
                delay (100)
                drawfilloval (bloodXcord, bloodYcord + 10, 30, 30, black)
                cls
            end if

        end loop
    end bomb

    %===============================================================
    %End Process                                                   |
    %===============================================================

        color (white)
    colorback (black)
    cls

    level := 3

    fork statusbar
    fork bomb
    fork crosshair



!!**I WOULD LIKE TO THANK VOID WHO WITHOUT HIS CODE WOULD NOT KNOW HOW TO PUT AN AIMER WHICH IS CONTROLLED BY THE MOUSE MOVEMENT**

Please help me
thaks

-Nate
-------------------------------------------------------------------------------------
Still Tuggin It (even if I am posting stuff on a turing forum) Mr. Green [/b]
Sponsor
Sponsor
Sponsor
sponsor
void




PostPosted: Tue Apr 08, 2003 7:43 pm   Post subject: thanks

thanks...but what you did was not called using the code...its called copying...the only thing that you added was the freakin status bar.....wateva...i dun care....im actualy flattered that someone would coppy my proggrams coz they're pretty $hity.....but yea i'll post the edit lata
haujobb




PostPosted: Tue Apr 08, 2003 7:55 pm   Post subject: (No subject)

I cant find a way, I did how ever find a way to minimize it but it was still pretty bad.

I think in might just be a turing thing...
JayLo




PostPosted: Tue Apr 08, 2003 8:19 pm   Post subject: (No subject)

try using setscreen ("offscreenonly") and View.Update
Prince




PostPosted: Tue Apr 08, 2003 9:06 pm   Post subject: (No subject)

wtf?!?!?! all this does is scroll the status bar up the screen... how am i supposed to shoot that way Confused
Catalyst




PostPosted: Tue Apr 08, 2003 9:09 pm   Post subject: (No subject)

you might want to shy away from forks there messy and slow ur prog down a good amount
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: