Games work in editor but not as builds
by George Schmitt · in Torque Game Builder · 11/04/2006 (9:58 pm) · 6 replies
I can get my game and the included demos to run fine inside the new TGB Editor, but when I build any of them and run the executable, I get the "has encountered an error and needs to close" window. There aren't any error messages in the console log file. Is there something simple here I'm missing?
#2
It looks like I'm going to have to go back to the earlier version of Torque2D to continue working, since the packaging utility DOESN'T WORK AT ALL for me and has yet to produce a single working build.
11/13/2006 (3:35 pm)
Does anyone have an idea what is wrong with this packaging utility?!It looks like I'm going to have to go back to the earlier version of Torque2D to continue working, since the packaging utility DOESN'T WORK AT ALL for me and has yet to produce a single working build.
#3
First we need to do a check.
You've got TGB latest version?
Have you modified the source code?
Have your tried "compiling" the samples that come with torque?
Ok now sit down and read this carefully:
You DONT need the "compiler", your torquescript CS code is compiled in run time.
All you have to do to get a game "compiled" is to run it once then copy the created .DSO files (not .cs which are source) to a different directory with exactly the same sirectory structure, along with the media files too (they are located in DATA) then modify the main.cs file so it doesnt load the editor, and make it run your first level instead (or your intro menu if you have one)
Thats it!
Theres nothing more to it! you just created by hand a "compiled" version of your game. (thats all the "packager" does,") The compiler does a "check" to see if the media you are "packaging" is actually being used in the game before copying it. But you can do that by yourself.
Sometimes, the code you are using in main.cs MIGHT fail when you "compile", this ussually means you have tempered with the main.cs or the game.cs files in a way that it will give you an error when trying to use it without the editor ALL you have to do is to restore main.cs or game.cs to a more usual setting per example being used in a working demo.
As a rule of thumb, if your game RUNS in the editor it must RUN without it too. (there are both the same.exe!)
I hope that helps. Sorry for not answering sooner.
(edited for better explaining)
11/13/2006 (3:58 pm)
Hmmm is weird that no employee has answered this. First we need to do a check.
You've got TGB latest version?
Have you modified the source code?
Have your tried "compiling" the samples that come with torque?
Ok now sit down and read this carefully:
You DONT need the "compiler", your torquescript CS code is compiled in run time.
All you have to do to get a game "compiled" is to run it once then copy the created .DSO files (not .cs which are source) to a different directory with exactly the same sirectory structure, along with the media files too (they are located in DATA) then modify the main.cs file so it doesnt load the editor, and make it run your first level instead (or your intro menu if you have one)
Thats it!
Theres nothing more to it! you just created by hand a "compiled" version of your game. (thats all the "packager" does,") The compiler does a "check" to see if the media you are "packaging" is actually being used in the game before copying it. But you can do that by yourself.
Sometimes, the code you are using in main.cs MIGHT fail when you "compile", this ussually means you have tempered with the main.cs or the game.cs files in a way that it will give you an error when trying to use it without the editor ALL you have to do is to restore main.cs or game.cs to a more usual setting per example being used in a working demo.
As a rule of thumb, if your game RUNS in the editor it must RUN without it too. (there are both the same.exe!)
I hope that helps. Sorry for not answering sooner.
(edited for better explaining)
#4
The main reason this hasn't gotten any attention is because:
1) We cannot duplicate it. I've had zero problems packaging up every single demo, as well as my own work, repeatedly.
2) He gives no duplication instructions, so we cannot attempt to re-create what he is doing, or pointing out any possible errors in his utilization of the system.
11/14/2006 (1:44 pm)
Quote:
Does anyone have an idea what is wrong with this packaging utility?!
It looks like I'm going to have to go back to the earlier version of Torque2D to continue working, since the packaging utility DOESN'T WORK AT ALL for me and has yet to produce a single working build.
The main reason this hasn't gotten any attention is because:
1) We cannot duplicate it. I've had zero problems packaging up every single demo, as well as my own work, repeatedly.
2) He gives no duplication instructions, so we cannot attempt to re-create what he is doing, or pointing out any possible errors in his utilization of the system.
#5
1. load one of the included demo projects in the editor
2. open the Build Project window
3. set the output directory in the upper right hand corner
4. hit the 'analyze game' button - it scans the files and shows the list of what's included in the center area
5. hit the build button in the lower right
It does its thing and opens the summary file in my web browser. After that, I go to the output directory in windows explorer and run the executable. There's a pause like it's loading for a second (although nothing comes up), then I get the generic windows error.
Anyway thanks for the tip; I guess I'll just handle the packaging myself since it doesn't seem too hard.
Also I haven't done any modification / C++ stuff, and this is version 1.1.1
11/15/2006 (2:19 pm)
All I do is:1. load one of the included demo projects in the editor
2. open the Build Project window
3. set the output directory in the upper right hand corner
4. hit the 'analyze game' button - it scans the files and shows the list of what's included in the center area
5. hit the build button in the lower right
It does its thing and opens the summary file in my web browser. After that, I go to the output directory in windows explorer and run the executable. There's a pause like it's loading for a second (although nothing comes up), then I get the generic windows error.
Anyway thanks for the tip; I guess I'll just handle the packaging myself since it doesn't seem too hard.
Also I haven't done any modification / C++ stuff, and this is version 1.1.1
#6
The current version of TGB is 1.1.2, and 1.1.1 had known issues with the Packaging tool which have been corrected.
11/15/2006 (2:38 pm)
You aren't using the most recent version.The current version of TGB is 1.1.2, and 1.1.1 had known issues with the Packaging tool which have been corrected.
Torque Owner George Schmitt
This is from the windows error when I try to run the exe in the build directory:
AppName: ttalpha3.exe AppVer: 0.0.0.0 ModName: opengl2d3d.dll
ModVer: 0.0.0.0 Offset: 0000e0a6