Computer Science Canada

Title page problem

Author:  skyler [ Sun Jun 11, 2006 7:42 pm ]
Post subject:  Title page problem

Hi, this is my title page for the game that i have to hand in tomorrow, the problem is that i cant see the writing after the animation ends, and one more thing, is there a solution for the movement of the fonts ?, they r slowing down at the beginning then they move faster.
THANK YOU.

code:

setscreen ("graphics:v256")
setscreen ("graphics:640,480")

var choice:string

%TITLE PAGE                                                       
    %----------
    View.Set ("offscreenonly")
    for x : 0 .. 990 by 2
        %Back color:
        drawfillbox (0, 0, 640, 480, 200)

        var fontbill : int
        fontbill := Font.New ("ESRI Crime Analysis:200")
        Draw.Text ("H", -250 + x, 370, fontbill, green)
        Font.Free (fontbill)

        var fontbill2 : int
        fontbill2 := Font.New ("ESRI Crime Analysis:200")
        Draw.Text ("H", 700 - x, 200, fontbill2, green)
        Font.Free (fontbill2)

        var fontbill3 : int
        fontbill3 := Font.New ("ESRI Crime Analysis:200")
        Draw.Text ("H", -350 + x, 80, fontbill3, green)
        Font.Free (fontbill3)

        %Game title:
        drawfilloval (320, 240, 150, 150, 179)
        drawfilloval (320, 240, 120, 120, 175)
        var font : int
        font := Font.New ("MARKETPRO:30")
        Draw.Text ("Who Wants To Be A", 70, 280, font, 0)
        Draw.Text ("2006", 255, 150, font, 0)
        Font.Free (font)
        var font3 : int
        font3 := Font.New ("MARKETPRO:30")
        Draw.Text ("MILLIONAIRE", 160, 230, font3, 0)
        font3 := Font.New ("ESRI Crime Analysis:80")
        Draw.Text ("J", 40, 10, font3, 0)
        Font.Free (font3)

        %Output two choices
        var font5 : int
        font5 := Font.New ("DESTINE:20")
        Draw.Text ("TO PLAY TYPE START", 150, 50, font5, 0)
        Font.Free (font5)
        var font7777 : int
        font7777 := Font.New ("DESTINE:13")
        Draw.Text ("TO SEE INSTRUCTIONS TYPE INFO", 150, 20, font7777, 0)
        Font.Free (font7777)
        drawfillbox (450, 20, 565, 60, 0)
        drawfillbox (455, 25, 560, 55, 200)
        View.Update

    end for


    %SET UP CONSTRUCT FOR OUTPUT OF CHOICE "START" OR "EXIT".
    %--------------------------------------------------------
    %SET THE PROMPT AT X,Y.
    locatexy (460, 40)
    colorback (200)
    Text.Color (8)   

    get choice : *

    %Clear screen.
    cls

Author:  Delos [ Sun Jun 11, 2006 8:07 pm ]
Post subject: 

You have set your screen to 'offscreenonly', hence for any output to be refreshed, you have to call View.Update. You're missing that at the end.

Author:  TheOneTrueGod [ Sun Jun 11, 2006 8:07 pm ]
Post subject: 

code:

View.Set('nooffscreenonly')


This will turn off the offscreenonly. Read up on the double buffering system that Turing initiates with 'offscreeonly' to find out why it doesn't work without that. [Turing Walkthrough has some info on that]

As far as the speeding up / slowing down goes, it worked fine for me.

Also, you should know that locatexy doesn't actually locate at that specific (x,y) location. It actually finds the closest (column,row) and locates there. Also, I can keep typing even when the cursor extends past the box. You can remedy this by getting rid of the ":*" though this would only allow for one word to be entered (Though in the space you gave, there isn't enough room for quite a few surnames)

Author:  skyler [ Sun Jun 11, 2006 11:31 pm ]
Post subject: 

i didn't understand where to put the View.Update ??????????

Author:  skyler [ Sun Jun 11, 2006 11:33 pm ]
Post subject: 

Never mind my last reply , i got it , and thank you very much for you help


: