Beginner's Tutorial
by Janus Gorzawski · in Torque Game Builder · 03/20/2006 (2:50 pm) · 8 replies
Hello,
I'm completely new to Torque2D, so excuse me if my question is stupid. I've purchased T2D and wanted to go through the beginner's tutorial (the space shooter tutorial). When I add code to the client.cs file (under "Creating a sprite") and run T2D I see nothing but the empty homepage of T2D. No sprite. Can somebody help me? Thank you.
I'm completely new to Torque2D, so excuse me if my question is stupid. I've purchased T2D and wanted to go through the beginner's tutorial (the space shooter tutorial). When I add code to the client.cs file (under "Creating a sprite") and run T2D I see nothing but the empty homepage of T2D. No sprite. Can somebody help me? Thank you.
#2
04/02/2006 (1:07 pm)
Hey did you move the images from the demo space shotter to your folder? cause that would do it
#3
Yes, I did. I've moved all images from "Torque2D\SDK\example\spacescroller\client\images" to "Torque2D\SDK\example\T2D\client\images", modified the client.cs script as described and lauched the T2D.exe but it still doesn't work. No sprite on the screen.
04/02/2006 (3:33 pm)
Hi,Yes, I did. I've moved all images from "Torque2D\SDK\example\spacescroller\client\images" to "Torque2D\SDK\example\T2D\client\images", modified the client.cs script as described and lauched the T2D.exe but it still doesn't work. No sprite on the screen.
#4
04/02/2006 (7:10 pm)
You mite have a script error then. torque uses the last working dso file when there is an error you can check by pressing ~ button wile running torque and it should tell you there if any scripts did not compile, also you can delete the dso file and see if a new one is created when you run torque
#5
When you edit a script outside of the editor and do a launch of the game in the editor, somehow it doesn't recompile the scripts, even after they have changed. It seems like a dependency issue to me.
So what I did to get it to recompile the scripts is to exit the level builder, edit my scripts, delete all the *.dso files, and re-ran the editor. This forces the editor to reparse the scripts and compile the *.dso files.
I don't know if this is a bug, or if it is user error (probably is) but maybe there should be a "Build All" or "Build Clean", similar to Microsoft's DevStudio? That would be really cool.
04/11/2006 (2:12 pm)
I hit the same problem as you. The latest Torque 2d SDK (Beta2) has some issues compiling the scripts (at least it is for me). When you edit a script outside of the editor and do a launch of the game in the editor, somehow it doesn't recompile the scripts, even after they have changed. It seems like a dependency issue to me.
So what I did to get it to recompile the scripts is to exit the level builder, edit my scripts, delete all the *.dso files, and re-ran the editor. This forces the editor to reparse the scripts and compile the *.dso files.
I don't know if this is a bug, or if it is user error (probably is) but maybe there should be a "Build All" or "Build Clean", similar to Microsoft's DevStudio? That would be really cool.
#6
I too didn't find the tutorial working as advertised. I had to add some script code to make sure that setupT2DScene was called to get things running. If someone wants it I'm happy to provide the end code from the tutorial, although once I got it running everything else seemed fine.
04/15/2006 (8:40 pm)
My experience is that there's no need to delete all the .dso files, but that you must quit and re-run the T2D executable. I'm snooping the source code right now and I don't see anything that even tries to recompile when you play a level. But it's early yet. At least there's a workable workaround.I too didn't find the tutorial working as advertised. I had to add some script code to make sure that setupT2DScene was called to get things running. If someone wants it I'm happy to provide the end code from the tutorial, although once I got it running everything else seemed fine.
#8
04/19/2006 (11:30 pm)
Hey if you could e-mail me the sorce code that be nice my e-mail is at dextr327@yahoo.com
Torque Owner Philip Mansfield
Default Studio Name
But also look through your console.log file to see if there are any errors reported. If so, post those as well in your private thread.