
-----------------------------------
kit-kat-kid
Fri May 07, 2004 12:26 pm

pacman
-----------------------------------
setscreen ("graphics:svga4")
setscreen ("noecho")
setscreen ("graphics:800;600")
var keypress : string (1) := " "
var x : int := 30
var y : int := 30
var a : int := 45
var counter : int := 0
var finish : int := 0



proc Rpac1
    drawfillarc (x, y, 15, 15, 40, 320, 14)
    drawfillarc (x, y, 15, 15, 320, 40, 0)
    delay (30)
    drawfillarc (x, y, 15, 15, 40, 320, 0)
end Rpac1

proc Rpac2
    drawfillarc (x, y, 15, 15, 25, 345, 14)
    drawfillarc (x, y, 15, 15, 345, 25, 0)
    delay (30)
    drawfillarc (x, y, 15, 15, 25, 345, 0)
end Rpac2

proc Rpac3
    drawfillarc (x, y, 15, 15, 10, 350, 14)
    drawfillarc (x, y, 15, 15, 350, 10, 0)
    delay (30)
    drawfillarc (x, y, 15, 15, 10, 350, 0)
end Rpac3

proc Lpac1
    drawfillarc (x, y, 15, 15, 220, 140, 14)
    drawfillarc (x, y, 15, 15, 140, 220, 0)
    delay (30)
    drawfillarc (x, y, 15, 15, 220, 140, 0)
end Lpac1

proc Lpac2
    drawfillarc (x, y, 15, 15, 195, 165, 14)
    drawfillarc (x, y, 15, 15, 165, 195, 0)
    delay (30)
    drawfillarc (x, y, 15, 15, 195, 165, 0)
end Lpac2

proc Lpac3
    drawfillarc (x, y, 15, 15, 190, 170, 14)
    drawfillarc (x, y, 15, 15, 170, 190, 0)
    delay (30)
    drawfillarc (x, y, 15, 15, 190, 170, 0)
end Lpac3

proc Upac1
    drawfillarc (x, y, 15, 15, 130, 50, 14)
    drawfillarc (x, y, 15, 15, 50, 130, 0)
    delay (30)
    drawfillarc (x, y, 15, 15, 130, 50, 0)
end Upac1

proc Upac2
    drawfillarc (x, y, 15, 15, 105, 75, 14)
    drawfillarc (x, y, 15, 15, 75, 105, 0)
    delay (30)
    drawfillarc (x, y, 15, 15, 105, 75, 0)
end Upac2

proc Upac3
    drawfillarc (x, y, 15, 15, 110, 80, 14)
    drawfillarc (x, y, 15, 15, 80, 110, 0)
    delay (30)
    drawfillarc (x, y, 15, 15, 110, 80, 0)
end Upac3

proc Dpac1
    drawfillarc (x, y, 15, 15, 295, 230, 14)
    drawfillarc (x, y, 15, 15, 230, 295, 0)
    delay (30)
    drawfillarc (x, y, 15, 15, 295, 230, 0)
end Dpac1

proc Dpac2
    drawfillarc (x, y, 15, 15, 275, 245, 14)
    drawfillarc (x, y, 15, 15, 245, 275, 0)
    delay (30)
    drawfillarc (x, y, 15, 15, 275, 245, 0)
end Dpac2

proc Dpac3
    drawfillarc (x, y, 15, 15, 270, 290, 14)
    drawfillarc (x, y, 15, 15, 290, 270, 0)
    delay (30)
    drawfillarc (x, y, 15, 15, 270, 290, 0)
end Dpac3


%outside
drawfillbox (15, 10, 805, 600, 1)
drawfillbox (20, 20, 795, 590, 0)

%aliens box
drawfillbox (335, 295, 485, 385, 4)
drawfillbox (345, 305, 475, 375, 0)
drawfillbox (425, 386, 395, 375, 15)


%bottom left
drawfillbox (80, 80, 90, 300, 43)
drawfillbox (80, 290, 270, 300, 43)
drawfillbox (80, 80, 200, 90, 43)

drawfillbox (270, 80, 280, 160, 43)
drawfillbox (280, 160, 160, 150, 43)

drawfillbox (160, 220, 350, 230, 43)
drawfillbox (340, 80, 350, 230, 43)
drawfillbox (340, 80, 480, 90, 43)
drawfillbox (470, 80, 480, 230, 43)
drawfillbox (405, 150, 415, 230, 43)

%bottom left
drawfillbox (550, 80, 560, 230, 43)
drawfillbox (550, 80, 720, 90, 43)
drawfillbox (720, 80, 730, 230, 43)
drawfillbox (730, 230, 550, 220, 43)

drawfillbox (720, 300, 730, 460, 43)
drawfillbox (730, 470, 550, 460, 43)

drawfillbox (650, 300, 660, 400, 43)
drawfillbox (660, 400, 550, 390, 43)
drawfillbox (550, 400, 560, 300, 43)
drawfillbox (550, 300, 660, 310, 43)

drawfillbox (550, 520, 730, 530, 43)

drawfillbox (470, 530, 480, 460, 43)
drawfillbox (480, 460, 340, 450, 43)

drawfillbox (400, 530, 80, 520, 43)
drawfillbox (80, 530, 90, 380, 43)
drawfillbox (80, 380, 270, 390, 43)

drawfillbox (160, 450, 270, 460, 43)



var pacdots : array 1 .. 4, 1 .. 200 of int

for number : 1 .. 13
    pacdots (1, number) := 60 * number - 13
    pacdots (2, number) := 50
    pacdots (3, number) := 1
    pacdots (4, number) := 1
end for

for number2 : 14 .. 26
    pacdots (1, number2) := (60 * (number2 - 13)) - 13
    pacdots (2, number2) := 560
    pacdots (3, number2) := 1
    pacdots (4, number2) := 1
end for

for number3 : 27 .. 35
    pacdots (1, number3) := 47
    pacdots (2, number3) := ((number3 - 26) * 60) - 10
    pacdots (3, number3) := 1
    pacdots (4, number3) := 1
end for

for number4 : 36 .. 44
    pacdots (1, number4) := 768
    pacdots (2, number4) := ((number4 - 35) * 60) - 10
    pacdots (3, number4) := 1
    pacdots (4, number4) := 1
end for

for number5 : 45 .. 52
    pacdots (1, number5) := 520
    pacdots (2, number5) := ((number5 - 44) * 60) + 50
    pacdots (3, number5) := 1
    pacdots (4, number5) := 1
end for

for number6 : 53 .. 56
    pacdots (1, number6) := 300
    pacdots (2, number6) := ((number6 - 52) * 60) + 195
    pacdots (3, number6) := 1
    pacdots (4, number6) := 1
end for

for number7 : 57 .. 59
    pacdots (1, number7) := (number7 - 55) * 60
    pacdots (2, number7) := 255
    pacdots (3, number7) := 1
    pacdots (4, number7) := 1
end for

for number8 : 60 .. 62
    pacdots (1, number8) := (number8 - 54) * 60
    pacdots (2, number8) := 255
    pacdots (3, number8) := 1
    pacdots (4, number8) := 1
end for

for number9 : 63 .. 65
    pacdots (1, number9) := ((number9 - 53) * 60) - 10
    pacdots (2, number9) := 255
    pacdots (3, number9) := 1
    pacdots (4, number9) := 1
end for

for number10 : 66 .. 71
    pacdots (1, number10) := ((number10 - 64) * 60) + 10
    pacdots (2, number10) := 495
    pacdots (3, number10) := 1
    pacdots (4, number10) := 1
end for

for number11 : 72 .. 74
    pacdots (1, number11) := ((number11 - 70) * 60) + 10
    pacdots (2, number11) := 420
    pacdots (3, number11) := 1
    pacdots (4, number11) := 1
end for

for number12 : 75 .. 77
    pacdots (1, number12) := ((number12 - 69) * 60)
    pacdots (2, number12) := 420
    pacdots (3, number12) := 1
    pacdots (4, number12) := 1
end for

for number13 : 78 .. 80
    pacdots (1, number13) := ((number13 - 69) * 60) + 35
    pacdots (2, number13) := 420
    pacdots (3, number13) := 1
    pacdots (4, number13) := 1
end for

for number14 : 81 .. 83
    pacdots (1, number14) := ((number14 - 71) * 60) - 25
    pacdots (2, number14) := 500
    pacdots (3, number14) := 1
end for

for number15 : 84 .. 87
    pacdots (1, number15) := ((number15 - 82) * 60)
    pacdots (2, number15) := 200
    pacdots (3, number15) := 1
end for

for number16 : 88 .. 90
    pacdots (1, number16) := ((number16 - 86) * 60)
    pacdots (2, number16) := 120
    pacdots (3, number16) := 1
end for

for number17 : 91 .. 92
    pacdots (1, number17) := 310
    pacdots (2, number17) := ((number17 - 89) * 60) - 15
    pacdots (3, number17) := 1
end for

for number18 : 93 .. 95
    pacdots (1, number18) := ((number18 - 91) * 60)
    pacdots (2, number18) := 350
    pacdots (3, number18) := 1
end for

for number19 : 96 .. 97
    pacdots (1, number19) := 375
    pacdots (2, number19) := ((number19 - 94) * 60) + 10
    pacdots (3, number19) := 1
end for

for number20 : 98 .. 99
    pacdots (1, number20) := 440
    pacdots (2, number20) := ((number20 - 96) * 60) + 10
    pacdots (3, number20) := 1
end for

for number21 : 100 .. 101
    pacdots (1, number21) := 690
    pacdots (2, number21) := ((number21 - 95) * 60) + 5
    pacdots (3, number21) := 1
end for


for drawing : 1 .. 101
    if pacdots (3, drawing) = 1 then
        drawfilloval (pacdots (1, drawing), (pacdots (2,
            drawing)), 5, 5, 15)
    end if
end for


loop
    if hasch = true then
        getch (keypress)

    end if



    for checking : 1 .. 101
        if pacdots (3, checking) = 1 then
            if x >= pacdots (1, checking) - 15 and x = pacdots (2, checking) - 15
                    and y = 100 and x = 370 and y = 290 and x = 65 and y = 240 and x = 65 and y = 350 and x = 65 and y = 315 and x = 65 and y = 500 and x = 65 and y = 443 and x = 65 and y = 425 and x = 125 and y = 375 and x = 125 and y = 300 and x = 280 and y = 500 and x = 280 and y = 520 and x = 65 and y = 740 and x = 65 and y = 738 and x = 280 and y = 690 and x = 280 and y = 690 and x  420 and y = 675 and x = 280 and y = 516 and x = 280 and y = 500 and x = 430 and y = 440 and x = 430 and y = 50 and y = 50 and x = 100 and y = 50 and x = 120 and y = 140 and x = 170 and y = 140 and x = 190 and y = 140 and x = 242 and y = 140 and x = 260 and y = 65 and x = 310 and y = 65 and x = 350 and y = 65 and x = 405 and y = 65 and x = 420 and y = 130 and x = 475 and y = 130 and x = 490 and y = 65 and x = 550 and y = 65 and x = 420 and y = 320 and x = 475 and y = 320 and x = 400 and y = 320 and x = 270 and y = 320 and x = 50 and y = 320 and x = 100 and y = 320 and x = 50 and y = 535 and x = 240 and y = 535 and x = 270 and y = 535 and x = 410 and y = 535 and x = 430 and y = 535 and x = 480 and y = 535 and x = 495 and y = 535 and x = 550 and y = 535 and x = 210 and x = 70 and y = 135 and x = 140 and y = 135 and x = 200 and y = 280 and x = 270 and y = 280 and x = 370 and y = 280 and x = 430 and y = 130 and x = 430 and y = 310 and x = 430 and y = 410 and x = 490 and y = 520 and x = 500 and y = 740 and x = 510 and y = 520 and x = 460 and y = 55 and y = 240 and x = 240 and y = 380 and x = 120 and y = 380 and x = 240 and y = 430 and x = 270 and y = maxx - 90 and x = 540 and y = 450 and x = maxx - 30 then
        x := maxx - 30
    end if

    if y = maxy - 40 then
        y := maxy - 40
    end if

    if counter = 3 then
        counter := 0
    end if


    exit when finish = 0
end loop



-----------------------------------
Dark-X
Fri May 14, 2004 8:42 am


-----------------------------------
Hey man thats nice BUT.

theres a graphic bug. look at the pic...  :twisted:

-----------------------------------
Ultimus
Sat May 15, 2004 2:59 pm


-----------------------------------
This is GREAT, but... I bet you spent a lot of time setting up all those little x/y limits so that the little dude doesn't devour and go through the walls, but it just isn't nessecary! You could have saved a few hour's time if you simply used color checking - whatdotcolor(x,y) - to see if there is a wall in front of him (color ahead not= background color) and stop him from moving there if that is the case. That way, you'd save time and many many pages of hd space  :D . See this example that I did as an assignment to see what I mean (though it is a bit glitchy).

-----------------------------------
Ultimus
Sat May 15, 2004 3:03 pm


-----------------------------------
By the way, what I mean, Kit Kat, can be found in the procedure called "Advance" in the above example. There, the whatdotcolor functions check to see if the red wall is ahead.

-----------------------------------
Atma Weapon
Sat May 15, 2004 3:19 pm


-----------------------------------
Hey man thats nice BUT.

theres a graphic bug. look at the pic...  :twisted:

That's quite the hungry pac-man!  :D

-----------------------------------
the_short1
Sat May 15, 2004 10:30 pm


-----------------------------------
if code is > 100 lines PLEASE attach the file....



good start... dont have much in the way of sounds / graphicfs.... but i like...

one thing.... i was unable to eat all dots correctly so i didn;t get the beep.... that would be bad if u were keeping track on how many dots were eaten and whatnot for scoreing..
also it was kinda hard to move around i kep runing into walls when i turnsed... maybe have it in increaments of 25 so u can turn easier//


all in all from the PacMasta himself.... c -> c+ not bad..
heres 10 bits +10 BITS! 

-----------------------------------
the_short1
Sun May 16, 2004 10:03 am


-----------------------------------
also.. i noticed u have 3! topics about the exact same program.... maybe change the subject to the first post and put the file in that first post so we dont have 1million topics about the same thing ok...


also.. please attacch the file.!

-----------------------------------
Geminibaby
Wed May 19, 2004 6:35 pm


-----------------------------------
wow... that looks really nice... but it seems tooooo hungry, lolz~

-----------------------------------
@DRI@N
Tue May 25, 2004 5:42 pm


-----------------------------------
Good job, it is quite the program! There was only one problem,  I found I could eat through one of the walls..

-----------------------------------
kit-kat-kid
Wed May 26, 2004 7:48 pm


-----------------------------------
thanks for all the good news about it. its not done yet. ill try to fix any bugs

-----------------------------------
poly
Fri May 28, 2004 9:45 am


-----------------------------------
Chris this is not your own work either!
Your friend gave you the disk with this on it (his buddy wrote it) and now your taking credit for it again.....

-----------------------------------
the_short1
Fri May 28, 2004 2:59 pm


-----------------------------------
is that so...


hmm... ppl here at compsci dont take that kindly...  claiming other pplz work is ur own.....
