Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ahhh....Classic Pong
#21
I hate dirty communists :evil:
Reply
#22
I "hate" Mac users, whether they're up to no good or not.

Ok that's the end of my rampage through the forums for today.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#23
Code:
TYPE pong
        x AS INTEGER
        y AS INTEGER
        xmot AS INTEGER
        ymot AS INTEGER
        oldx AS INTEGER
        oldy AS INTEGER
        delay AS INTEGER
        score AS INTEGER
END TYPE
DIM human AS pong
DIM ball AS pong
DIM ai AS pong
SCREEN 7, 0, 1, 0
delay = 1
human.x = 312: human.y = 85
ai.x = 0: ai.y = 85
ball.x = 150: ball.y = 100
ball.xmot = 1: ball.ymot = 1
LOCATE 13, 18: PRINT "PONG"
LOCATE 14, 13: PRINT "DIFFICULTY (1-4)"
PCOPY 1, 0
2 :
press$ = INKEY$
IF press$ = "1" THEN delay = 10
IF press$ = "2" THEN delay = 9
IF press$ = "3" THEN delay = 8
IF press$ = "4" THEN delay = 7
IF press$ = "" THEN GOTO 2
3 :
RANDOMIZE TIMER
ball.ymot = (INT(RND * 5)) - 3
IF ball.ymot = 0 THEN ball.ymot = ball.ymot - 1
ball.x = 150: ball.y = 100
human.x = 312: human.y = 85
ai.x = 0: ai.y = 85
LOCATE 1, 10: PRINT ai.score
LOCATE 1, 30: PRINT human.score
PCOPY 1, 0
IF human.score = 11 THEN
LOCATE 13, 8: PRINT "LOSE"
LOCATE 13, 29: PRINT "WIN"
PCOPY 1, 0
SLEEP
END
END IF
IF ai.score = 11 THEN
LOCATE 13, 28: PRINT "LOSE"
LOCATE 13, 9: PRINT "WIN"
PCOPY 1, 0
SLEEP
END
END IF
IF human.score <> 0 OR ai.score <> 0 THEN SLEEP
DO UNTIL press$ = CHR$(27)
LINE (0, 0)-(320, 200), 0, BF
CIRCLE (ball.x, ball.y), 7
PAINT (ball.x, ball.y), 15, 15
LINE (human.x, human.y)-(human.x + 7, human.y + 30), 15, BF
LINE (ai.x, ai.y)-(ai.x + 7, ai.y + 30), 15, BF
LOCATE 1, 10: PRINT ai.score
LOCATE 1, 30: PRINT human.score
PCOPY 1, 0
IF ball.x >= 312 THEN ball.xmot = -1
IF ball.y >= 192 THEN ball.ymot = -1
IF ball.x <= 7 THEN ball.xmot = 1
IF ball.y <= 7 THEN ball.ymot = 1
ball.oldx = ball.x: ball.oldy = ball.y
ball.x = ball.x + ball.xmot
ball.y = ball.y + ball.ymot
press$ = INKEY$
IF press$ = CHR$(0) + CHR$(72) AND human.y > 6 THEN human.y = human.y - 15
IF press$ = CHR$(0) + CHR$(80) AND human.y < 185 THEN human.y = human.y + 15
IF ai.delay = delay THEN
ai.delay = 0
IF ai.y + 26 < ball.y THEN ai.y = ai.y + 7
IF ai.y > ball.y THEN ai.y = ai.y - 7
ELSE
ai.delay = ai.delay + 1
END IF
IF ball.x = 14 THEN
IF ball.y >= ai.y - 6 AND ball.y <= ai.y + 36 THEN
PLAY "N20 L64"
ball.xmot = 1
GOTO 1
ELSE
human.score = human.score + 1
ball.xmot = -1
GOTO 3
END IF
END IF
IF ball.x = 306 THEN
IF ball.y >= human.y - 7 AND ball.y <= human.y + 37 THEN
PLAY "N20 L64"
ball.xmot = -1
GOTO 1
ELSE
ai.score = ai.score + 1
ball.xmot = 1
GOTO 3
END IF
END IF
1 :
LOOP
have some source. Lots of source.
Reply
#24
Quote:I hate dirty communists :evil:

Please could you explain me WHY? (do you even know what "communist" mean?)

I think you are still living in the 60's... Now the cold war's over.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#25
Well, I was talking about Stalin-like communism. Marxism might be a good idea, but I'm too much of a greedy bastard Tongue
am an asshole. Get used to it.
Reply
#26
I once made a two-player Pong game...Maybe I'll post it someday.
Hehe, I remember I couldn't figure out how to detect collision. Come to think of it, I still have trouble with that topic :-?
The big problem with the Pong game was that I never bothered with detecting multiple keypresses. So only one player could move at a time.

You hate Mac users? I HATE MACS! :evil:
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#27
i personally dont see anything WRONG with communisim, its the ruler that usually bugs me FOR THE PEOPLE!...........sorry.........any who, I HATE MACS.
Code:
Mech1031$ = "happy"
Mac$="bad"
do
mech1031$ + Mac$
mech1031$ = "VERY ANGRY"
loop until Mac$= "Run over by truck several times"
enough said...
the mind is a beautiful thing, use it and make the world a more beautiful place.
Reply
#28
Peace, man. I live in the 60's too.

But I don't care if you're a communist. It seems like a logical government to me, if it could actually be implemented correctly. (Which doesn't seem likely considering the number of failed tries already.)

And I don't like Macintoshes either. I have bad memories of Apple IIc's... *shudder*
Reply
#29
Actually, the game I was thinking of was semi-classic PC: Pong Kombat... couldn't remember the exact title. There appears to be a new one out, though:

http://www.mk5.org/tabmok99/pk2.html

Basically they take the gameplay of Pong and then throw in all the idiosyncracies of Mortal Kombat (ludicrous backstories, overpowered moves from strange button combos, bad voice acting, etc...)
Reply
#30
Quote:Basically they take the gameplay of Pong and then throw in all the idiosyncracies of Mortal Kombat (ludicrous backstories, overpowered moves from strange button combos, bad voice acting, etc...)

What about the best part of MK... the cool gushing blood everywhere? Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)