Game Development Community

slow framerate with T2DShape3D

by David Horn · in Torque X 2D · 11/03/2009 (8:20 pm) · 8 replies

Hello all,

I've been getting a really bad framerate on my Xbox game and wanted to see if anyone had any suggestions...

I have 2 T2DShape3D on the screen. I tried eliminating my background graphics, but no increase to framerate.

Through testing, I believe I've narrowed it down to the T2DShape3D.

On the PC, when I have 1 T2DShape3D, the framerate is 60. when I have 2 T2DShape3Ds, it's about 34 - 36.

On the Xbox, it's significantly slower. I've just coded the framerate display now and I'm at work, so I can't see what framerate I'm getting on the Xbox until I get home, but my guess is that it's at least half that.

My models are pretty low poly. Is there anything I can do to improve the framerate problems. Because my biggest problem is that since the framerate is so low on Xbox, it's not receiving all of the info from the markers within my animations all the time. Plus it's really hard on the eyes.

Thanks!

#1
11/04/2009 (12:07 am)
What do these Sceneobjects do?

With such a drop in framerate, theres may be something wrong in the logic you've added to them.
#2
11/04/2009 (3:02 am)
David I would check out the simulate fences, try turning it on and off etc. after that I would start looking at all the components that have a ProcessTick and really examine what you are doing in them. A lot of floating point? Creating local variables that exist only in the ProcessTick methods? You also do not say how powerful your PC is. I have an i7 with a gForce 8600 and always get a way higher frame rate than the xbox.
#3
11/04/2009 (4:40 am)
There's no special logic involved. In fact when the T2DSceneObject is off the screen, the logic continues, so I know it's more the rendering than the logic. It's just that when the T2DSceneObject goes off screen or off camera, the framerate doubles.

I've tried all of the settings with the SimulateFences, they don't seem to have an affect.

I'll look at the code again, but I really think it's the way it's being rendered. because none of the code stops when one character is off screen.

And yes I do have a high-end alienware system, but I'm getting 21 fps on the xbox. That seems wrong with just 2 characters and 2D backgrounds. Am I going to get 10 fps when I add a 3rd character?

Also when both characters go off-screen, it jumps to about 200 fps. But again, all of the code is still running for each character.

#4
11/04/2009 (11:49 pm)
Do you mean T2DShape3D? T2DSceneObject is the simple object for 2D and you mention polys.
#5
11/05/2009 (12:01 am)
sorry sorry
yes I mean T2DShape3D
#6
11/09/2009 (6:17 pm)
ok, so I really stripped down the file and optimized it as much as I could so that the character models are as low-poly as possible.

right now, I'm getting just under 30 fps when there are two characters on the screen, 20 when there are 3 and 14-15 when there are 4 characters on the screen at one time.

The 20 is tolerable, but 15 I don't think is. I can't imagine why I can't simply have 4 characters and get 15 frames per second? It's like I'm developing for a 386? And I really don't think it's the code - all of the code continues for each character whether that character is on the screen on not.

Is there anything in the code of the actual T2DShape3D.cs that I could possibly optimize? Or does anyone have any other suggestions?

Thanks
#7
12/12/2009 (12:51 am)
FYI, I've posted a job opp to help with this.
It's definitely essential to have more than 2 T2DShape3D characters at one time for my game. So I'm willing to pay :) Something is drastically slowing it down. Unfortunately not a lot of people are using the T2DShape3D - which I think is a very neat component of torque 2d x, so there hasn't been a lot of experience in it to warrant posts.

Specifically it's the framerate optimization of the T2DShape3D - I believe in the render function, so the source file pro license of TX2D (which i own) would be required.

You can also contact me at dave at homebrewwrestling dot com.

Thanks!
#8
12/12/2009 (4:13 am)
Have emailed you. One thing I'd suggest though is upgrading to the latest version of TX, as that is supposed to give some performance improvements over the previous version. It's worth a shot if you haven't already tried it.