Computer Science Canada

Help Me Finish Game Of Pong For School!

Author:  jr20446 [ Mon Jan 21, 2008 6:41 pm ]
Post subject:  Help Me Finish Game Of Pong For School!

ok i need help finishing my game. i need someone to finish mine or make a new 1 but make it not so hard so that i can explain it to my teacher. here's wat i got so far.

% Programmer : Jordan Reed

% Start Date : December 12 1007

% Title of Program : Pong

% Description of Program : A game that 2 people use the keyboard to bounce a ball back and forth
% using pong paddles on the screen until someone scores.The first person to score 10 points is
% the winner.The way you score is to get the ball past your opponents paddle.

%Import the GUI library
import GUI

% Declare global variables
var Player1, Player2 : string
var Player1Controls : array char of boolean
var Player2Controls : array char of boolean
var x1, y1, x2, y2 : int
var pic : int

% Introduction
GUI.SetBackgroundColour (brightblue)
Text.ColourBack (brightblue)
put "WELCOME TO PONG."
put "Player 1, What is your name?"
get Player1 : *
put "Player 2, What is your name?"
get Player2 : *
put ""
put ""
put Player1, " VS ", Player2
delay (2500)
cls

% Set your screen
View.Set ("graphics:600,500,nobuttonbar,title:Jordan Reed's Pong Game!!!")
GUI.SetBackgroundColour (green)

% Controlls For Player 1
Draw.FillBox (0, 10, 20, 75, blue)
x1 := 0
y1 := 0
x2 := 1
y2 := 1
pic := Pic.New (0, 0, 300, 150)
Pic.Draw (pic, 0, 0, picMerge)
loop
Pic.Draw (pic, x1, y1, picCopy)
delay (0)
Pic.Draw (pic, x1, y1, picMerge)
Input.KeyDown (Player1Controls)
if Player1Controls (KEY_UP_ARROW) then
y1 := y1 + y2
end if
if Player1Controls (KEY_DOWN_ARROW) then
y1 := y1 - y2
end if
end loop

%Controlls For Player 2
% Draw.FillBox (0, 0, 0, 0, blue)
% x1 := 0
% y1 := 0
% x2 := 0
% y2 := 0
% pic := Pic.New (0, 0, 0, 0)
% Pic.Draw (pic, 0, 0, picMerge)
% loop
% Pic.Draw (pic, x1, y1, picCopy)
% delay (0)
% Pic.Draw (pic, x1, y1, picMerge)
% Input.KeyDown (Player1Controls)
% if Player1Controls (KEY_UP_ARROW) then
% y1 := y1 + y2
% end if
% if Player1Controls (KEY_DOWN_ARROW) then
% y1 := y1 - y2
% end if
% end loop

Author:  StealthArcher [ Mon Jan 21, 2008 7:12 pm ]
Post subject:  RE:Help Me Finish Game Of Pong For School!

End topic please.

We do not do work for you here, we help and offer advice, but no freebies.

Author:  ericfourfour [ Mon Jan 21, 2008 11:37 pm ]
Post subject:  Re: Help Me Finish Game Of Pong For School!

This assignment is dated: December 12 1007
Time travel exists! WAKE UP SHEEPLE!!!

Author:  CodeMonkey2000 [ Mon Jan 21, 2008 11:39 pm ]
Post subject:  RE:Help Me Finish Game Of Pong For School!

All your time are belong to us!! But seriously, this was due last year. What have you been doing for so long?

Author:  Dan [ Tue Jan 22, 2008 12:13 am ]
Post subject:  RE:Help Me Finish Game Of Pong For School!

LOCKED, as the above mentioned we do not do work for you here.

P.S. CodeMonkey it is a bit more then one year :p

Author:  Clayton [ Tue Jan 22, 2008 4:09 pm ]
Post subject:  RE:Help Me Finish Game Of Pong For School!

Well... technically, it's still due this semester.


: