Game Development Community

Issue With the Level Editor

by Ben Ewing · in Torque Game Builder · 02/04/2007 (3:02 pm) · 17 replies

Okay, so I FINNALY finished a game with TGB, I packaged it, and ran it, but on the packaged copy the mouse started trailing, and I couldnt do anything, I remembered that i had forgotten to remove the level builder, after i removed that, my game wouldnt work at all (Packaged or unpackaged).
Does anyone know why this is?

#1
02/05/2007 (10:05 am)
@Ben, by "packaged" do you mean you ran the TGB Packaging Utility found in the File Menu? Or you manually packaged it yourself?

The best thing to do is, use the packaging utility, find the location you packaged too (hopefully, not your game mod directory itself!) and then determine all the pre-compiled torquescript files that it added -- you can then locate those files in your TGB games/ folder, and then modifiy them to your liking to remove any unnecessary items from being included (such as alot of the stuff found in the common folder that may not be used, ie; GUI's for example)

You can then edit those files in your TGB directory, then re-package again ... rinse and repeat until your satisfied with the output ...

Then your packaged directory should work 'as is', containing an EXE named after your Project (ie; MyGame.exe) along with both a 'common' and 'MyGame' directory)
#2
02/05/2007 (4:09 pm)
Packaging isnt so much the problem, its that my game wont run without the level editor...
#3
02/05/2007 (5:57 pm)
@Ben,

If your game mod does not utilize anything from the Level Builder internally, and you run the "Package" utility, then your game should run fine right out of the "build" directory -- The Level Builder data is removed by the Building, and a new "main.cs" is created that removes the level builder references --

Your issue is most certainly with the way you are "packaging", as you appear to possibly not be using the internal TGB "Package Utility" and perhaps something else (that is most likely including the un-altered "main.cs" from the TGB.EXE folder)

That or, your description of the error is incorrect -- you say in your initial post that you "forgot to remove the level builder", which is done internally by TGB's Package Utility, so I assume the latter, and am left with thinking that you are packaging your game "manually", which is not recommended unless you know the absolute ins-and-outs of the engine and what it is expecting to see, as well as how the game is launched through the means of the "main.cs" in the TGB.EXE directory
#4
02/05/2007 (6:15 pm)
To package, Im going to File Build Project, is that what im supposed to do to package?
#5
02/05/2007 (6:24 pm)
Yes, that is how you package a game mod -- you enter the 'build path' in the top right, and once the package utility has completed, the contents of that directory "are your game", no additional resources are required (except maybe art that the package utility was unable to determine by itself)

This creates a MyGame.exe, where "MyGame" is the name of your mod, and this is basically just a copy of the TGB.EXE that is creating the mod, renamed -- but the main.cs that is placed in there, is slightly modified, as you can tell by opening the TGB main.cs and your MyGame main.cs -- so removing the level builder is not "your job", it is TGB's
#6
02/05/2007 (6:57 pm)
Okay, ive been packaging it righr, but without the tools included, the mouse trails and the game freezes, (Packaged) I changed it to include the tools, and I put the tools folder in with my game, and it works fine....
#7
02/05/2007 (8:27 pm)
@Ben, are you utilizing the mouse in any 'odd' fashions?
#8
02/05/2007 (8:33 pm)
Ummm...no......
#9
02/05/2007 (8:43 pm)
@Ben, is there any chance you can provide either the code, or the 'packaged' game so I can see whats going on?

You can email either to: higginsd@zoulcreations.com

If not, then I'm afraid I can't really help, as I've not experienced this issue at all -- are you running this in OSX, Windows or Linux? Have you tested the mouse issue on other systems, or is this all tests you are doing on the dev box by itself?
#10
02/05/2007 (8:47 pm)
Yeah, Ill send it to you....
Im running windows, and ive only run it on my dev box....
#11
02/05/2007 (10:48 pm)
This mouse trail problem is most commonly caused by nothing being properly pushed to the canvas on startup. No valid gui or scenegraph is being pushed to your canvas by your startup code. Work on tracking that down and push something to the canvas and everything will likely work great!
#12
02/06/2007 (6:34 am)
@Ben Ewin, Ben Vesco is correct -- you seem to have removed the 'Canvas.setContent(mainscreenGui)' from your game.cs --
#13
02/06/2007 (6:35 am)
Also, once launched, if you goto your 'console' with "~", even with the mouse trailing issue -- your recieving alot of "Reference passed to Ball1 not an Object" errors -- which is most likely due to all of the artwork not being automatically included in the build process, I tried copying the entire images directory from the game mod to the game build, but that did not help --
#14
02/06/2007 (7:04 am)
Is Ball1 from the ball resources package?
#15
02/06/2007 (7:20 am)
@ David, thanks ill take a look at those :)

@Marc, Umm, Ball1 is from the Balls that come with TGB (My immaturity says Lol)
#16
02/06/2007 (7:07 pm)
Woo, I got it, I just rewrote game.cs and it worked, there was a lot of weird code in it that I took out :)
#17
02/07/2007 (3:24 am)
I mainly asked to make sure that there wasn't the attempt to use media that was actually part of a resource package imported instead of the project folder itself :) (there is a ball resource in TGB default install with physical materials to toy around)

But good to know it was just some kind of "user error" :)