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.

Newcomers DBPro Corner / Help with first PONG game- blue screen and speed.

Author
Message
Deadalus
20
Years of Service
User Offline
Joined: 13th Dec 2003
Location: UK
Posted: 13th Dec 2003 15:45
hi, i've made my first game, a simple 2p pong game (based on the code snippet) and i've finished it and added a background to get rid of dbpros blue screen. However when a player scores, i want the game to pause but the WAIT command makes the screen go blue again. For now i have just added code, so when you press space it will start again. (i would prefer the wait though)
Is there anyway i can pause the game with out the blue screen.
Oh, another thing the game runs very fast and i can't work out how to slow it down.
Thanks in advance!
Sly D
22
Years of Service
User Offline
Joined: 15th Oct 2002
Location:
Posted: 13th Dec 2003 18:03 Edited at: 13th Dec 2003 18:04
For speed issues you can always set the sync rate to, lets say, 25 and it will run at 25 frames per second. (syntax : Sync rate 25)
For the blue screen i don't have DBPro on this PC so i can't really tell what it could be,

Hope i helped.

A cute looking koala with a WHAT!? THEY can't use Kalashnikovs, can they?
Deadalus
20
Years of Service
User Offline
Joined: 13th Dec 2003
Location: UK
Posted: 13th Dec 2003 18:21
yes thanks Cyber_Freak, the speed is all sorted now. just the blue screen thats bugging me. any ideas anyone?
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 13th Dec 2003 18:47
Put CLS at the top of the loop.

One of the tutorials has a few solutions fo the blue background issue
http://developer.thegamecreators.com/?f=dbpro_tutorials

For the speed problem the easy way is just to use SYNC RATE.
The harder ways are to base any game movement agaist the timer or fps.
There are proberly examples of how to do this in the codebase http://www.thegamecreators.com/?m=codebase_list and code snipets forum.
Just avoid the "timer based movement for begginers" entry in the codebase as the movement in it isn't timer based.

dbpro : p166mmx @ 233 : 256mb : sb 128pci : sis onboard
Deadalus
20
Years of Service
User Offline
Joined: 13th Dec 2003
Location: UK
Posted: 13th Dec 2003 19:09
Quote: "Put CLS at the top of the loop."

Already done that, the blue screen is gone during the game its just when i use the "WAIT x" command to it goes blue, when the time has run out it goes back normal
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 13th Dec 2003 19:59 Edited at: 13th Dec 2003 20:00
Sorry I just skimmed the code, you have several repeat / until spacekey() loops within the main loop.
for example


You need to put a cls at the top of these loops as well. So the above code should be.



dbpro : p166mmx @ 233 : 256mb : sb 128pci : sis onboard
Sly D
22
Years of Service
User Offline
Joined: 15th Oct 2002
Location:
Posted: 13th Dec 2003 20:04
If the above code does not work try turning the backdrop on : BACKDROP ON is the syntax.

Hope it helps you.

A cute looking koala with a WHAT!? THEY can't use Kalashnikovs, can they?
Deadalus
20
Years of Service
User Offline
Joined: 13th Dec 2003
Location: UK
Posted: 13th Dec 2003 21:03
thanks alot guys! everything is working fine. i'm now working on 1p modes and options. you have all been a great help
Jaze
21
Years of Service
User Offline
Joined: 20th Nov 2003
Location: Connecticut, USA
Posted: 16th Dec 2003 03:08
I'm gonna base a timer based movement code snippet right now.


-=/Jaze/=-

Login to post a reply

Server time is: 2024-11-25 20:24:05
Your offset time is: 2024-11-25 20:24:05