Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Hello yall, I just made a pacman game!!!!
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
PJ_69




PostPosted: Fri Feb 17, 2006 2:18 pm   Post subject: Hello yall, I just made a pacman game!!!!

DONT BE NOOBS AND STEAL IT!!!!!!!

code:


colourback (green)
cls
var x, y : int := 20                        % x and y of Pacman's centre
var dx, dy, x_temp, y_temp : int                            % direction Pacman moves
dx := 1                                     % Pacman will move to the right
dy := 0                                      % Pacman will not be going up or down
var mouth : int := 0                        % size of mouth
var dir : int := 0                          % mouth direction, 0=right, 90=up, etc.
drawfilloval (100, 100, 5, 5, white)
drawfilloval (200, 200, 5, 5, white)
drawfilloval (300, 300, 5, 5, white)
drawfilloval (190, 150, 5, 5, white)
drawfilloval (290, 199, 5, 5, white)
drawfilloval (389, 500, 5, 5, white)
drawfilloval (209, 340, 5, 5, white)
var box_x1, box_y1, box_x2, box_y2 : int
box_x1 := 300
box_x2 := 320
box_y1 := 0
box_y2 := 175
drawfillbox (box_x1, box_y1, box_x2, box_y2, red)
var box2_x1, box2_y1, box2_x2, box2_y2 : int
box2_x1 := 300
box2_x2 := 320
box2_y1 := 225
box2_y2 := 400
drawfillbox (box2_x1, box2_y1, box2_x2, box2_y2, red)
loop
    mouth := mouth mod 45 + 1               % change size of the mouth
    drawfillarc (x, y, 15, 15, mouth + dir, -mouth + dir, yellow)
    delay (30)
    drawfillarc (x, y, 15, 15, mouth + dir, -mouth + dir, green)
 
    var key : string (1)
    if hasch then
        getch (key)
        if ord (key) = 208 then
            dir := 270
            dx := 0
            dy := -1
        elsif ord (key) = 200 then
            dir := 90
            dx := 0
            dy := 1
        elsif ord (key) = 203 then
            dir := 180
            dx := -1
            dy := 0
        elsif ord (key) = 205 then
            dir := 0
            dx := 1
            dy := 0
        end if
    end if
    x_temp := x + dx
    y_temp := y + dy
    if (x_temp <= 620 and x_temp >= 20 and y_temp >= 20 and y_temp <= 380 and
            (x_temp < (box_x1 - 20) or x_temp > (box_x2 + 20) or y_temp > (box_y2 + 20) or y_temp < (box_y1 - 20)) and
            (x_temp < (box2_x1 - 20) or x_temp > (box2_x2 + 20) or y_temp > (box2_y2 + 20) or y_temp < (box2_y1 - 20))
            ) then
        x := x + dx
        y := y + dy
    end if
end loop
Sponsor
Sponsor
Sponsor
sponsor
Booya




PostPosted: Tue Feb 28, 2006 9:30 pm   Post subject: Pacman game

Nice Pac Man Game but your game if not yet complete. First of all, there are enemys in your game which makes it boring and second of all, sometimes the food gets caught up in between the red line thus the pacman is unable to obtain the food.
Delos




PostPosted: Tue Feb 28, 2006 9:40 pm   Post subject: Re: Hello yall, I just made a pacman game!!!!

PJ_69 wrote:
DONT BE NOOBS AND STEAL IT!!!!!!!


As Andy said in another topic, don't type in ALL CAPS...and you are hardly in a position to be calling others n00bs. Really.
sylvester-27




PostPosted: Thu Mar 02, 2006 12:48 pm   Post subject: (No subject)

Your game doesn't work, at least on my computer. Might wanna fix it. And why would we want to steal it? Most of us can make better games anyway. I got 100% on my final project Very Happy. Go delos!
Dan




PostPosted: Thu Mar 02, 2006 1:48 pm   Post subject: (No subject)

Your code looks oddly like http://www.compsci.ca/v2/viewtopic.php?p=109259

But not eoguht to make me think you compely riped it off. Any how i whould ask you to be more respectfull in the help forums and not call peoleop "NOOBS". Also your sig is qestionalb for a user like your self.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
batman




PostPosted: Thu Mar 02, 2006 8:53 pm   Post subject: Pacman Game

This game is really bad. Theres a lot of errors in the code. The major problem I had when playing it was the food was placed right in between the line in the middle of the screen thus the pacman is unable to get the food. What's up with that?
Shocked
batman




PostPosted: Thu Mar 02, 2006 8:54 pm   Post subject: Pacman Game

And by the way know one would want to steal your code for your pacman game. Its just a relly bad pacman game.
Delos




PostPosted: Thu Mar 02, 2006 9:40 pm   Post subject: (No subject)

Thank you for your comments batman. In future though, unless you have something constructive to critisize about, don't. Saying "It's just a really bad game." isn't helping anyone. It also borderlines on flaming.
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: