Game Development Community

Packaging Apps for Release

by Seth Willits · in Torque Game Builder · 03/03/2005 (8:00 pm) · 12 replies

Hi Guys,

First off, T2D looks great. I'm just trying to get the general idea here, and was wondering, how do you go about removing all of the editors and junk for release?

Obviously you remove the particle and tile editors, piece of cake, but what about removing the GUI editor? I followed the steps in the "Big dumb question about menu/gui" thread, but that only removes the GUI elements.

Additionally, in the tutorial app, when I did this, the place where the menu once was is now a white void. I fiddled with the skylayer and after much fiddling, I discovered that %skyLayer.setPosition("0 -12"); seems to cover that area with the sky, but I have no idea why it's -12 and -10 left the white void. I kinda would have figured it'd be 0 0, but I suppose I'll just have to figure that one out on my own. Anyway, back to the main point...

What about disabling the console?

How much code in the T2D app itself can be removed in a production app that doesn't need the GUI editor and all that junk? Or is it actually written in TorqueScript so there's nothing to strip out?

Is there support in T2D for moving the game code inside of the app package on Mac OS X? I think this was added in TGE, but it's been ages since I've paid any attention. (Too busy, but T2D was waaaay too luring.)

Lots and lots of questions in my head :^)

#1
03/04/2005 (12:31 am)
In the main.cs file that;s located in the same directory as T2D.exe you will the following about half way down:
$runWithEditors = true;
Set it to false, and all the editors are disabled.

As to the console, look in the client.cs file that's in the example\T2D directory and you'll see the line:
GlobalActionMap.bind(keyboard, tilde, ToggleConsole);
Just remove this and the ~ key will no longer have an effect.
#2
03/04/2005 (12:51 am)
If you set:

$runWithEditors = false;

in main.cs whats stopping the end user editing it & just setting value back to true ?
#3
03/04/2005 (1:06 am)
I just uploaded two .zip files for my TankPong project. The first is the "Redistributable" version. EXE file, No Editors, No Console, No .CS files

The second is the .CS version of the same thing.

torque.feylab.com/downloads/TankPong-Redist.zip
torque.feylab.com/downloads/TankPong-Source.zip
#4
03/04/2005 (1:22 am)
@Pete: You also need to just delete the "tileeditor" and "particleeditor" directories. They can't run what they don't have. :)

We'll be making this much easier with a special tool to handle this, kind of a "distribute" button. Sorry that it's a bit "manual" at the moment but we didn't get the time to finalise that aspect of the release.

It's all on its way. Hold tight.

- Melv.
#5
03/29/2005 (11:27 am)
I deleted both of the folders, and set runWithEditors to false. However, I was still able to activate the editors via use of the F10 and F11 keys.

I noticed, in the common/ui folder, that there were some .dso files that looked like they might hold the editor GUI inside them (which is what shows up when I press F10 or F11).

Why might this be, and how do I remove it?
#6
03/29/2005 (11:35 am)
If you delete the folders, the editors are not there so you cannot run them. The tile/particle editors are T2D mods and are not contained in the "common" stuff. The console editor is core-TGE and is within the "common" folder though.

The exception to this is the console editor F10 which we need to provide the ability to disable in the same manner.

I have no idea how you can run code that isn't there!

- Melv.
#7
03/29/2005 (11:37 am)
F10 activates the GUI editor, is that what you mean?

Edit: It appears that the particle and tile map editor can no longer run, which makes sense. So that part works -- sorry for the confusion.

Is there any way to remove this GUI editor? Say, binding F10 to quit the game?
#8
03/29/2005 (12:44 pm)
The cs.dso files are you're compiled TorqueScript files, and these are the files you will be distributing when your game is finished.

There are a few ways to deactivate the Gui editor. I'm sure there is an ActionMap containing that keys bind somewhere (I really haven't looked into it to much).

What prevents the end user from changing? The fact that they only have your compiled scripts, not your original .cs files.
#9
06/28/2005 (4:18 pm)
Just in case you are trying to figure out how to disable the GUI editor, look in common/canvas.cs around line 28. Comment out the
exec("~/ui/GuiEditorGui.gui");
line or conditionally execute it to control access to the GUI editor.
#10
07/11/2005 (2:10 pm)
And what about the main.cs file in the root directory (the same directory as T2D.exe) ? There is no .dso-file created for it, when I run the game. And if I just replace it with a file named main.cs.dso a messagebox appears saying "Failed to open main.cs!". Is it allowed to ship this file uncompiled?
#11
07/11/2005 (8:07 pm)
That's the only .cs file you can ship AFAIK. It never gets compiled into a .dso.
#12
07/12/2005 (3:40 am)
That's what I guessed. Thanks Jason.