My game crashes when playing any particle on Xbox 360
by Diego Santos Leao - GameBlox Studio · in Torque X 2D · 01/08/2009 (7:29 pm) · 23 replies
This problem is easy to explain: I have a particle on my game (marked as template), that appears when I kill an enemy ship. The exact moment the particle appears on screen, the game crashes!
I tried four different games I've made with TX2D, all of them freezes when displaying particles, some are able to display 2 or 3 instances of the particles, but then the game freezes. So, I guess it is a common problem... although I can't find any related topics here...
Bellow I'm sending you the code that freezes:
T2DSceneObject explosionTemplate = (T2DSceneObject)TorqueObjectDatabase.Instance.FindObject("Explosion");
T2DSceneObject explosion = (T2DSceneObject)explosionTemplate.Clone();
explosion.Position = this.Position;
TorqueObjectDatabase.Instance.Register(explosion);
I'm just cloning templates here, and then registering them on torqueobjectdatabase, nothing fancy...
I tried four different games I've made with TX2D, all of them freezes when displaying particles, some are able to display 2 or 3 instances of the particles, but then the game freezes. So, I guess it is a common problem... although I can't find any related topics here...
Bellow I'm sending you the code that freezes:
T2DSceneObject explosionTemplate = (T2DSceneObject)TorqueObjectDatabase.Instance.FindObject("Explosion");
T2DSceneObject explosion = (T2DSceneObject)explosionTemplate.Clone();
explosion.Position = this.Position;
TorqueObjectDatabase.Instance.Register(explosion);
I'm just cloning templates here, and then registering them on torqueobjectdatabase, nothing fancy...
About the author
Creative director at Gameblox Interactive, a game studio focused on downloadable games and advergames. www.gameblox.net - contact@gameblox.net.
Torque Owner Diego Santos Leao - GameBlox Studio