Computer Science Canada

A-mazing game lol (bad pac man wanna b)

Author:  Crazya [ Thu Mar 08, 2007 9:19 am ]
Post subject:  A-mazing game lol (bad pac man wanna b)

This is my sweeeeet game i made last yr in gr 10. fix and fool with it all u want , but u have to repost it so i can see what you have done!!!

Turing:

% Aaron Hazley
% Amazing pac man
% variables

var name : string
var pac : int
var win, gamewin : int
var keys : array char of boolean % weird variable type needed by Input.KeyDown
var x, y, xSize, ySize : int
var score : int := 0
var r, menu : int
var deltaX, deltaY : int
var count, count1, count2, count3, count4 : int := 0
xSize := 5
ySize := 5
r := 4
x := r + 16
y := maxy div 2 + 185
gamewin := Window.Open ("position:370,370,graphics:640;450,buttonbar,title:A-maze-ing Pac-Man")
colourback (black)
cls
colour (brightgreen)
var timeRunning : int
var startTime : int
% plays music
%process music
    %Music.PlayFileLoop ("M:/ICS3/mariomusic.MID")
%end music
%open : pac, "M:\\ICS3\\A-maze-ing Pac-man.txt", mod, seek, put
%seek : pac, *
%put pac
% menu
%fork music
put "                       Welcome to 'A-maze-ing Pac-man'"
put " "
put "  Please Enter a name with no spaces, after that press enter to go to the menu "
get name:*
cls
put "MENU"
put " "
put "Please select 1, 2 or 3 "
put " "
put "1.  See instructions and what dots are worth"
put " "
put "2.  Start A-maze-ing Pac-Man "
put " "
put "3.  Quit"
put ""
get menu
cls
if menu = 1 then
    % Instructions
    put "                                 Instructions "
    put " "
    put " You have to get to the brightgreen dot at the end of the maze to complete the   game." ..
    put " After getting to the green dot it will show your scores and how many      times you hit what dot." ..
    put " It will also show you how long it took you to complete  the maze in seconds"
    put " "
    put " Arrow keys in the direction you want to go "
    put " "
    put "         Yellow dot, worth 1 score "
    put "         "
    put "         Purple dot, worth 10 score"
    put " "
    put "         Brightblue dot, worth 200 score"
    put " "
    put "         red dot, worth -100 score"
    put " "
    put "         Brightgreen dot, worth 100 score. it is also the finish."
    put " "
    put "         Grey Lines are small teleports "
    put skip
    put "Press 2 to start or 3 to quit."
    get menu
end if
cls
if menu = 2 then
    % all the dots
    Draw.FillOval (30, 385, 1, 1, yellow)
    Draw.FillOval (50, 385, 1, 1, yellow)
    Draw.FillOval (70, 385, 1, 1, yellow)
    Draw.FillOval (90, 385, 1, 1, yellow)
    Draw.FillOval (110, 385, 1, 1, yellow)
    Draw.FillOval (130, 385, 1, 1, yellow)
    Draw.FillOval (150, 385, 1, 1, yellow)
    Draw.FillOval (170, 385, 1, 1, yellow)
    Draw.FillOval (190, 385, 1, 1, yellow)
    Draw.FillOval (200, 385, 1, 1, red)
    Draw.FillOval (110, 385, 1, 1, yellow)
    Draw.FillOval (130, 385, 1, 1, yellow)
    Draw.FillOval (150, 385, 1, 1, yellow)
    Draw.FillOval (170, 385, 1, 1, yellow)
    Draw.FillOval (190, 385, 1, 1, yellow)
    Draw.FillOval (210, 385, 1, 1, yellow)
    Draw.FillOval (230, 385, 1, 1, yellow)
    Draw.FillOval (250, 385, 1, 1, yellow)
    Draw.FillOval (270, 385, 1, 1, yellow)
    Draw.FillOval (290, 385, 1, 1, yellow)
    Draw.FillOval (310, 385, 1, 1, yellow)
    Draw.FillOval (330, 385, 1, 1, yellow)
    Draw.FillOval (350, 385, 1, 1, yellow)
    Draw.FillOval (370, 385, 1, 1, yellow)
    Draw.FillOval (390, 385, 1, 1, yellow)
    Draw.FillOval (400, 385, 1, 1, red)
    Draw.FillOval (410, 385, 1, 1, yellow)
    Draw.FillOval (430, 385, 1, 1, yellow)
    Draw.FillOval (450, 385, 1, 1, yellow)
    Draw.FillOval (470, 385, 1, 1, yellow)
    Draw.FillOval (490, 385, 1, 1, yellow)
    Draw.FillOval (510, 385, 1, 1, yellow)
    Draw.FillOval (530, 385, 1, 1, yellow)
    Draw.FillOval (550, 385, 1, 1, yellow)
    Draw.FillOval (570, 385, 1, 1, yellow)
    Draw.FillOval (590, 385, 1, 1, yellow)
    Draw.FillOval (620, 385, 2, 2, purple)
    Draw.FillOval (620, 365, 1, 1, yellow)
    Draw.FillOval (620, 345, 1, 1, yellow)
    Draw.FillOval (620, 325, 1, 1, yellow)
    Draw.FillOval (620, 305, 1, 1, yellow)
    Draw.FillOval (620, 285, 1, 1, yellow)
    Draw.FillOval (600, 285, 1, 1, yellow)
    Draw.FillOval (580, 285, 1, 1, yellow)
    Draw.FillOval (560, 285, 1, 1, yellow)
    Draw.FillOval (580, 305, 1, 1, yellow)
    Draw.FillOval (580, 325, 1, 1, yellow)
    Draw.FillOval (580, 340, 2, 2, purple)
    Draw.FillOval (560, 340, 1, 1, yellow)
    Draw.FillOval (540, 340, 1, 1, yellow)
    Draw.FillOval (520, 340, 1, 1, yellow)
    Draw.FillOval (500, 340, 1, 1, yellow)
    Draw.FillOval (480, 340, 1, 1, yellow)
    Draw.FillOval (460, 340, 1, 1, yellow)
    Draw.FillOval (440, 340, 1, 1, yellow)
    Draw.FillOval (420, 340, 1, 1, yellow)
    Draw.FillOval (420, 320, 1, 1, yellow)
    Draw.FillOval (420, 300, 1, 1, yellow)
    Draw.FillOval (420, 280, 1, 1, yellow)
    Draw.FillOval (420, 260, 1, 1, yellow)
    Draw.FillOval (420, 240, 1, 1, yellow)
    Draw.FillOval (390, 210, 2, 2, purple)
    Draw.FillOval (340, 190, 1, 1, yellow)
    Draw.FillOval (320, 190, 1, 1, yellow)
    Draw.FillOval (300, 190, 1, 1, yellow)
    Draw.FillOval (280, 190, 1, 1, yellow)
    Draw.FillOval (280, 220, 1, 1, red)
    Draw.FillOval (275, 220, 1, 1, red)
    Draw.FillOval (275, 245, 1, 1, yellow)
    Draw.FillOval (295, 245, 1, 1, yellow)
    Draw.FillOval (315, 245, 1, 1, yellow)
    Draw.FillOval (335, 245, 1, 1, yellow)
    Draw.FillOval (355, 245, 1, 1, yellow)
    Draw.FillOval (370, 260, 1, 1, yellow)
    Draw.FillOval (370, 280, 1, 1, yellow)
    Draw.FillOval (360, 290, 1, 1, yellow)
    Draw.FillOval (360, 300, 1, 1, yellow)
    Draw.FillOval (360, 310, 1, 1, yellow)
    Draw.FillOval (370, 300, 1, 1, red)
    Draw.FillOval (380, 290, 1, 1, yellow)
    Draw.FillOval (380, 300, 1, 1, yellow)
    Draw.FillOval (380, 310, 1, 1, yellow)
    Draw.FillOval (370, 320, 1, 1, yellow)
    Draw.FillOval (370, 340, 1, 1, yellow)
    Draw.FillOval (350, 340, 1, 1, yellow)
    Draw.FillOval (330, 340, 1, 1, yellow)
    Draw.FillOval (310, 340, 1, 1, yellow)
    Draw.FillOval (290, 340, 1, 1, yellow)
    Draw.FillOval (270, 340, 1, 1, yellow)
    Draw.FillOval (270, 320, 1, 1, yellow)
    Draw.FillOval (270, 293, 2, 2, purple)
    Draw.FillOval (250, 293, 1, 1, yellow)
    Draw.FillOval (230, 293, 1, 1, yellow)
    Draw.FillOval (230, 313, 1, 1, yellow)
    Draw.FillOval (230, 333, 1, 1, yellow)
    Draw.FillOval (210, 333, 1, 1, yellow)
    Draw.FillOval (190, 333, 1, 1, yellow)
    Draw.FillOval (170, 333, 1, 1, yellow)
    Draw.FillOval (150, 333, 1, 1, yellow)
    Draw.FillOval (130, 333, 1, 1, yellow)
    Draw.FillOval (110, 333, 1, 1, yellow)
    Draw.FillOval (90, 333, 1, 1, yellow)
    Draw.FillOval (70, 333, 1, 1, yellow)
    Draw.FillOval (50, 333, 1, 1, yellow)
    Draw.FillOval (30, 333, 1, 1, yellow)
    Draw.FillOval (15, 323, 2, 2, purple)
    Draw.FillOval (15, 303, 1, 1, yellow)
    Draw.FillOval (15, 283, 1, 1, yellow)
    Draw.FillOval (15, 263, 1, 1, yellow)
    Draw.FillOval (15, 243, 1, 1, yellow)
    Draw.FillOval (15, 223, 1, 1, yellow)
    Draw.FillOval (15, 203, 1, 1, yellow)
    Draw.FillOval (35, 203, 1, 1, yellow)
    Draw.FillOval (58, 203, 1, 1, yellow)
    Draw.FillOval (58, 223, 1, 1, yellow)
    Draw.FillOval (58, 243, 1, 1, yellow)
    Draw.FillOval (58, 263, 1, 1, yellow)
    Draw.FillOval (58, 283, 1, 1, yellow)
    Draw.FillOval (78, 283, 1, 1, yellow)
    Draw.FillOval (98, 283, 1, 1, yellow)
    Draw.FillOval (98, 260, 2, 2, purple)
    Draw.FillOval (98, 240, 1, 1, yellow)
    Draw.FillOval (98, 220, 1, 1, yellow)
    Draw.FillOval (98, 200, 1, 1, yellow)
    Draw.FillOval (118, 200, 1, 1, yellow)
    Draw.FillOval (138, 200, 1, 1, yellow)
    Draw.FillOval (158, 200, 1, 1, yellow)
    Draw.FillOval (170, 200, 2, 2, purple)
    Draw.FillOval (159, 251, 3, 3, brightblue)
    Draw.FillOval (130, 243, 1, 1, red)
    Draw.FillOval (130, 223, 1, 1, red)
    Draw.FillOval (150, 223, 1, 1, red)
    Draw.FillOval (140, 233, 1, 1, red)
    Draw.FillOval (118, 283, 1, 1, yellow)
    Draw.FillOval (138, 283, 1, 1, yellow)
    Draw.FillOval (158, 283, 1, 1, yellow)
    Draw.FillOval (178, 283, 1, 1, yellow)
    Draw.FillOval (188, 263, 2, 2, purple)
    Draw.FillOval (188, 243, 1, 1, yellow)
    Draw.FillOval (188, 223, 1, 1, yellow)
    Draw.FillOval (188, 203, 1, 1, yellow)
    Draw.FillOval (188, 155, 2, 2, purple)
    Draw.FillOval (188, 183, 1, 1, yellow)
    Draw.FillOval (168, 155, 1, 1, yellow)
    Draw.FillOval (148, 155, 1, 1, yellow)
    Draw.FillOval (128, 155, 1, 1, yellow)
    Draw.FillOval (108, 155, 1, 1, yellow)
    Draw.FillOval (88, 155, 1, 1, yellow)
    Draw.FillOval (68, 155, 1, 1, yellow)
    Draw.FillOval (48, 155, 1, 1, yellow)
    Draw.FillOval (18, 155, 2, 2, purple)
    Draw.FillOval (18, 135, 1, 1, yellow)
    Draw.FillOval (18, 115, 1, 1, yellow)
    Draw.FillOval (18, 95, 1, 1, yellow)
    Draw.FillOval (18, 75, 1, 1, yellow)
    Draw.FillOval (18, 55, 1, 1, yellow)
    Draw.FillOval (18, 35, 1, 1, yellow)
    Draw.FillOval (18, 15, 1, 1, yellow)
    Draw.FillOval (38, 15, 1, 1, yellow)
    Draw.FillOval (58, 15, 1, 1, yellow)
    Draw.FillOval (58, 35, 1, 1, yellow)
    Draw.FillOval (58, 55, 1, 1, yellow)
    Draw.FillOval (58, 75, 1, 1, yellow)
    Draw.FillOval (58, 95, 1, 1, yellow)
    Draw.FillOval (80, 110, 2, 2, purple)
    Draw.FillOval (100, 95, 1, 1, yellow)
    Draw.FillOval (100, 75, 1, 1, yellow)
    Draw.FillOval (100, 55, 1, 1, yellow)
    Draw.FillOval (100, 35, 1, 1, yellow)
    Draw.FillOval (100, 15, 1, 1, yellow)
    Draw.FillOval (120, 15, 1, 1, yellow)
    Draw.FillOval (140, 15, 1, 1, yellow)
    Draw.FillOval (140, 35, 1, 1, yellow)
    Draw.FillOval (140, 55, 1, 1, yellow)
    Draw.FillOval (140, 75, 1, 1, yellow)
    Draw.FillOval (140, 95, 1, 1, yellow)
    Draw.FillOval (160, 110, 2, 2, purple)
    Draw.FillOval (180, 95, 1, 1, yellow)
    Draw.FillOval (180, 75, 1, 1, yellow)
    Draw.FillOval (180, 55, 1, 1, yellow)
    Draw.FillOval (180, 35, 1, 1, yellow)
    Draw.FillOval (180, 15, 1, 1, yellow)
    Draw.FillOval (200, 15, 3, 3, brightblue)
    Draw.FillOval (218, 15, 1, 1, yellow)
    Draw.FillOval (218, 35, 1, 1, yellow)
    Draw.FillOval (218, 55, 1, 1, yellow)
    Draw.FillOval (218, 75, 1, 1, yellow)
    Draw.FillOval (218, 95, 1, 1, yellow)
    Draw.FillOval (240, 110, 2, 2, purple)
    Draw.FillOval (260, 95, 1, 1, yellow)
    Draw.FillOval (260, 75, 1, 1, yellow)
    Draw.FillOval (260, 55, 1, 1, yellow)
    Draw.FillOval (260, 35, 1, 1, yellow)
    Draw.FillOval (260, 15, 1, 1, yellow)
    Draw.FillOval (280, 15, 1, 1, yellow)
    Draw.FillOval (300, 15, 1, 1, yellow)
    Draw.FillOval (300, 35, 1, 1, yellow)
    Draw.FillOval (300, 55, 1, 1, yellow)
    Draw.FillOval (300, 75, 1, 1, yellow)
    Draw.FillOval (300, 95, 1, 1, yellow)
    Draw.FillOval (320, 110, 2, 2, purple)
    Draw.FillOval (340, 95, 1, 1, yellow)
    Draw.FillOval (340, 75, 1, 1, yellow)
    Draw.FillOval (340, 55, 1, 1, yellow)
    Draw.FillOval (340, 35, 1, 1, yellow)
    Draw.FillOval (340, 15, 1, 1, yellow)
    Draw.FillOval (360, 15, 1, 1, yellow)
    Draw.FillOval (380, 15, 1, 1, yellow)
    Draw.FillOval (400, 15, 1, 1, yellow)
    Draw.FillOval (420, 15, 1, 1, yellow)
    Draw.FillOval (440, 15, 1, 1, yellow)
    Draw.FillOval (460, 15, 1, 1, yellow)
    Draw.FillOval (480, 15, 1, 1, yellow)
    Draw.FillOval (500, 15, 1, 1, yellow)
    Draw.FillOval (520, 15, 1, 1, yellow)
    Draw.FillOval (540, 15, 1, 1, yellow)
    Draw.FillOval (560, 15, 1, 1, yellow)
    Draw.FillOval (580, 15, 1, 1, yellow)
    Draw.FillOval (600, 15, 1, 1, yellow)
    Draw.FillOval (620, 15, 1, 1, yellow)
    Draw.FillOval (600, 35, 1, 1, yellow)
    Draw.FillOval (620, 55, 1, 1, yellow)
    Draw.FillOval (600, 75, 1, 1, yellow)
    Draw.FillOval (620, 95, 1, 1, yellow)
    Draw.FillOval (600, 115, 1, 1, yellow)
    Draw.FillOval (620, 135, 1, 1, yellow)
    Draw.FillOval (600, 155, 1, 1, yellow)
    Draw.FillOval (620, 175, 1, 1, yellow)
    Draw.FillOval (600, 185, 1, 1, yellow)
    Draw.FillOval (580, 185, 1, 1, yellow)
    Draw.FillOval (560, 185, 1, 1, yellow)
    Draw.FillOval (540, 185, 1, 1, yellow)
    Draw.FillOval (520, 185, 1, 1, yellow)
    Draw.FillOval (500, 185, 1, 1, yellow)
    Draw.FillOval (480, 175, 1, 1, yellow)
    Draw.FillOval (460, 160, 1, 1, yellow)
    Draw.FillOval (440, 145, 1, 1, yellow)
    Draw.FillOval (420, 130, 1, 1, yellow)
    Draw.FillOval (400, 115, 1, 1, yellow)
    Draw.FillOval (380, 100, 1, 1, yellow)
    Draw.FillOval (380, 80, 1, 1, yellow)
    Draw.FillOval (380, 60, 1, 1, yellow)
    Draw.FillOval (400, 60, 1, 1, yellow)
    Draw.FillOval (420, 60, 1, 1, yellow)
    Draw.FillOval (440, 60, 1, 1, yellow)
    Draw.FillOval (460, 60, 1, 1, yellow)
    Draw.FillOval (480, 60, 1, 1, yellow)
    Draw.FillOval (500, 60, 1, 1, yellow)
    Draw.FillOval (520, 60, 1, 1, yellow)
    Draw.FillOval (540, 60, 1, 1, yellow)
    Draw.FillOval (560, 60, 1, 1, yellow)
    Draw.FillOval (560, 80, 1, 1, yellow)
    Draw.FillOval (560, 100, 1, 1, yellow)
    Draw.FillOval (560, 120, 1, 1, yellow)
    Draw.FillOval (560, 140, 1, 1, yellow)
    Draw.FillOval (540, 140, 1, 1, yellow)
    Draw.FillOval (520, 140, 1, 1, yellow)
    Draw.FillOval (500, 140, 1, 1, yellow)
    Draw.FillOval (440, 105, 2, 2, purple)
    Draw.FillOval (230, 270, 1, 1, yellow)
    Draw.FillOval (230, 250, 1, 1, yellow)
    Draw.FillOval (230, 230, 1, 1, yellow)
    Draw.FillOval (230, 210, 1, 1, yellow)
    Draw.FillOval (230, 190, 1, 1, yellow)
    Draw.FillOval (230, 170, 1, 1, yellow)
    Draw.FillOval (230, 150, 1, 1, yellow)
    Draw.FillOval (270, 145, 1, 1, yellow)
    Draw.FillOval (310, 145, 1, 1, yellow)
    Draw.FillOval (350, 145, 1, 1, yellow)
    Draw.FillOval (460, 210, 2, 2, purple)
    Draw.FillOval (460, 240, 2, 2, purple)
    Draw.FillOval (460, 270, 2, 2, purple)
    Draw.FillOval (460, 300, 2, 2, purple)
    Draw.FillOval (480, 300, 2, 2, purple)
    Draw.FillOval (500, 300, 2, 2, purple)
    Draw.FillOval (520, 300, 2, 2, purple)
    Draw.FillOval (535, 300, 2, 2, purple)
    Draw.FillOval (535, 270, 2, 2, purple)
    Draw.FillOval (535, 240, 2, 2, purple)
    startTime := Time.Elapsed
    loop
        timeRunning := Time.Elapsed - startTime    % puts the time from the start of the process and minus' the start of the game process
        % hidden pop up objects
        if timeRunning > 10000 then
            Draw.FillOval (635, 237, 3, 3, brightblue)
        end if
        if timeRunning > 20000 then
            Draw.ThickLine (635, 260, 635, 210, 10, brightwhite)
        end if
        if timeRunning > 2500 then
            Draw.ThickLine (0, 362, 0, 400, 12, brightwhite)
        end if
        if timeRunning > 2000 then
            Draw.FillOval (0, 385, 3, 3, brightblue)
        end if
        View.Set ("offscreenonly")
        Draw.FillOval (x, y, r, r, black)
        % Key input to move the 'pac-man'
        Input.KeyDown (keys)
        if keys (KEY_UP_ARROW) and whatdotcolour (x, y + r + 1) ~= brightred and y < maxy - ySize then
            y := y + 3
        end if
        if keys (KEY_LEFT_ARROW) and whatdotcolour (x - r - 1, y) ~= brightred and x > 0 then
            x := x - 3
        end if
        if keys (KEY_RIGHT_ARROW) and whatdotcolour (x + r + 1, y) ~= brightred and x < maxx - xSize then
            x := x + 3
        end if
        if keys (KEY_DOWN_ARROW) and whatdotcolour (x, y - r - 1) ~= brightred and y > ySize then
            y := y - 3
        end if
        Draw.FillOval (x, y, r, r, black)
        % colour scores and boundries
        if whatdotcolour (x + r + 2, y) = brightgreen then
            cls
            score += 100           
            %Music.PlayFileLoop ("M:/TIK2/1up.MID")
            %Music.PlayFileLoop ("M:/ICS3/finalSMB.MID")
           exit
        end if
        if whatdotcolour (x - r - 2, y) = brightwhite then
            x := y + 240
        end if
        if whatdotcolour (x - r + 2, y) = brightwhite then
            x := x + 1
        end if
        if whatdotcolour (x, y + r + 2) = brightwhite then
            x := y - 2
        end if
        if whatdotcolour (x, y - r - 2) = brightwhite then
            y := y + 1
        end if
        if whatdotcolour (x - r - 2, y) = red then
            score -= 100
            count1 += 1
        end if
        if whatdotcolour (x + r + 2, y) = red then
            score -= 100
            count1 += 1
        end if
        if whatdotcolour (x - r - 2, y) = brightblue then
            score += 200
            count2 += 1         
            end if
        if whatdotcolour (x + r + 2, y) = brightblue then
            score += 200
            count2 += 1
        end if
        if whatdotcolour (x, y + r + 2) = brightblue then
            score += 200
            count3 += 1
        end if
        if whatdotcolour (x, y - r - 2) = brightblue then
            score += 200
            count3 += 1
        end if
        if whatdotcolour (x - r - 2, y) = purple then
            score += 10
            count3 += 1
        end if
        if whatdotcolour (x + r + 2, y) = purple then
            score += 10
            count3 += 1
        end if
        if whatdotcolour (x, y + r + 2) = purple then
            score += 10
            count3 += 1
        end if
        if whatdotcolour (x, y - r - 2) = purple then
            score += 10
            count3 += 1
        end if
        if whatdotcolour (x - r - 2, y) = yellow then
            score += 1
            count4 += 1
        end if
        if whatdotcolour (x + r + 2, y) = yellow then
            score += 1
            count4 += 1
        end if
        if whatdotcolour (x, y + r + 2) = yellow then
            score += 1
            count4 += 1
        end if
        if whatdotcolour (x, y - r - 2) = yellow then
            score += 1
            count4 += 1
        end if
        if whatdotcolour (x + r + 2, y) = brightred then
            score -= 1
            count += 1
        end if
        if whatdotcolour (x - r - 2, y) = brightred then
            score -= 1
            count += 1
        end if
        if whatdotcolour (x, y + r + 2) = brightred then
            score -= 1
            count += 1
        end if
        if whatdotcolour (x, y - r - 2) = brightred then
            score -= 1
            count += 1
        end if
        %inside maze
        Draw.ThickLine (0, 360, 600, 360, 10, brightred)
        Draw.ThickLine (600, 300, 600, 360, 10, brightred)
        Draw.ThickLine (640, 260, 560, 260, 10, brightred)
        Draw.ThickLine (560, 320, 560, 260, 10, brightred)
        Draw.ThickLine (560, 320, 440, 320, 10, brightred)
        Draw.ThickLine (440, 320, 440, 220, 10, brightred)
        Draw.ThickLine (400, 360, 400, 260, 10, brightred)
        Draw.ThickLine (360, 220, 400, 260, 10, brightred)
        Draw.ThickLine (350, 160, 440, 220, 10, brightred)
        Draw.ThickLine (300, 220, 360, 220, 10, brightred)
        Draw.ThickLine (250, 160, 350, 160, 10, brightred)
        Draw.ThickLine (250, 160, 250, 270, 10, brightred)
        Draw.ThickLine (250, 270, 340, 270, 10, brightred)
        Draw.ThickLine (340, 320, 340, 270, 10, brightred)
        Draw.ThickLine (300, 320, 340, 320, 10, brightred)
        Draw.ThickLine (250, 310, 250, 360, 10, brightred)
        Draw.ThickLine (300, 320, 300, 270, 10, brightred)
        Draw.ThickLine (40, 310, 210, 310, 10, brightred)
        Draw.ThickLine (210, 310, 210, 270, 10, brightred)
        Draw.ThickLine (210, 130, 210, 270, 10, brightred)
        Draw.ThickLine (210, 130, 370, 130, 10, brightred)
        Draw.ThickLine (480, 200, 370, 130, 10, brightred)
        Draw.ThickLine (480, 280, 480, 200, 10, brightred)
        Draw.ThickLine (480, 280, 510, 280, 10, brightred)
        Draw.ThickLine (510, 210, 510, 280, 10, brightred)
        Draw.ThickLine (510, 210, 640, 210, 10, brightred)
        Draw.ThickLine (40, 310, 40, 230, 10, brightred)
        Draw.ThickLine (0, 180, 80, 180, 10, brightred)
        Draw.ThickLine (80, 180, 170, 180, 10, brightred)
        Draw.ThickLine (80, 180, 80, 260, 10, brightred)
        Draw.ThickLine (110, 260, 170, 260, 10, brightred)
        Draw.ThickLine (170, 210, 170, 260, 10, brightred)
        Draw.ThickLine (40, 130, 210, 130, 10, brightred)
        Draw.ThickLine (40, 130, 40, 40, 10, brightred)
        Draw.ThickLine (80, 0, 80, 90, 10, brightred)
        Draw.ThickLine (120, 40, 120, 130, 10, brightred)
        Draw.ThickLine (160, 0, 160, 90, 10, brightred)
        Draw.ThickLine (200, 40, 200, 130, 10, brightred)
        Draw.ThickLine (240, 0, 240, 90, 10, brightred)
        Draw.ThickLine (280, 40, 280, 130, 10, brightred)
        Draw.ThickLine (320, 0, 320, 90, 10, brightred)
        Draw.ThickLine (360, 40, 360, 130, 10, brightred)
        Draw.ThickLine (360, 40, 580, 40, 10, brightred)
        Draw.ThickLine (580, 40, 580, 160, 10, brightred)
        Draw.ThickLine (500, 160, 580, 160, 10, brightred)
        Draw.ThickLine (500, 160, 420, 100, 10, brightred)
        Draw.ThickLine (420, 100, 530, 80, 10, brightred)
        Draw.ThickLine (540, 120, 530, 80, 10, brightred)
        Draw.ThickLine (510, 120, 540, 120, 10, brightred)
        Draw.ThickLine (0, 408, 640, 408, 10, brightred)
        Draw.ThickLine (0, 10, 0, 0, 10, brightwhite)
        Draw.ThickLine (286, 122, 286, 119, 10, brightwhite)
        % end circle
        Draw.FillOval (515, 102, 10, 10, brightgreen)
        Draw.FillOval (x, y, r, r, yellow)
        delay (6)
        % score and time at the top of the game ren window
        locate (1, 1)
        put "Score: ", score
        put "Time: ", timeRunning / 1000 : 1 : 1, " seconds "
        View.Update
        View.Update
    end loop   
    end if
 
if menu = 3 then
    quit % you must of hit 3 to quit
end if
% Final page after hit brightgreen

put "                          You made it to the end Congrats"
put " "
put " ",name
put " "
put " Your score is ", score
put " "
put " You hit the wall ", count, " time(s) "
put " "
put " You hit the yellow dot(s) ", count4, " time(s) "
put " "
put " You hit the red dot(s) (ghosts) ", count1, " time(s)"
put " "
put " You hit the purple dot(s) ( fruit( grapes )) ", count3, " time(s)"
put " "
put " You hit the brightblue circle(s) ( bonus spots ) ", count2, " time(s) "
put " "
put " It took you ", timeRunning / 1000 : 1 : 1, " seconds to get to the end"
%put : pac, " "
%put : pac, name
%put : pac, "Your score was ", score, " and your time was ", timeRunning / 1000 : 1 : 1
%close : pac
    %Music.PlayFileStop


Cervantes says: please use code or syntax tags next time.

Author:  splik [ Thu Mar 08, 2007 9:32 am ]
Post subject:  RE:A-mazing game lol (bad pac man wanna b)

pretty cool, but if you stand on the blue circle, you get infinity points

Author:  Pigger [ Mon Apr 23, 2007 5:09 pm ]
Post subject:  RE:A-mazing game lol (bad pac man wanna b)

It was a nice game but it was not a real pac-man game for the following reasons:
1) There were no moving ghosts, I like that you did at least put ghosts in.
2) There was an ending, usually a pac-man only has an ending when you die.

Author:  petree08 [ Sat Apr 28, 2007 8:34 pm ]
Post subject:  RE:A-mazing game lol (bad pac man wanna b)

This game was fun and it does look preaty cool

but i noticed that you drew every dot on it's own
try this

for X : 1 .. 200 by 10
drawfilloval (X, 100, 2 ,2, red)
end for

this draws a row of circles ( 10 pixcels apart)without having to
code them all individually

But if you don't want to code the dots at all you could import a picture into the program (see turing help files)

I look forward to seeing further programs form you! :->

Author:  Geostigma [ Sat Apr 28, 2007 11:29 pm ]
Post subject:  RE:A-mazing game lol (bad pac man wanna b)

E for effort but this game could optimized so much. Not to mention that this is not even Pac Man. I suggest looking into arrays and double arrays to make your balls and drawing your map in paint. No one is going to take this code and change it because its not worth the time and effort to help something that you seem to want to be changed.

petree08 @ Sat Apr 28, 2007 8:34 pm wrote:
This game was fun and it does look preaty cool

but i noticed that you drew every dot on it's own
try this

for X : 1 .. 200 by 10
drawfilloval (X, 100, 2 ,2, red)
end for

this draws a row of circles ( 10 pixcels apart)without having to
code them all individually

But if you don't want to code the dots at all you could import a picture into the program (see turing help files)

I look forward to seeing further programs form you! :->

It would be a good idea for building balls all over the screen, but you need to have all the balls dynamically generate on the map and each ball be a separate variable so it can be switched to a on or off state. This is a better way to do it.

Turing:

% Procedure that initializes the pellets.
% Next the procedure scans the whole level eliminating pellets
% where there is a wall
procedure initpellet
    Pic.Draw (mapID, 0, 0, picCopy)
    for i : 0 .. 29
        for j : 0 .. 29

            pellet (i, j) := 1
        end for
    end for

    for x : xnumber.. ynumber by 1
        for y : xnumber.. ynumberby 1
            %look for a wall and set pellet to 0
            if whatdotcolor (x, y) not= xcolour

                pellet (xnumber,ynumber) := 0
            end if

        end for
    end for


end initpellet

% Procdure that draw all the pellets to the screen

procedure drawpellet
    ispellet := 0
    for i : 1 .. 29
        for j : 1 .. 29

            if pellet (i, j) = 1 then
                drawfilloval (i xnumber, j ynumber, radius, radius, white)
                ispellet := 1
            end if

        end for
    end for

end drawpellet


I'm not just going to hand out the code of the Pac Man I have because you wont learn anything. I also believe you can do the same with a single array.

Turing:

%Draws pellets
for i : 1 .. upper (pellet)
    if whatdotcolor (xpos + 10, ypos + 10) not= black then
        pellet (i) := 1
    else
        pellet (i) := 0

        if pellet (i) = 1 then
            drawfilloval (xpos, ypos, 5, 5, white)
        end if
    end if
    if xpos = maxx - 10 then
        ypos := ypos + 10
        xpos := 0
    end if
end for


Or something around these lines (don't have time to play around with it)


: