Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
BENOJ
18
Years of Service
User Offline
Joined: 17th Mar 2006
Location: UK
Posted: 19th Mar 2006 19:54
hi guys, can someone help me here:
i have made a pong game that keeps the scores of the player or the AI i want to make it so if the player (player1)score reaches 15 then a black screen comes up saying you won, would you like to play again and if yes then it goes to the game, and if the AI( lpayer 2 in the code)gets 15 then it sas you lost and asks if you would like to play again.

i put this code in here:


this doesn\\\\\\\'t work though, it only flashes the writing up for lwess than a scond and the game then freezes looking at the still ball.
any help would be much appreciated,

i also put a copy of the game for download so you can see yourself

Attachments

Login to view attachments
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 19th Mar 2006 22:25
Completely off-topic: why do some people's posts have \\\\\\\\'s in them? Are you doing that on purpose?

Acolyte Entertainment
19
Years of Service
User Offline
Joined: 28th Dec 2004
Location: Oregon, US
Posted: 19th Mar 2006 22:58 Edited at: 19th Mar 2006 22:59
put "waitkey" at the end of your "losing" part

[Edit] wow i just played your game and its SCREWED up it moves way to fast. cant help you here buddy.[/EDIT]

Pheonixx
21
Years of Service
User Offline
Joined: 6th Oct 2003
Location: Columbus, Ohio
Posted: 20th Mar 2006 00:12
If you're not going to use time based modelling, you should SET SYNC RATE 30 (industry minimum) so people with really fast computers can actually see it.

http://ausukusa.breakset.com
BENOJ
18
Years of Service
User Offline
Joined: 17th Mar 2006
Location: UK
Posted: 20th Mar 2006 19:33
lol i just set the sync rate to 30 and had a go, i have a fast pc and omg its soooo slow lol erm... i just dont know what to do, can anyone else think of what to do?
H4ck1d
18
Years of Service
User Offline
Joined: 27th Dec 2005
Location: Yes
Posted: 20th Mar 2006 22:14
To answer your question, you need to turn the backdrop off, as it automatically clears part of the screen. Just type "backdrop off" before printing, make sure to turn it on afterwards if they're going to play again.

There are 10 types of people, those who understand binary and those that don't.
BENOJ
18
Years of Service
User Offline
Joined: 17th Mar 2006
Location: UK
Posted: 21st Mar 2006 20:48
yea thats kindof sorted it, it now displays the words, but it leaves the objects in the background. will it work if i put in a delete objects functiion or something like that?

abit fatal1ty an8 sli mobo, ati raedon 1800 XT, 1.5GB RAM
250GB SATA HDD, AMD Athlon 64 x2 4200 (overclocked further)
zodiac
18
Years of Service
User Offline
Joined: 15th Mar 2006
Location: Arizona
Posted: 23rd Mar 2006 05:36
I made my own original 2d pong game, and it plays just fine, but I have a question on this, because it works great the first time before anyone scores, but then after that, the ball spazzes out and does strange things...

And about making the computer slow down, just put "wait 1" at the bottom of the loop, if that's what you were talking about.

2.4Ghz
512mb ram
256mb DDR video card(ATI Sapphire Radeon 9600)

Login to post a reply

Server time is: 2024-11-27 01:43:33
Your offset time is: 2024-11-27 01:43:33