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 / Slow computer and text display problem

Author
Message
discostu
20
Years of Service
User Offline
Joined: 30th May 2004
Location:
Posted: 23rd Jul 2007 15:22
Ok this is probably something really stupid, with the code below i have a simple Pong game i used the search button to find the tutorial on it and i'm adapting it to make it better. the problem arises when i try to make it post You win or you lose after 5-0 or 0-5 the computer slows right down and the animations slows to not really sure what i have done wrong so help is appreciated. i have tried leaving out the wait command after the sync not having the sync and all sorts of things



http://seppukuarts.afraid.org
COME ON JOIN UP! PLEASE!
discostu
20
Years of Service
User Offline
Joined: 30th May 2004
Location:
Posted: 23rd Jul 2007 16:19
Ok that codes abit to scrunched up here is another although i cant get this to run at all




http://seppukuarts.afraid.org
COME ON JOIN UP! PLEASE!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 23rd Jul 2007 19:18
You have 2 SYNCs per loop when the text is being displayed. So the animations will be half the speed.

discostu
20
Years of Service
User Offline
Joined: 30th May 2004
Location:
Posted: 23rd Jul 2007 20:14 Edited at: 23rd Jul 2007 20:15
thankyou for that but i now have this problem

function Playagain()
return 0 for no
ExitFUnction 0

endfunction 1

it says it could not determine parameter of 0 for no at line 79

where i have put the section about you win or lose do i have to ask the player if they would like to play again? for this to work also how would i do that? could i just

IF player1score#=5 and player2score#<5
Center Text Screen Width() * 0.5 , Screen Height() * 0.5 ,"YOU WIN!"
wait returnkey()
ENDIF

or am i way off


http://seppukuarts.afraid.org
COME ON JOIN UP! PLEASE!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 23rd Jul 2007 20:25 Edited at: 23rd Jul 2007 20:29
Something like this should work. The syntax of yours did not make sense.



discostu
20
Years of Service
User Offline
Joined: 30th May 2004
Location:
Posted: 23rd Jul 2007 20:38 Edited at: 23rd Jul 2007 20:39
ok here is my code i have put yours in and i think i'm meant to add something somewhere not sure where.
sorry for the questions just not sure what the hell to do atm i have had dbpro for about 2 days. This code returns a error of

"user function Playagain must return a value if used in an expression at line 72"




http://seppukuarts.afraid.org
COME ON JOIN UP! PLEASE!
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 23rd Jul 2007 22:04
How does the program get out of the Do..Loop to call the Playagain() function?

May I suggest that you take a quick look at Tutorial 2 here which covers program layout:

http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10

TDK_Man

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 23rd Jul 2007 23:02 Edited at: 23rd Jul 2007 23:17
This should fix your current issue, but won't replace reading a good tutorial like TDK's.



discostu
20
Years of Service
User Offline
Joined: 30th May 2004
Location:
Posted: 24th Jul 2007 13:26
thanks i will have a look over those tutorials


http://seppukuarts.afraid.org
COME ON JOIN UP! PLEASE!

Login to post a reply

Server time is: 2024-09-27 02:29:24
Your offset time is: 2024-09-27 02:29:24