Game Development Community

TorqueX Performance Issues

by Alex Okafor · in Torque X 2D · 08/27/2007 (3:08 pm) · 9 replies

Heya,

TX has been great for productivity so far :). As we're nearing completion of our game (Gunstyle a DBP entry) we're starting to do performance tuning. The more I look into it the more I start to feel TX may be bottlenecking on something. Here's our situation:

- We're targetting 60fps
- We are using TX's scenegraph to power our 2D bone animation system
- each player has 25 sceneobjects (some sprites some just tiny joint linkers)
- We want to support atleast 16 players online at a time.
- this gives us 400 scene objects not including level tiles (which isn't that many tiles)
- using some stopwatch measuring with 16 players I've found TX takes 4-5 milliseconds (ms) to update (this is not including our custom TX components, game logic, or networking code)
- Measuring TX's draw method I find it takes 17-22 ms!

Those numbers are after we fine-tuned a lot of the mounting/rotation code for the bone system (which still is a significant chunk of the update time). I'm running out of ideas on what to optimize. We really don't want to revert back to animate sprite sheets as the number of animations would create a large memory requirement (the main reason we went with a joint system). Are there any TX developers or anyone knowledgeable with the TX source that could provide some insight on what I could possible modify/look into/turn off in the source code to increase the drawing performance of TX? We're barely hitting 30fps right now. Any information would be appreciated, thanks.

- Alex
www.enddream.com

#1
08/28/2007 (3:37 am)
Have you attempted to isolate and time the code at different levels below the draw method to get an idea of where the code is spending that 17-22ms?

Perhaps you could try a profiler or hook into NVPerfHud? Try to find out if you are waiting on the GPU or CPU, and what your memory footprint in both video and system memory looks like.

This would be an interesting case study for those of us working on projects with TorqueX so please do keep us updated on your progress.
#2
08/28/2007 (4:36 pm)
I've been having a lot of performance issues as well (especially on xbox hardware), so I am curious to see what you find out with this. Unforunately I don't have Pro, so I can't play around with much myself :/
#3
08/28/2007 (7:10 pm)
I'll keep this thread updated then over the coming weeks on anything relevant that i find as I dig more into the source.
#4
08/29/2007 (8:34 pm)
JetBrains dotTrace is a great profiling tool, if you're willing to pay for it. That's what we use for Torque X here at the office. We've also got our built-in profiler that will be released with 1.5. Over the past several months we've done quite a bit of optimization to the rendering pipeline. Out of curiosity, what are the specs of the machines you're running this on?
#5
08/29/2007 (8:46 pm)
I imagine you can't disclose when TX 1.5 is being released? I'll look into dotTrace, thank you for the info

desktop1:
P4 3.2Ghz
2GB RAM
ATI 9800xt 256MB
Windows XP Home

desktop2:
P4 3.0GHz
1 GB RAM
Geforce 6800 256MB
Windows XP

laptop1:
Intel Core 2 2.0Ghz
2 GB RAM
Geforce Go 7400 256MB
Windows Vista


I have one mid-end desktop where GS performs reasonbly well on, but i can't recall the exact specs, along with another higher-end laptop. The data from my original post is pretty much the same on the two laptops and the first desktop (haven't gathered any hard data on the others).
#6
08/29/2007 (9:02 pm)
My problems are just with running it on an xbox360. I get around 40-60fps on pc, but only 15-30fps on the xbox. I'll check out that profiler and see what i can find.
#7
08/29/2007 (10:03 pm)
Thomas, maybe you guys could put the hooks in for NVPerfHud for the next release. It's a really nice tool.
#8
08/30/2007 (6:32 am)
If i remember correctly PerfHud requires the creation of a "special" graphics device. I doubt you can do that from XNA.
#9
08/30/2007 (7:22 am)
Quote:I doubt you can do that from XNA

What?!?! XNA can do ANYTHING! including dishes, back massages and world domination with toasters!