iT2D 1.4 RC1 (and release and 1.4.1) - particle effects don't load - RESOLVED
by Conor O'Kane · in iTorque 2D · 07/12/2010 (8:49 pm) · 28 replies
Build: 1.4 RC1 and release version and 1.4.1
Platform: iPad
Target: On Device
Xcode version: 3.2.3
iOS sdk: 4.0.1 (also tested with 4.0)
Having transferred my project from iT2D 1.4 Beta 2 to RC1 I get the following error in the console when running on the iPad:
t2dPhysics::loadStream() - Invalid Stream Header ID!
t2dParticleEffect::loadEffect() - Error Loading Effect/Emitter(s)!
t2dParticleEffect::playEffect() - Cannot Play; no emitters!
Interestingly the clone() bug I reported before also had the "t2dPhysics::loadStream() - Invalid Stream Header ID!" error message. Perhaps it's related. www.torquepowered.com/community/forums/viewthread/116219
The particles work fine on the Mac but don't play on the hardware.
-----------------------------------------
Solution:
The level files are getting corrupted. Particle effects are missing this line in the .t2d file:
The editor code needs to be fixed to prevent effectFile links from being wiped.
Also, In t2dSceneObject.cc, comment out the line 10151:
!stream.read( &usesPhysics ) ||
to allow particles to actually play on the hardware.
Platform: iPad
Target: On Device
Xcode version: 3.2.3
iOS sdk: 4.0.1 (also tested with 4.0)
Having transferred my project from iT2D 1.4 Beta 2 to RC1 I get the following error in the console when running on the iPad:
t2dPhysics::loadStream() - Invalid Stream Header ID!
t2dParticleEffect::loadEffect() - Error Loading Effect/Emitter(s)!
t2dParticleEffect::playEffect() - Cannot Play; no emitters!
Interestingly the clone() bug I reported before also had the "t2dPhysics::loadStream() - Invalid Stream Header ID!" error message. Perhaps it's related. www.torquepowered.com/community/forums/viewthread/116219
The particles work fine on the Mac but don't play on the hardware.
-----------------------------------------
Solution:
The level files are getting corrupted. Particle effects are missing this line in the .t2d file:
effectFile = "~/data/particles/effectFileName.eff";
The editor code needs to be fixed to prevent effectFile links from being wiped.
Also, In t2dSceneObject.cc, comment out the line 10151:
!stream.read( &usesPhysics ) ||
to allow particles to actually play on the hardware.
About the author
www.cokane.com
#2
07/28/2010 (3:07 pm)
I couldn't replicate this one with the RC or Release builds. Are you cloning the effects?
#3
I'll have to try a test with a fresh scene - perhaps it's something unique to my game.
07/28/2010 (3:19 pm)
Nope, I'm creating them with the editor and they're left in the level. They all worked fine in iT2D 1.4 beta 2 but stopped working in RC1.I'll have to try a test with a fresh scene - perhaps it's something unique to my game.
#4
I have re-tested this with a new game and it still doesn't work. There is nothing in the scene except 1 particle effect with 1 image map.
I'm using Xcode 3.2.3
iOS SDK 4.0.1 (although I also tested with 4.0)
Torque RC1
Building to iPad with iOS 3.2
The particle effect is not visible and I get the following error message in the console:
t2dPhysics::loadStream() - Invalid Stream Header ID!
t2dParticleEffect::loadEffect() - Error Loading Effect/Emitter(s)!
t2dParticleEffect::playEffect() - Cannot Play; no emitters!
I've uploaded a copy of the project here:
dl.dropbox.com/u/7806926/Particle_test.zip
07/30/2010 (5:16 am)
Scott - thanks for testing this, can you please confirm your build settings?I have re-tested this with a new game and it still doesn't work. There is nothing in the scene except 1 particle effect with 1 image map.
I'm using Xcode 3.2.3
iOS SDK 4.0.1 (although I also tested with 4.0)
Torque RC1
Building to iPad with iOS 3.2
The particle effect is not visible and I get the following error message in the console:
t2dPhysics::loadStream() - Invalid Stream Header ID!
t2dParticleEffect::loadEffect() - Error Loading Effect/Emitter(s)!
t2dParticleEffect::playEffect() - Cannot Play; no emitters!
I've uploaded a copy of the project here:
dl.dropbox.com/u/7806926/Particle_test.zip
#5
07/31/2010 (3:49 pm)
I'am having the same issue, except building to the iphone simulator 4.0
#6
08/01/2010 (11:22 am)
Tested today with iT2D 1.4 (final release version) and the bug is still present. Particles do not appear on the hardware.
#7
Now, I may be completely off on this...but the following is what I discovered:
1. Particles I create in 1.4 on Windows or Mac do work in the latest version.
2. Particles from TGB versions 1.7.4 and lower still work in iT2D 1.4
3. Particles I create from iT2D Beta, 1.3.x, and 1.2 for some reason have trouble loading in 1.4 RC. Sometimes the .eff files corrupt, sometimes they just do not load (header stream error).
There is something going on that is sporadic. I'm not sure if there is a field in the particles that is causing an issue. Sven and I are both of the opinion that particles created in the beta and older versions of iT2D are bugged.
I'm going to download the particle effects you provided to see what I can accomplish. I am already considering implementing a human readable import/export system for particles that resembles the TorqueScript method:
= TorqueScript =
For editing - .cs
For execution - compiled .dso
= Particle Effects =
For editing - .xml
For execution - compiled .eff
I have a few more testing procedures to try out, but I will start with the particles you provided.
08/11/2010 (4:11 pm)
@Conor - OK, so I spent some time the other night trying to reproduce this issue. After a few unorthodox testing and multiple reinstallations, I managed to reproduce it...but in a very isolated instance.Now, I may be completely off on this...but the following is what I discovered:
1. Particles I create in 1.4 on Windows or Mac do work in the latest version.
2. Particles from TGB versions 1.7.4 and lower still work in iT2D 1.4
3. Particles I create from iT2D Beta, 1.3.x, and 1.2 for some reason have trouble loading in 1.4 RC. Sometimes the .eff files corrupt, sometimes they just do not load (header stream error).
There is something going on that is sporadic. I'm not sure if there is a field in the particles that is causing an issue. Sven and I are both of the opinion that particles created in the beta and older versions of iT2D are bugged.
I'm going to download the particle effects you provided to see what I can accomplish. I am already considering implementing a human readable import/export system for particles that resembles the TorqueScript method:
= TorqueScript =
For editing - .cs
For execution - compiled .dso
= Particle Effects =
For editing - .xml
For execution - compiled .eff
I have a few more testing procedures to try out, but I will start with the particles you provided.
#8
08/11/2010 (10:01 pm)
Michael, excellent proposal on the way to handle particles - I'd second this. Is there a "standard" XML grammar for describing particles and effects ?
#9
08/11/2010 (10:30 pm)
@Scott - Nope. No real structure to go by other than the order of the properties as defined in C++ or parsed by the editor. I'll document it as I go. I'll start on this Saturday morning, which gives me time to run some more tests before starting.
#10
08/12/2010 (3:02 am)
Mich - great to hear you're looking in to this. I agree that making the .eff files readable in some way is the place to start, so we can see what's actually different about the non-working ones.
#11
08/30/2010 (4:29 am)
Any progress in this area? I'd really like to be able to capture footage of my game on the hardware but I can't while the particles aren't working (unless I revert my project back to an older version of the engine).
#12
This line is present in levels saved with 1.4 beta 2 and earlier.
08/31/2010 (4:34 am)
I've figured it out. The level files are getting corrupted in 1.4 release. Particle effects are missing this line in the .t2d file:effectFile = "~/data/particles/effectFileName.eff";
This line is present in levels saved with 1.4 beta 2 and earlier.
#13
In t2dSceneObject.cc, comment out the line 10151:
!stream.read( &usesPhysics ) ||
Then the particles are back working. I haven't tried creating new one, but the ones I created in TGB1.7.4 are working fine.
This just worked for me and I haven't seen any problem with my game. So please don't blame me if it causes you any troubles.
08/31/2010 (9:42 am)
Guys,In t2dSceneObject.cc, comment out the line 10151:
!stream.read( &usesPhysics ) ||
Then the particles are back working. I haven't tried creating new one, but the ones I created in TGB1.7.4 are working fine.
This just worked for me and I haven't seen any problem with my game. So please don't blame me if it causes you any troubles.
#14
Fixing the error in the .t2d level files will get particles playing on Mac or Windows, but that line in t2dSceneObject.cc has to be commented out to get particles working on the hardware.
Was this an unannounced optimization requiring that particles have setUsesPhysics(true) in order to work?
09/02/2010 (8:25 am)
Thanks! That has worked nicely.Fixing the error in the .t2d level files will get particles playing on Mac or Windows, but that line in t2dSceneObject.cc has to be commented out to get particles working on the hardware.
Was this an unannounced optimization requiring that particles have setUsesPhysics(true) in order to work?
#15
09/09/2010 (7:38 am)
I really hope this has been logged and will be fixed in the next release. The bug where the level editor saves .t2d files without particle paths means that every change I make to my level wipes all the particles and I have to manually paste all the correct paths back into the file. This does not make for a pleasant testing environment, to say the least.
#16
BTW. this also fix the tileMap issue that older version tileMaps don't work on 1.4
12/01/2010 (7:41 pm)
Just found this post, after ripping every hair out my head in the last few days. Thanks for that.BTW. this also fix the tileMap issue that older version tileMaps don't work on 1.4
#17
01/08/2011 (9:54 pm)
I know it's been a while, but for anyone else who follows this thread I want to comment that this is fixed in 1.4.1. Thanks to everyone for tracing the issue.
#18
Can I suggest a 1.4.1 beta? So people don't go crazy when they can't get it to work which has happened alot in the iTGB lifespan.
01/09/2011 (5:30 am)
the setUsePhysics change that they made in 1.4 messed up alot of things. Wow... one change can do so much. Anyway, I'm glad you guys worked it out and its going to be fixed in 1.4.1 cause it was a big issue... 1.4 should have been pulled a long time ago and leave as beta for some people to use.Can I suggest a 1.4.1 beta? So people don't go crazy when they can't get it to work which has happened alot in the iTGB lifespan.
#19
03/25/2011 (4:26 am)
This does not appear to have been fixed in iT2D 1.4.1 - saving a level still erases all the particle effect file links in the .t2d file, and the !stream.read( &usesPhysics ) ||line in t2dSceneObject.cc is still there.
#20
03/25/2011 (7:07 am)
This did not happen for us once during QA or development. We created multiple particle effects, new projects, old projects. I think the problem is much deeper. I think it has to do with a specific particle graph. Perhaps a graph we did not edit, which you are using.
Conor O'Kane
cokane.com