Game Development Community

dev|Pro Game Development Curriculum

Torque X CEV General Update

by Giuseppe De Francesco · 11/21/2010 (9:11 pm) · 13 comments

Hey guys,

We’ve been quiet but not idle :) This short post is to make all of you aware of new big news about Torque X. As you all know in the TX I left behind a few things still to be optimized. Among those one was a really ugly one: the reference bins. The bins had the bad habit to grow and grow, not ever being released to the GC. It’s still unclear to me why the GC doesn’t collect them because doing some straight testing I can see that they actually should be collected.
Anyhow, it’s clear to me that we need to completely rewrite the spatial data referencing in a GC friendly way. In the meanwhile we needed a workaround because those reference bins caused a game crash on Xbox on the long run (2 hours of average gameplay) but they will crash a game on Windows Phone 7 within minutes.
So here we are: a new set of commit have been made on the CEV repository so that 3.1.5 (and later on 4.0) users have now a way to keep the beast under control.

You’ll find two new static properties in the class T2DSceneContainer:

T2DSceneContainer. BinCleaning
T2DSceneContainer. BinCleanImmediate
(contributed by Matt Hoesterey)
T2DSceneContainer. BinCleaningEveryHowManyCheckCalls

The first one is a Boolean (false by default) which enables the automatic bins regeneration, the last is the regeneration interval (measured in bins check calls) having a default value of 1000.

If you don’t want to activate the automatic cleaning you can call the method ResetBins() of the concerned T2DSceneContainer instance (as this isn’t a static method) so that you have full control on this or to perform a controlled cleaning on all the active containers you can set BinCleanImmediate true (thanks Matt for this), this will perform the cleaning and will be set back to false.

The reference bins regenerations works fine during the gameplay but on screens based on GUI causes a black screen lasting one frame, so be sure to use this feature only during the actual gameplay.

About the author

In the software eng. field since 1981, in charge of R&D during last 10 years. IEEE Senior Member (and volunteer).


#1
11/21/2010 (9:25 pm)
Just curious, is the engine working in WP at usable speed yet? What are the framerates you are experiencing? Thanks!
#2
11/21/2010 (9:39 pm)
We are still working at the WP7 port so I can't properly answer to that. From where I'm standing I don't see why it shouldn't work. The WP7 framerate is low and fixed by design so that shouldn't really be an issue.
#3
11/22/2010 (12:37 am)
Thanks for the update, great as always.
#4
11/22/2010 (2:40 am)
Thanks for the update. Glad to see this continue!
#5
11/22/2010 (3:20 am)
Awesome work Pino!
#6
11/22/2010 (7:34 am)
I've edited the OP adding a great contribution by Matt Hoesterey.
Enjoy!

@Eric: why on earth should we stop? ;)
#7
11/22/2010 (1:44 pm)
Sorry if I keep asking about the Windows Phone, I know it is not the focus right now. I'm really just curious.
#8
11/22/2010 (2:46 pm)
@Diego

The engine will build for Windows Phone, but it will not run due to the commands used for file access, they need to be converted to use Isolated Storage. Also, due to a lack of XACT on the phone a new sound system needs to be implemented. In addition I need to finish converting the materials, on the 3D side, to use the XNA effects, since custom shaders aren't supported on the phone. There may be some some other issues, but these are the main ones, I'm aware of.
#9
12/05/2010 (3:23 pm)
Just to verificative my account :)
#10
12/10/2010 (12:56 pm)
How do i join ?
#11
12/10/2010 (9:08 pm)
Hey AlienForce,

just drop me an email ;)
#12
12/11/2010 (12:48 pm)
Done :)
#13
12/20/2010 (7:45 pm)
Hi there, just dropping this here to verify my account.