Game Development Community

Particles Disappear after a recompile (Beta 4)

by Garrett Brown · in Torque Game Builder · 05/25/2006 (10:53 am) · 7 replies

I have a problem, and I don't know if it's just me, so I was looking to see if anyone else could reproduce it:

Desc: The particle effects "break" after you compile the source code and replace the .exe that is zipped with the download with the one created from the compile. By break, I mean that in the TGB interface, under the particle effects, the initial ones no longer load up, and nothing is displayed. So where you usually can hover the mouse over and see the particles activate, it no longer does this. And with that, there are no particles loading up in my game that I brought over from B3.

How to Reproduce: I compiled Beta 4 under VS 2005. I don't know if it's a problem with just that or any compiler. I had to change line 10 in T2D SDK.rc from
#include "mfc/afxres.h"
to
#include "windows.h"
in order for it to compile (i've done this on every release).

So if anyone can try this and let me know if it breaks for them too, that'd be cool.

About the author

I work at n-Space, located in Orlando, FL as a designer. When I'm not there, I work on side projects, generally using TGB. Side projects I've finished are Oddictive, Klockotock, and AstroDriller3020


#1
05/25/2006 (4:35 pm)
The same thing happened to me, except i'm using Xcode on a Mac. The boxes are all grey and no animation plays when you put your mouse over. you also can't add it to the level building screen either. soo.. sup with dat? ;)


edit: i just tried deleting the compiled version and extracted a new copy, and they still dont work.
#2
05/25/2006 (5:48 pm)
I'm having this same exact problem...

I've used Visual C++ 2005 to compile, but I didn't have to change anything... (it compiled just fine for me)
#3
05/25/2006 (6:18 pm)
John, et al

This is quite embarassing for me. I had addressed this issue before Beta4 and it was fixed in the windows build. However, I forget to check in a code change to t2dParticleEffect that fixed this issue. This explains why subsequent rebuilds of the source and the Mac version exhibit this problem. A fix is provided below for those of you recompiling and this has been checked in for our next release. Please accept my apologies for any inconvenience this may have caused you all!

Resolution

Open up t2dParticleEffect.h and at line 32 add the following

///-----------------------------------------------------------------------------
/// Structures.
///-----------------------------------------------------------------------------
struct tEmitterHandle
{
   SimObjectId     mObjectId;
   SimObject*      mpSceneObject;
};

///-----------------------------------------------------------------------------
/// Types.
///-----------------------------------------------------------------------------
typedef Vector<tEmitterHandle> typeEmitterVector;

then at line 50 change
typeDeleteVector  mParticleEmitterList; ///< Emitter List.
to
[b]typeEmitterVector mParticleEmitterList; ///< Emitter List.[/b]




after that, save the file and open t2dParticleEffect.cc

at line 318 change
tDeleteRequest emitterItem = { pEmitter->getId(), (t2dSceneObject*)pEmitter, true };
to
[b]   tEmitterHandle emitterItem = { pEmitter->getId(), (SimObject*)pEmitter };[/b]



- line 506 change from
typeDeleteVector::iterator fromItr = (mParticleEmitterList.address()+fromIndex);
to
[b]   typeEmitterVector::iterator fromItr = (mParticleEmitterList.address()+fromIndex);[/b]



- line 509 change from
typeDeleteVector::iterator toItr = (mParticleEmitterList.address()+toIndex);
to
[b]   typeEmitterVector::iterator toItr = (mParticleEmitterList.address()+toIndex);[/b]



then save the file and build.

This should resolve that problem.

Cheers,
-Justin
#4
05/26/2006 (6:37 am)
Cool, thank you. This works for me now. Thanks again for the quick solution!
#5
05/26/2006 (7:52 am)
Works for me too, thanks!
#6
05/26/2006 (9:15 am)
Thanks Justin!
#7
05/26/2006 (5:19 pm)
Thank-you for posting this!

I got around to checking this all out on linux & couldn't figure out why I kept getting killed in the shooter demo. After a quick recompile, things look better now.