Jerkovision!

Blitz3D Forums/Blitz3D Programming/Jerkovision!

Boiled Sweets(Posted 2005) [#1]
Hi,

I'm noticing jerkiness every now and again in my game. I am using render tweening. I just cannot figure out why. Has anyone else had this problem? Are there any particular functions to avoid calling in your game loop?

I've commented out all the 2s stuff like text drawing but that doesn't have any effect. The weird thing is it doesn't do it all the time - it seems pretty random.

I know this is a fairly open question but any help would be greatly appreciated.

Many thanks


IPete2(Posted 2005) [#2]
Boiled,

is the jerkiness happening when some media is loading or is being 'seen' by the camera for the first time?


Boiled Sweets(Posted 2005) [#3]
All media is loaded at the start of the level.

And no I don't think it is first time the camera has seen it either. My scene pretty much contains everything at the start. I understand why you ask about the media loading (there doesn't appear to be any disk access at all) but I don't see where you are going with the first time thing. Why is that?


Shifty Geezer(Posted 2005) [#4]
I'm guessing you're not multitasking something? Is this problem consistent?


Boiled Sweets(Posted 2005) [#5]
Sorry -- what do you mean by multi taksing something exactly? The problem consistantly happens but it different times...


Banshee(Posted 2005) [#6]
I'm noticing jerkiness every now and again in my game

It is most probably a windows background task causing momentary latency. To confirm this call up task manager and close all non-essential tasks.

If this resolves the problem for you, then many of your target users may experience the same problem.

I'm not personally experienced with frame tweening, I use delta timing myself and so I solve this by averaging the delta from the last 5 frames which gives a kind of suspension effect and helps to trick the eye into not noticeing momentary pauses.


Shifty Geezer(Posted 2005) [#7]
By multitasking I mean running a media player in the background or some other application or process. Windows occassionally kicks up and does something in the background which can slow the game down. Nothing you can do about that - it's the way Windows works.

This shouldn't happen too often though. If its a frequent problem and following Becky's advice of using the task manager, you don't find any culprits stealing processing time, it might be something more complicated and wierd. I would place my money on it just being Windows being annoying though.


Bouncer(Posted 2005) [#8]
I noticed that heavy use of copyrecting (rendering to texture) used to cause some jerkiness with render tweening in my game for some reason.


Boiled Sweets(Posted 2005) [#9]
It have reduced the poly count and set relatime calculations that could have been pre-calculated but still the problem persists. I need more camera range to be quite high 1,8400 as I have an object in the very far distance that I need to be seen. Dropping the camera range 'seems' to have a positive effect. Also running an exe as opposed to running in the editor helps but sill I'm not happy.


jfk EO-11110(Posted 2005) [#10]
What OS an DX Version do you use? And wasn't there a problem with Zonealarm? I remember when I had no Router, I had a lot of NEtBIOS Attempt etc. and this had about the described effect. After adding the Router this was fixed (Also the number of hackattacks dropped to a dozen per year or so) I also remember there was some jerkiness problem with MD2 Models?


Boiled Sweets(Posted 2005) [#11]
WinXP PRO SP2 and DX9.0c. I'm not using a software firewall as I have a hardware one. And no MD2 models.
Hmm.


Banshee(Posted 2005) [#12]
Any task could be causing this, really anything could. One common culprit is instant messaging software. The problem is your end users will have this too - so it is up to *you* to fix it in your program.

I do it by adding frame-rate suspension, but I use delta timing, i've no idea how you would go about doing it with frame-tweening.

What you are trying to achieve is not move each frame forward by the exact amount of the duration elapsed, but to smooth the size of the time step out over a number of frames, thus levelling out any bumps in the road.