car is a bit jerky when it drives

unclepauly

28-09-2006 17:17:33

my problem is this:

my car drives along quite smoothly, and then every now and again it goes a bit jerky, and jumps forward a little bit. i hope you can understand what i mean. its as if it stops for a fraction of a fraction of a second, and then shoots forward to where it would be if it hadn't have stopped.

my car is based on demo 5, and i have swapped the box.mesh for Stunt Playground's GT.mesh (plus the wheels). i have not scaled anything, they are the original size. i get it to go a decent speed by applying torque directly - so the problem cannot be a loss of torque.

my terrain is a mesh, scaled (40, 0, 40) so it is nice and flat, but wide so i can drive the car in a straight line for a while, to watch for the jerkiness.

i have added a node in the vehicle class, -10 units behind the car node, and i have attached the camera to it, so i have a third person chase camera, again so i can watch for jerkiness as it drives forward.



if anyone knows a reason for this jerkiness, i would really like to know. its annoying.

thank you.

walaber

28-09-2006 17:55:40

it's probably a hickup in the overall framerate of the application... that happened a lot on my laptop in particular, when debugging apps...

can you use a program like fraps to help determine if this is happening?

unclepauly

28-09-2006 18:19:03

i will look into fraps now.

in addition, i am actually on a laptop. and i have just appended the framerate to an overlay and i can see it is 15fps - is this good/bad/average? if is is low, what can i do about it? (dont say buy a PC :wink: )

thanks!

HexiDave

28-09-2006 19:40:20

15 FPS is pretty low for driving - is that in Debug or Release mode? If Release mode, then BUY A PC or a laptop that has a graphics card :D

I personally get mad if my game goes below 60 FPS and yell at my monitor if it gets to 15, so look into some optimizations or better graphics processor.

Can you post what laptop make/model you have?

walaber

28-09-2006 21:10:07

in my case, my laptop had that problem when running 3D apps from battery power. if I plugged in the A/C adaptor, it usually ran much better.

unclepauly

28-09-2006 23:31:25

1 - i am always on AC power 'cos building stuff in VS.NET all day takes its toll on the battery!

2 - i am in debug mode - i didnt realise release mode would be faster, i will try this, thanks.

3 - i can't get a better graphics card because i do not have one! rather, it is an integrated graphics card - a VIA/S3 UniChrome Pro IGP, on an Acer 1362 laptop. i believe i cannot insert a graphics card into my laptop.

4 - what sort of optimizing techniques are you refering to ?

thanks again for your input guys, much appreciated.

HexiDave

28-09-2006 23:55:01

Some people get improvements up to 400-600% speed with Release mode, so it should help.

Unless I'm looking at the wrong info on that laptop, that's actually a pretty good setup - although, you might want to look into more RAM (I was seeing only 256 Megs listed installed - you should have AT LEAST 512, but I recommend 1 Gig for gaming.)

As for optimizations, I don't know how your scene is really set up, but you mentioned terrain - how many polygons are being displayed (should tell you in the bottom-left corner)? I know some people just make a mesh from their terrain data and it's like a wrecking-ball to their graphics card :D

unclepauly

29-09-2006 00:19:25

my RAM is definately 512.

My terrain is a mesh, i exported from FreeWorld3D, and is scaled (4,4,4). the polygon count is between 152052 - 152060, it changes as i drive around. is this high?

HexiDave

29-09-2006 00:25:16

What is that, a 257x257 terrain? That's chewing up extra cycles, probably - try exporting the heightmap instead and loading that with the TerrainSceneManager. There's some info around here somewhere on loading OgreNewt data from heightmap data. That'll give you visual LODs to keep frame-rates up.

unclepauly

29-09-2006 00:41:44

it was exported as 128x128, then i scale it up in code.

i thought it was not possible to attach a colission object to a heightmap? that is why i am using meshes. i actually started with heightmaps and used raycasting to prevent the car from going through the terrain, but attaching a collision object is alot easier and better in my opinion.

are you suggesting i should go back to raycasting?


[edit] i think i know what you mean now, i have just found a few bits and bobs.

thanks for your help [/edit]