massive slowdown - help!

Blitz3D Forums/Blitz3D Programming/massive slowdown - help!

jhocking(Posted 2003) [#1]
I've just started working on something new and I've run into a problem. Download this to see:
www.3darteest.com/test.zip
Use WASDRF to control the camera.

What's happening is that as you rotate the camera and zoom in/out the demo experiences massive slowdowns after a little bit. For me it only takes a couple seconds but I have a relatively old computer so on newer systems it may take longer. Given the nature of the problem I at first assumed I am accidentally creating instances of something every frame but I combed through the code (and there isn't much; like I said, I just started working on this) and couldn't find anything like that.

Do other people experience slowdown when running the demo I posted? If so, any ideas what the problem is?


CyBeRGoth(Posted 2003) [#2]
Just ran it, no slowdown here

specs:

AMD XP2600, 1 Gig Ram, Geforce4 Ti4200, Windows XP

[EDIT]

when i turn on waitforvertblank i get slowdown, id do it like this:

;main game loop
While Not KeyHit(1)

;counter for time between frames
currentframetime=MilliSecs()
frametime=currentframetime-lastframetime
avgframetime=(avgframetime*4.0 + Float(frametime))/5.0
frametime=avgframetime
lastframetime=currentframetime

;update the game and draw the next frame
UpdateGame()
; If waitForVerticalBlank=1 VWait <-- take this line out
Flip(waitForVerticalBlank)
Wend


jhocking(Posted 2003) [#3]
Among the possibilities I am considering is that the slowdown is simply my hardware. I'm going to restart my computer and test the demo. In the meantime though I want to make sure there is nothing wrong with my code; experience tells me that 9 times out of 10 any problems are due to errors in the code.


Ziltch(Posted 2003) [#4]
Seems OK on my computer.

It ran at 58fps and did not slow at all.

Code looks OK, too. Is it just this code that runs slow ?


CyBeRGoth(Posted 2003) [#5]
IMO its this line:

If waitForVerticalBlank=1 VWait

thats the problem, just remove it and replace the Flip() that is below it with:

Flip(waitForVerticalBlank)


jhocking(Posted 2003) [#6]
"Is it just this code that runs slow?"

Yeah. I've been running other stuff all day with no problems, but this has been bogged down since the first time I ran it and the code is barely doing anything. It's so weird.


Ross C(Posted 2003) [#7]
what are your computer specs?


jhocking(Posted 2003) [#8]
450MHz PIII with 128MB RAM and an ATI Rage Fury Pro
running Win2000

I'm still getting the slowdown/lag even after shutting my computer off for the night. I'm starting to get suspicious that I picked up some spyware which is eating up my CPU.


Ross C(Posted 2003) [#9]
hey joe, try this

http://download.com.com/3000-2144-10045910.html


big10p(Posted 2003) [#10]
I get constant 83 FPS.

850MHz Athlon, 128MB RAM, GeForce 256, Win98SE


(tu) ENAY(Posted 2003) [#11]
It'll happen when an object is closely zoomed into the camera. As it does it on my machine as well. The fill rate is full. I've not managed to solve this problem yet either.


jhocking(Posted 2003) [#12]
Actually it happens even when I am zoomed way out. From paying attention to changes in the framerate I've determined that the slowdown happens when I look at the scene from specific angles, in particular straight down. Must be something to do with the architecture of my 3D hardware which prefers rendering from certain angles.