
-----------------------------------
agent_orange444
Mon Jan 19, 2004 3:55 pm

Simple Frogger Game
-----------------------------------
This is just a simple 1 level frogger game that I made in my spare time. Enjoy!


var x, y, x1, x2, x3, x4, x5, x0, num, col, win, score : int
var chars : array char of boolean

x := 0
y := 0
x0 := 0
x1 := 0
x2 := 0
x3 := 0
x4 := 0
x5 := 0
win := 0
score := 10000

drawfillbox (50, 0, 650, 50, 7)
drawfillbox (0, 351, 50, 400, 7)
drawfillbox (100, 351, 650, 400, 7)
drawfillbox (x, y, x + 50, y + 50, 5)

loop

    if x = 50 and y = 350 then
        win := 1
        exit
    end if

    drawline(0,100,650,100,7)
    drawline(0,150,650,150,7)
    drawline(0,200,650,200,7)
    drawline(0,250,650,250,7)
    drawline(0,300,650,300,7)
    
    Input.KeyDown (chars)
    locate (1, 1)

    if chars (KEY_UP_ARROW) and x = 50 and y = 300 then
        drawfillbox (x, y, x + 50, y + 50, 0)
        y := y + 50
        drawfillbox (x, y, x + 50, y + 50, 5)
        delay (51)

    elsif chars (KEY_UP_ARROW) and y = 50 then
        drawfillbox (x, y, x + 50, y + 50, 0)
        x := x - 50
        drawfillbox (x, y, x + 50, y + 50, 5)
        delay (51)

    elsif chars (KEY_DOWN_ARROW) and x < 50 and y > 0 then
        drawfillbox (x, y, x + 50, y + 50, 0)
        y := y - 50
        drawfillbox (x, y, x + 50, y + 50, 5)
        delay (51)

    elsif chars (KEY_DOWN_ARROW) and y > 50 then
        drawfillbox (x, y, x + 50, y + 50, 0)
        y := y - 50
        drawfillbox (x, y, x + 50, y + 50, 5)
        delay (51)
    end if
    delay (50) 

    randint (num, 0, 6)

    if num = 0 then
        drawfillbox (x0, 50, x0 + 100, 100, 2)
        drawfillbox (x0 - 300, 50, x0 + 100 - 300, 100, 1)
        drawfillbox (x0 - 600, 50, x0 + 100 - 600, 100, 45)
        if x >= x0 - 50 and y >= 50 and x + 50 = 50 and x + 50 = 50 and x + 50 = x1 - 50 and y >= 100 and x + 50 = 100 and x + 50 = 100 and x + 50 = x2 - 50 and y >= 150 and x + 50 = 150 and x + 50 = 150 and x + 50 = x3 - 50 and y >= 200 and x + 50 = 200 and x + 50 = 200 and x + 50 = x4 - 50 and y >= 250 and x + 50 = 250 and x + 50 = 250 and x + 50 = x4 - 50 and y >= 300 and x + 50 = 300 and x + 50 = 300 and x + 50  0 then
        score := score - 1
    end if

end loop

delay (500)
cls

if win = 1 then
    put "You Win! Your Score was: ", score
else
    put "Game Over"
end if


-----------------------------------
poly
Mon Jan 19, 2004 4:47 pm


-----------------------------------
who are we, the white block or the purple block? and how do we move?

-----------------------------------
agent_orange444
Mon Jan 19, 2004 5:31 pm


-----------------------------------
oops... sry.  This was my first post so i forgot to include that kinda info.  You are the purple square in the bottom left corner and must reach the white square at the top by using the arrowkeys.  My record score is 9965, see if you can beat it!  :)

-----------------------------------
sport
Mon Jan 19, 2004 7:14 pm


-----------------------------------
Nice game, but it moves too fast and you get killed if you pop up behind one of the squares. Great start.

-----------------------------------
shorthair
Mon Jan 19, 2004 7:29 pm


-----------------------------------
Wow , how long have you been programming , this game would be so cool if you imported a from picture for the player

-----------------------------------
agent_orange444
Wed Jan 21, 2004 4:39 pm


-----------------------------------
well...i've been programming in turing for bout a year.  I was gonna add pic (i actually got some from the net) but then i got lazy and stopped.  I only made the game cause i was watching the scienfield episode bout frogger (did it in 1 night).  Im trying to post an absolutly amazing game that a made few months back, but im having trouble finding the disk it's on.  Don't forget to check it out when i do find though!

-----------------------------------
juniorspank
Wed Jan 21, 2004 10:54 pm


-----------------------------------
It's too easy to run right through the whole thing.  I got a score of 9991.

-----------------------------------
DanShadow
Thu Jan 22, 2004 12:36 am


-----------------------------------
yeah... true. My Score=9990  :D 
Neat game though!
+6 Bits

-----------------------------------
kalin
Thu Jan 22, 2004 8:17 am


-----------------------------------
it is really actually quite easy...i forget my score, but well, yeah

-----------------------------------
this_guy
Thu Jun 10, 2004 7:25 pm


-----------------------------------
i think if u make each "car" a process and fork all of them, den get them to delay randomly before moving, that would make the program easier to rite.
but that would also make it lack a lot.

-----------------------------------
marijuana
Thu Jun 10, 2004 10:58 pm


-----------------------------------
Its a good idea to process and fork for this program. The better way in approaching it though is using the hexadecimal format. Although the link DFP may be invalid or glorped, it creates a second modifier for the constructors. I know you got lazy with the pictures but using the access folder technique, (if you have the red turing guide book refer to chapter 16) where you enable yourself in adding picture files anywhere in your hardrive, and yes this works for animated .gif's too!!! :D Since you made this in one day I say you did a fairly good job. Calculations do need to be made for complexity. Use the switch and sprite techniques for it. Keep up the good work!!!

-----------------------------------
the_short1
Wed Jun 16, 2004 10:05 pm


-----------------------------------
what... tur9ing wont let u use .gifs....

unless u read my tutorial on how to do it manually.... but still cant do it DIRECTLY... 

that post of urs is really consufing :eh:


scienfeild.. hahahahah yea i remember that episode.. it was great!

btw: very good game...
kinda easy... but good...
