Game Development Community

Tutorial error with thruster particle effect

by Dave "Jellybit" Freeman · in Torque Game Builder · 04/08/2005 (1:25 am) · 10 replies

I'm not sure if this is an error or what. I follow the tutorial exactly, and I can't get the thruster particle effects to show up. At first, I assumed it was somethign wrong with my code. So I pasted everything exactly how it was in the tutorial into my code. Still didn't work. Then, I decided to load the shooter demo to see how it was supposed to look. That was missing thrusters too! I never took away any files from the shooter demo. I only copied files from it. Everything is there, I double checked. So then, I decided to load the "smallThruster.eff" effect in the particle editor. NOTHING showed up. I don't know if it's a problem with the eff file, the particle editor, or if I messed up the script so badly that it hurt the EXE :). But it doesn't show up in either my tutorial path, OR the untouched shooter demo. That goes for the games, and a direct load of the effect in both particle editors.

EDIT: er... actually... no particles show up in the particle editor, and most actually CRASH T2D now! This is bad. I'm going to try to reinstall it entirely. I don't know what could have gone wrong. I've ONLY edited the client.cs for the shooter tutorial. It shouldn't screw everything up like this... should it?

#1
04/08/2005 (1:28 am)
Did you copy files anywhere? The tutorials relies on everything withing \example\ and what you are told to copy to \T2D\. Spacescroller relies on everything withing \example\ and \spacescroller\

Everything worked fine for me, on a Win download, and I have heard of noone else having probs. What OS are you on? Are scripts being exexuted properly (ie. you didn't change the default 'mod' directory)? etc?
#2
04/08/2005 (1:30 am)
Sorry, I just edited the post above. And as I said before, I copied all of the files. Not moved, nothing fancy. It exists in the path that the code looks for. I've matched everything up. T2D is just screwed up now in general. It does the "ship break apart" particle effect though. Just no fire to be seen anywhere, and particle effects loaded in the editor CRASH T2D.
#3
04/08/2005 (1:33 am)
The standalone shooter demo does particle effects fine. It's just my installed engine (including the shooter demo that installs with it) that can't do particle effects anymore... This is weird.
#4
04/08/2005 (1:36 am)
It just got freakier. I did a fresh install of T2D. It does particle effects fine. So I copied that shooterdemo folder to my old install shooterdemo folder. The old install STILL REFUSED to show particle effects in the demo! This MUST be a bug.
#5
04/08/2005 (1:37 am)
UPDATE: Ok, I just did a THIRD install. It did the same thing! It broke particle effects for T2D! Should my little ol' client.cs BREAK particle effects permanently for an install of T2D? Again, this MUST be a bug. Here's the script for you to try out for yourself.

http://www.humanahaba.com/t2d/client.cs

Try it yourself! Here are the steps to reproduce, with the assumption that you installed to the root of C.


1. Install Torque 2D.
2. From the "C:\Torque 2D\SDK\example\spacescroller\client" folder, copy the following folders to the "C:\Torque 2D\SDK\example\T2D\client" folder:

effects
images
maps
sounds

3. in the "C:\Torque 2D\SDK\example\" folder, run "RunShooterDemo.bat" to confirm that it runs correctly, and particularly with the thruster particle effects.
4. Exit the shooter demo.
5. Copy my client.cs from the link above to the "C:\Torque 2D\SDK\example\T2D\client" folder, and overwrite the default version.
6. Delete the client.cs.dso to make sure it compiles my script.
7. Run T2D.EXE from the "C:\Torque 2D\SDK\example\" folder to run my script.
8. Observe that there are no particle effects.
9. Exit the game.
10. Now, once again, in the "C:\Torque 2D\SDK\example\" folder, run "RunShooterDemo.bat".
11. Start the game, and observe the graphics.

Observed result:
The particle effects are missing from the untouched shooter demo!

NOW, try to run T2D.EXE, and run the particle editor!

Try to load ANY particle!

it will result in either no particle showing up, or a CRASH.



Man... if I can ruin an entire install of T2D by following a beginner tutorial... maybe I'm not cut out for this... heh.
#6
04/08/2005 (4:37 am)
Don't comment-out the line...

exec("./demoDatablocks.cs");

This contains all the common datablock definitions for all the demos.

- Melv.
#7
04/08/2005 (11:50 am)
Wow, that simple? But even so, shouldn't this path I'm using for the tutorial and the shooterdemo path be separate entities? I mean, one project shouldn't hurt another if it doesn't access or change files in the other's path, right? Commenting out that line shouldn't mess up projects that don't use that client.cs.

I wasn't asking someone to fix my script. I knew I did something wrong in my scripting, but the bug is that it affects projects that have nothing to do with my script. They don't access my client.cs, do they? An error in one project's client.cs shouldn't cease all other projects, which have their OWN client.cs, from working properly.
#8
04/09/2005 (4:32 am)
That file does matter because it (as it name suggests) is a common datablock that defines all the common demo-datablocks. The alternative is having this file in every demo as well as all the shared image files they use which would be a bit silly and alot of waste.

Different directories don't mean different projects though. The particle-editor, tile-editor and the base-T2D mod will always be loaded unless you tell them not to. If you additionally load-up another as a mod, like the space-shooter demo, that means you've loaded 1 base (T2D) and 3 mods (particle/tile/space-shooter). Look in the console to see them all being loaded.

As you progress with T-Script and the idea of mods/packages, you'll see how they all share a common pool of what is defined and what is not. That's the whole idea of it. A 'mod' you create can access stuff in your main game and just modify or extent certain functionality and certainly share data.

That's essentially how things like the tile/particle editors somehow automagically get access to the datablocks define in the T2D base.

Does that make sense? Need another morning coffee here. :)

- Melv.
#9
04/09/2005 (9:03 am)
Ah ok. Sorry to waste your time with this then! I thought all of the common objects were in the "common" folder, and the other folders were separate projects. And that the client.cs in each other folder just told T2D.exe what it would need from the common folder. But the T2D directory itself is common as well, eh? It seems a little strange, seeing as the other folders contain many of the same objects as the T2D folder. It seems strange to me that it'd take the mod's client.cs AND the T2D folder's client.cs and use them both. That seems like it'd make it hard to run multiple projects that require different settings. And how would one know which settings take priority in the T2D folder's client.cs, and which take priority in the mod's client.cs? You'd pretty much have to have a separate install of T2D for each mod you want to make.

BUT, I see how it works now (a little... again, I still don't know about settings priorities), and I'll accept it :).

Again, sorry to waste your time with this bug report, and thank you very much for your help. I'll keep it in mind in future projects.
#10
12/01/2007 (4:22 pm)
The particle-editor thingy doesn't seem to work in my TGB 1.3 or 1.5 - is it known to be broken?

More details: When I click "graph edit" I get some nebulous colored boxes that appear randomly in the large square, sometimes overlapping, and some numbers occasionally, but going up and down the list nothing that seems to make any sense.