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 / ridiculous lag in a game

Author
Message
Jasonorc
16
Years of Service
User Offline
Joined: 29th Apr 2008
Location: Turn around...
Posted: 30th May 2009 12:07
Hi, I've made, with a lot of help, a simple shooting peice.
But, when you are shooting the fps goes to around 9, when it is usually 3 to 4 thousand, can you see where this insane lag comes from?



If you need the template body file I have used in there just say and I'll upload it, though I doubt thats whats causing, just open that up, use a box instead of the enemy, and try shooting, see how bad it lags.

My site: www.skyknight.co.uk
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 30th May 2009 12:41
i know the answer! the problem is the Wait 100 command. The wait command does nothing else than completely pause your game. and by completely i mean CompletelY. it just stops there for 100 milliseconds. so if you remove that, it doesn;t lagg anymore! but then you'll miss your fire delay system! there's a little trick to get one that works without lagging the app.

You place this variable at the end of the list with all the variables: Delay = Timer()

then you change this:



to this:



if you need help ask, but i guess you can work it out :p

*ding ding*
Jasonorc
16
Years of Service
User Offline
Joined: 29th Apr 2008
Location: Turn around...
Posted: 30th May 2009 13:06
Thats brilliant bobbel, I had to change it a little bit so it delays even if the bullet doesn't intersect with an object, but thanks loads, thats just what I needed!

My site: www.skyknight.co.uk
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 30th May 2009 13:08
No point

*ding ding*

Login to post a reply

Server time is: 2024-09-28 06:24:37
Your offset time is: 2024-09-28 06:24:37