Game Development Community

How to make an exe & cross platform stuff

by MaxAntinone · in Torque Game Engine · 02/05/2008 (9:19 pm) · 18 replies

Okay, so let's say I have my basic game finished. I have my folder (the normal folder with subfolders Client, Data, Server with all my art, data, and potentially sound), and I want to simply move my game over for demonstration on another computer (the computer attached to the projector) or for display in a gallery (I'm actually working on an art project). What all do I need to do this?

Do I just need to move the Torque Demo icon and my folder? (I assume the Torque Demo thing is the compiled engine) What about things like the main.cs file where I frequently change the active folder?

Also, I'm running on a Mac. What do I have to do in order to run my game on Windows XP?

#1
02/06/2008 (9:34 am)
All you should need to do is create a new binary [from the C++] to run on the system you're going to, and drop it in alongside the binary for the platform you use right now. All the torquescript can stay exactly the same [that's kinda the point of having a scripting language].

In the end, you can actually have one package that runs on all platforms, just by dropping a binary for each platform into the same top-level directory, with appropriately different names (eg, "Torque.app" directory on mac, "torque_linux" on linux, "torque.exe" on windows).

Gary (-;
#2
02/06/2008 (6:55 pm)
And... how do I go about doing that? I'm on a little more of a basic level here. I've never compiled anything outside of netbeans IDE, and I'm not even sure what's what. Do I already have a binary file for the system I'm working on? Is that the TorqueDemo file? How does the file structure work? Will there be one main directory that contains the Torque.app/Torque.exe file and the data folder? I assume, since it's compiled, that there shouldn't be any .cs files involved?

And are you saying that, for now, all I have to do to run on other MAC's is have the binary file and my data folder?
#3
02/06/2008 (7:16 pm)
Well, since all the .cs files run on the same script (no matter what system your on). You could just bring the files on Windows and compile!
#4
02/06/2008 (8:04 pm)
But how do I compile them, and which folders have the files I'm compiling?
I know there's a C compiler on the Mac I'm using, but I've never used it.
#5
02/06/2008 (8:14 pm)
Xcode, you can download it off the internet, it is hard to set up but once you set it up you just need to click one button to compile it.
#6
02/06/2008 (8:15 pm)
Ohh, you want to compile the game, not the engine... I donno.

EDIT: I wish they had a build option like in TGB, where you just press a button and it will compile for all of them...
#7
02/07/2008 (12:32 pm)
I found out how!

1. Buy one of the liscenses
2. Download Xcode (or any c++ compiler)
3. Find the TGE icon and replace it with yours (with the same name as the original)
4. Compile the engine
5. Use the Deletpref command
6. Drag TGE, your game's folder, and main.cs onto your desktop (or where you want your game to be)
7. Delete all of your .cs files in your game folder (NOT the .cs.dso files)

I think that's it!
#8
02/07/2008 (6:23 pm)
Okay, I know there's a C++ compiler on this computer, I just have to find it...
First, what do you mean by replacing the icon? Do I just rename the one I have?

Second, not a lot of real programming experience outside of classes and IDEs, how do I compile the engine!? Will it just be obvious what I'm supposed to do when I open up the compiler?
#9
02/08/2008 (8:35 am)
There may not be one. If you're talking about your Mac, you will have to install it from the system CD's or from the Apple developer site. From there, you will have to open the project and go through the basic compiler documentation to get a feel for the interface.
#10
02/17/2008 (9:19 am)
Another thing you can do is download the Torque Game Engine for the operating system you want it to play one (like Linux or Mac) and once downloaded, just replace the script code with yours.
#11
04/01/2008 (6:41 pm)
The computer I'm working on had a C++ compiler put on it before Torque was installed.
#12
04/01/2008 (6:54 pm)
This computer had a C++ compiler put on it before Torque was installed.
#13
04/01/2008 (7:50 pm)
Assuming you didnt make any engine changes (And I dont think you did)
Just download the TGE demo for Windows, replace all art, scripts, etc... with your own stuff, burn it to a disc, and it should run fine on Windows
#14
04/01/2008 (8:41 pm)
Does adding new keystroke functions change the engine (because I haven't gotten an answer as to WHERE to put this code yet)
So you're telling me that all I have to do is get an existing Torque game (such as the demo) and replace the basic data folder and icon with my own? So I don't actually have to compile anything for myself? (I can't actually test this right now because I'm not in the computer lab)

Don't some of the .cs files in the client folder get changed around? I remember seeing something about the engine using config.cs instead of default.bind.cs in the end, or something to that effect.
#15
04/02/2008 (6:15 pm)
So I took the data file from my game, and I went back home and stuck it in the TGE 1.5.2 demo folder on my PC back home. It boots up the title screen, but when I try to run it it loads everything then tells me "You do not have the correct version of the Torque Game Engine or the related art needed to connect to this server, please contact the server operator to obtain the latest version of this game. (invalid packet.)"

I think the cs.dso files in there might be compiled for a mac...
#16
04/04/2008 (8:51 am)
Are the textures in the right place on the machine that you placed it on? That is usually case with that error. Check the console.log to see which textures it couldn't find.
#17
04/04/2008 (1:03 pm)
All of my textures should be in the same folders that the dif files are in.

However.... There was one point at which I updated a texture in the Constructor textures folder, and then I looked in my game and the texture was updated before I'd re-exported the interior with the new texture, so it might be looking for the textures in the Constructor folder....
I can remake the file structure, but it seems a little clumsy and it won't work if it's not using a relative pointer.

How can I reprogram where it looks for the textures? What file tells it where to look? I don't see any .cs files in the interiors folder.

Oh.... maybe it's just missing the detail texture for the grass.....
#18
06/08/2008 (7:21 pm)
I've tried screwing around with the texture folders and trying to mimic the original file structure that it had in the SDK, but it hasn't worked so far. It still gives me the same error message.