Re: DT in BGT
Whre would I put a timer to check how often tick is called? Tick already has a timer, so I'm not sure putting another one there works well. Here's the StartMatch() function. I probably didn't do this correctly, but:
void StartMatch(bool _online_ = true)
{
//Sets starting values for position and Booleans that cover rules.
MustServe = true;
rules.games=0;
rules.serving=true;
m1.load("sounds/power.ogg");
server=1;
rules.serving=true;
user.x=CenterLine+1;
user.y=UserServiceLine;
opponent.x=CenterLine-1;
opponent.y=OpponentServiceLine;
//Load and set volume of the sound for the crowd.
sound ambience;
ambience.load("sounds/ambience.ogg");
ambience.volume = -10;
//Start the clock timer so that the clock actually starts at the beginning of the match.
TRestart(C.time);
//Start the timer for real time so that it corresponds with the clock timer for FPS debugging purposes.
TRestart(RealTime);
//Now initiate the loop:
ambience.play_looped();
while(true)
{
CheckEvents();
wait(5);
}
}
Again, not that huge. Still don't see how it's causing such a big loss of frame rate.
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector