Game Development Community

Where's my EXE?

by baylor wetzel · in Torque Game Builder · 11/09/2007 (4:18 pm) · 3 replies

I thought my app was great. i'd go into Visual Studio 2005, hit F5, get prompted for where main.cs was and then play my game. Life was fine

Then i exited VS2k5 and tried to run tgb\TorqueGameBuilder.exe. It runs great but none of the objects i created exist (nonConobject error). Ditto TorqueGameBuilder_DEBUG.exe. i checked the time/date stamp. The exe was created 3 minutes ago. i did a rebuild solution and waited the roughly 4 months it takes to compile and checked the time/date stamp and it was once again updated. But my classes, the ones that worked perfectly inside the IDE, were there. Tried in both release and debug mode. Searched my harddrive for possible places it might have stashed it

My only conclusion - aliens have abducted my EXE and replaced it with an EXE that looks like mine but which is not. It's the only explanation that makes sense

Before i start putting "Have you seen this EXE" pictures on the back of milk cartons, anyone happen to know why my app only runs through the IDE?

#1
11/09/2007 (9:31 pm)
OK, i *think* i have this figured out. Turns out, there's 2 TGBs and the default project in the VS solution is not the one you should change. Wish i had known that a couple of days ago :(

My game can't see my objects unless i run it through the IDE and i'm getting closer to figuring out why

i modified the project TorqueGameBuilder. When i run that, it launches the editor. In the editor (via the console) i can see my objects. Echoing the version shows that it's the one i wrote. When i hit the play button, it launches a new copy of the program. That version does not have my objects. Turns out, it's not the same executable - the version info and getCompileTimeString aren't right (technically, i suspected after i modified the icon and the new icon only shows when in the TGB editor, not when the game runs)

For posterity, here was my problem:

TGB (at least in 1.5) apparently has two different executables, TGBGame and TorqueGameBuilder. The first one, the one i didn't modify, is the one that runs your game. It lives in the TGB\gameData\T2DProject folder as TGBGame.exe

Despite the name and the fact that it has all the game files, the second one, it seems, is just the level editor. It lives in the TGB folder as TorqueGameBuilder.exe. When you run this exe, it runs the level editor. Pressing play in there doesn't launch TorqueGameBuilder, it launches TGBGame.exe. It also doesn't launch TGBGame_DEBUG.exe, even if that's the only file you made. As far as i can tell, the debug build is useless - you can't run it directly and the main Torque file (TorqueGameBuilder) won't call it. You can, however, manually rename it from TGBGame_DEBUG.exe to TGBGame.exe and it will work

That's my guess as to what's happening. Maybe there's a more obvious or easier way to do this but, after hours of scratching my head, this is the solution i came up with

By the way, i finally figured this out when i changed the EXE's icon and realized that only one of the TGB entries on the start bar had the right icon
#2
11/15/2007 (12:18 am)
I had the similar problem. I think, I realized whats happening here. There are two main projects under the solution T2D viz, TGBGame and TorqueGameBuilder. Both of this has the same files under them (exact same files, and not a copy). As you have already said, the game uses the TGBGame.exe(built from TGBGame project) and TorquegameBuilder.exe (built from TorqueGameBuilder), only with two seperate settings.

All you have to do is, Right click on one of the projects, and choose Set as Startup project and build it. This generates on of the two exe's . Do the same with the other project to generate the other exe.

NOTE: TGBGame.exe is found under tgb/gamedata/T2DProject

Regards,
Sharath
#3
03/07/2008 (5:14 am)
If you need to debug your changes in TGBGame.exe (actually will be TGBGame_DEBUG.exe) right click on the solution entry for TGBGame and select the properties in Visual Studio. Then just add Command Arguments as -project c:\mygamedirectory\mygamefolder

You can then right click on TGBGame.exe in the solution and hit start debug.