Computer Science Canada

Catch the Box Game 2.0 (the new and improved version)

Author:  agent_orange444 [ Thu Jan 22, 2004 4:59 pm ]
Post subject:  Catch the Box Game 2.0 (the new and improved version)

So now i took your suggestions into account, hopefully u will like the revised program more! I made the box get smaller as score increases and also made the box speed up as the score increases (every 50 points). There is also an inner box to show u how large the next sized box will be. It also starts off really slow, for all you noobs out there lol. Just kidding! Hope everyone likes it!

code:

var x, x2, y, y2, mx, my, start, button, num, buttonnumber, score,
    buttonupdown, speed, size, change, maxspeed, minspeed, inc,col,incol,
    butx, buty : int
setscreen ("graphics:vga")
loop
    num := 10
    x2 := 1
    y2 := 1
    start := 1
    score := 0
    %size of the box (defualt = 10)
    size := 30
    %speed the box moves (75-125)
    maxspeed := 300
    minspeed := 375
    inc := 0
    randint (x, 0, 605)
    randint (y, 0, 345)
    randint (col,1,10)
    if col=1 then
    incol:=col+1
    else
    incol:=col-1
    end if
   
    %optional set start location
    %x:=
    %y:=

    loop

        if score = 50 then
        size:=size-5   
        inc := inc + 50
            maxspeed := maxspeed - inc
            minspeed := minspeed - inc

        elsif score = 100 then
        size:=size-5   
        inc := inc + 50
            maxspeed := maxspeed - inc
            minspeed := minspeed - inc

        elsif score = 150 then
        size:=size-5   
        inc := inc + 25
            maxspeed := maxspeed - inc
            minspeed := minspeed - inc

        elsif score = 200 then
        size:=size-5   
        inc := inc + 25
            maxspeed := maxspeed - inc
            minspeed := minspeed - inc

        elsif score = 250 then
        size:=size-5   
        inc := inc + 20
            maxspeed := maxspeed - inc
            minspeed := minspeed - inc

        elsif score = 300 then
        size:=size-5   
        inc := inc + 15
            maxspeed := maxspeed - inc
            minspeed := minspeed - inc
        end if

        randint (change, 1, 10)
        drawline (0, 375, 625, 375, 7)
        randint (speed, maxspeed, minspeed)

        if num = 10 then
            randint (x2, -1, 1)
            randint (y2, -1, 1)
        end if

        drawfillbox (x, y, x + size, y + size, col)
        drawfillbox (x, y, x + size-5, y + size-5, incol)
        delay (speed)

        if start = 1 then
            put "Click to Start - keep your mouse in the box"
            buttonwait ("down", butx, buty, buttonnumber, buttonupdown)
            start := start + 1
        end if

        drawfillbox (x, y, x + size, y + size, 0)
        num := num + change

        if num > 20 then
            num := 0
        end if

        x := x + x2
        y := y + y2

        if x = 0 then
            x := x + 1
        elsif x >= x+size then
            x := x - 1
        end if

        if y = 0 then
            y := y + 1
        elsif y >= y+size then
            y := y - 1
        end if

        mousewhere (mx, my, button)
        if mx > x - 1 and mx < x + size + 1 and my > y - 1 and my < y + size
                + 1 then
            score := score + 1
            locate (1, 1)
            put "score= ", score
        else
            cls
            exit
        end if
    end loop
    put "Game Over - Your Score was: ", score
    buttonwait ("down", butx, buty, buttonnumber, buttonupdown)
    cls
end loop


Author:  shorthair [ Thu Jan 22, 2004 5:02 pm ]
Post subject: 

Round of applause , i told orange to trythis only 10 minues ago , and look hes done it again , EVERYONE GIVE HIM A ROUND OF APPLAUSE
Claping

Author:  agent_orange444 [ Thu Jan 22, 2004 5:03 pm ]
Post subject: 

LOL thnx! I guess u can probably tell though that I have no life! lol

Author:  shorthair [ Thu Jan 22, 2004 5:04 pm ]
Post subject: 

You mena i can probably tell that you belong here

Author:  kalin [ Thu Jan 22, 2004 5:05 pm ]
Post subject: 

I like it!! my score was 271 with it startig slower!

Author:  shorthair [ Thu Jan 22, 2004 5:17 pm ]
Post subject: 

CHETA , i got 130

Author:  agent_orange444 [ Thu Jan 22, 2004 5:19 pm ]
Post subject: 

hey can u ppl tell me how u aquire bits?

Author:  kalin [ Thu Jan 22, 2004 5:20 pm ]
Post subject: 

color=darkblue]I did not cheat! I got 230 on the other one, and plus, ever heard of sheer determination????????? I have that in abundance. Want some???[/color]

Author:  shorthair [ Thu Jan 22, 2004 5:20 pm ]
Post subject: 

people give them to you for good programs , and you get 2 for a post and 1 for a thread

Author:  agent_orange444 [ Thu Jan 22, 2004 5:22 pm ]
Post subject: 

First, what's a post and a thread, and second how the heck did u get a picture with your name, does it have to come from the web? (sry im a noob)

Author:  kalin [ Thu Jan 22, 2004 5:23 pm ]
Post subject: 

Picture? click on profile up at the top and scroll down. It will say something about avatars.

A thread, you started one to get this up. A post is what this is. AKA a reply. Umm.... I dont htink there is anything else I can help with

Author:  shorthair [ Thu Jan 22, 2004 5:24 pm ]
Post subject: 

The avatars <--- picture under name , have to come from the net , no bigger that 100 x 100 <-- im cheating Crying or Very sad , and a post is what you just did , its wher eyou reply to somthing , of sned a message in the forum , a thread is what you posted your program in , a thread is a subtopic of a foruim like

Source Code / Box Game ( Box Game being the thread )

Author:  kalin [ Thu Jan 22, 2004 5:29 pm ]
Post subject: 

didnt I just say that??? Laughing anyway, there ya have it. Any other questions? I'm sure they could be answered (dont ask me about programming though...I suck. The best I've done is my weird thing, and even that was copying demos.....]

Author:  agent_orange444 [ Thu Jan 22, 2004 5:33 pm ]
Post subject: 

yeah i got another question. Where the heck do u find any decent pics that are under 6k and 100 by 100???

Author:  shorthair [ Thu Jan 22, 2004 5:40 pm ]
Post subject: 

Twisted Evil " YOU DONT " Twisted Evil , jsut find a decent sized one , and no one will complsin ( unless there is a definitive problem)

Author:  agent_orange444 [ Thu Jan 22, 2004 5:58 pm ]
Post subject: 

thnx for all your comments and help. I finally got it all figured out now. Oh... and im sry for shouting.

Author:  JayLo [ Thu Jan 22, 2004 6:21 pm ]
Post subject: 

it's not like we could hear you.

Author:  shorthair [ Thu Jan 22, 2004 6:24 pm ]
Post subject: 

i was trying to make him feel bad Twisted Evil , all fun and hames till someone loses an eye of course

Author:  kalin [ Thu Jan 22, 2004 6:26 pm ]
Post subject: 

tha's true. Google images is where I found mine....

Author:  shorthair [ Thu Jan 22, 2004 6:28 pm ]
Post subject: 

Thats where i grabed mine from

Author:  agent_orange444 [ Thu Jan 22, 2004 6:29 pm ]
Post subject: 

Thanks, but i guess u didn't notice i already got my pic.

Author:  kalin [ Thu Jan 22, 2004 6:31 pm ]
Post subject: 

I did, but I read page one and replied before I read page two...ooops. No one said Blondes were smart......lol. Well......I'm not a complete idiot

Author:  jonos [ Mon Jan 26, 2004 11:27 am ]
Post subject: 

if you were talking about the name effects agent orange, you buy them in the shop for an outrageous amount bits.

Author:  sport [ Mon Jan 26, 2004 6:07 pm ]
Post subject: 

It's great and fun for a program done in 10 min.


: