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.

2D All the way! / Score help on first game.

Author
Message
unknown space
19
Years of Service
User Offline
Joined: 14th Mar 2007
Location:
Posted: 14th Mar 2007 07:37
First of all, I using Dark Basic Classic.

Well I am making an odd sort of game that halfway combines Pong and Breakout. I am almost completely finished. I need to fix the scores though. When the 2 balls pass the boundary of the screen. The score is supposed to increase by one. Instead the score increases infinitely.
I am pretty sure all I need to do is put the sprite back in the screen, but so far my attempts have been unsuccessful.

Here is a snippet of what i have so far.
Quisco DaLuse
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: USA
Posted: 15th Mar 2007 00:26
What are you doing with the ball once it goes beyond the boundaries? Unless you reset the spritey1/spritey2 variable to a number that is in bounds (or perhaps bounce the ball back), the program will keep counting it (this assumes you keep moving the ball in the same direction or leave it out of bounds), giving you the infinte score increase. It would help if you had more code listed.

You idiots! You've captured their stunt doubles!

Login to post a reply

Server time is: 2026-07-04 22:44:47
Your offset time is: 2026-07-04 22:44:47