Need help fixing lag issue.

Talk about making games.

Need help fixing lag issue.

Postby Accumilater » Fri Apr 09, 2010 9:40 pm

Found a lag issue after I added in drop item, and a menu screen. It seems as though the round timer also lags the game. The lag accumulates throughout the game, need help fixing it! Thanks!
Attachments
New Build Prototype.02 Circle Steering.zip
(315.44 KiB) Downloaded 51 times
Accumilater
 
Posts: 2
Joined: Fri Apr 09, 2010 9:37 pm
Score: 0 Give a positive score

Re: Need help fixing lag issue.

Postby DST » Sat Apr 10, 2010 12:42 am

Looking at your file now, i can see some things that would help (i don't know if any of these are causing your lag, but every little bit helps):

1. Don't replace and destroy the text actors - make your fonts white, and then simply change the rgb values of the actor.

2. I wouldn't use separate canvas's unless you have a reason to - you can put all the script in one draw actor of one canvas. Canvas is a slow actor and having multiples isn't generally good.

3. Only use timers when exact times are needed - otherwise, create your own frame timers using a variable, and changing states when that variable reaches a certain value, using a case switch. Timers are a direct reference to the system clock, and lots of them can be bad in certain cases. And they're very difficult to manage once your game gets complex, thus variables are better for timers. (and time timers don't take framerate into account, but variable timers do).
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: Need help fixing lag issue.

Postby krenisis » Sat Apr 10, 2010 2:41 am

I played your game and its pretty cool concept . I like to see you develop it more. I dont have the exp. DST has but when it comes to sprites I use png. and only when I have to I use jpeg. I never used canvas , but for 3D game canvas would be the way to go. If you have the time, use MS paint and draw the sprites and save them as png.
This is a great job keep going!!!
Tutorial Database for all beginners click this link
viewtopic.php?f=4&t=8680
krenisis
 
Posts: 606
Joined: Sat Jul 25, 2009 3:27 pm
Score: 51 Give a positive score

Re: Need help fixing lag issue.

Postby Accumilater » Sat Apr 10, 2010 5:47 am

Alright thanks for the info DST, I'll look into it and see if it clears anything up.
Thanks krenisis, but it is far from done, and hopefully after I get the lag issue away I can progress with it.
Accumilater
 
Posts: 2
Joined: Fri Apr 09, 2010 9:37 pm
Score: 0 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron