jEdit/Tide - New Project Issue (on MacOS 10.6)
by Christian Speiser · in Torque Game Builder · 09/08/2009 (12:15 am) · 4 replies
Hi guys!
I just started trying Torque on my Mac and found out that jEdit with Tide is the only Editor that works with a Debugger on MacOSX.
After installation of the TIDE PlugIn I tried to test the editor with the sample Game Solitaire and setup a "New Project".
The problem: after the "patch game" question it always tells me "Patch Failed".
My Config:
Project Name: Solitaire
Game Executable: /Users/Chris/TorqueGames/Solitaire/Solitaire.app
Launch Locally: Checked
Host: 127.0.0.1
Port: 28040
Password: password (is that OK, where can you set the password?)
Can anyone please help me, I'm stuck here!
Many thanks,
Chris
I just started trying Torque on my Mac and found out that jEdit with Tide is the only Editor that works with a Debugger on MacOSX.
After installation of the TIDE PlugIn I tried to test the editor with the sample Game Solitaire and setup a "New Project".
The problem: after the "patch game" question it always tells me "Patch Failed".
My Config:
Project Name: Solitaire
Game Executable: /Users/Chris/TorqueGames/Solitaire/Solitaire.app
Launch Locally: Checked
Host: 127.0.0.1
Port: 28040
Password: password (is that OK, where can you set the password?)
Can anyone please help me, I'm stuck here!
Many thanks,
Chris
#2
12/05/2009 (3:59 am)
me 2. Did anybody fins a solution to this?
#3
02/04/2010 (4:58 am)
Hey guys, just found this thread... since the TGB "main.cs" file seems to be totally different from the TGE version, TIDE is not able to patch the file correctly. I'm currently working on a solution, but here is a patched "main.cs" - since I don't own TGB I can't really check if there are different main.cs files for different releases... I've had a look at the current T2D version and it seems to be completely different again... anyways, here is a TGB main.cs file patched - if it doesnt fit for your TGB version, just look at the comments and add those parts yourself://---------------------------------------------------------------------------------------------
// Torque Game Builder
// Copyright (C) GarageGames.com, Inc.
//---------------------------------------------------------------------------------------------
// TorqueDebugPatcher begin
$GameDebugEnable = false;
$GameDebugPort = 28040;
$GameDebugPassword = "password";
function doEnableDebug()
{
// attempt to auto enable debugging
if (!$GameDebugEnable)
{
echo("NOT enabling debug...");
return;
}
echo("DEBUG: enabling debug on port: " @ $GameDebugPort);
// the third parameter is only valid for the updated debugger in TGE >= 1.4!
%cmd = "dbgSetParameters(" @ $GameDebugPort @ "," @ $GameDebugPassword @ ", false);";
echo("DEBUG: evaluating: " @ %cmd);
eval(%cmd);
}
function displayHelp() {
error("Debugger options:\n" @
" -dbgPort <port> Set debug port (default = 28040)\n"@
" -dbgPassword <pass> Set debug password (default = password)\n"@
" -dbgEnable Start game in debug mode\n");
}
function parseArgs()
{
// Loop through the arguments.
for (%i = 1; %i < $Game::argc; %i++)
{
%arg = $Game::argv[%i];
%nextArg = $Game::argv[%i+1];
%hasNextArg = $Game::argc - %i > 1;
switch$ (%arg)
{
case "-dbgPort":
// we must have a next arg
$argUsed[$i]++;
if ($hasNextArg)
{
$GameDebugPort = $nextArg;
$argUsed[$i+1]++;
$i++;
}
else
error("Error: Missing Command Line argument. Usage: -dbgPort <port>");
//--------------------
case "-dbgPassword":
// we must have a next arg
$argUsed[$i]++;
if ($hasNextArg)
{
$GameDebugPassword = $nextArg;
$argUsed[$i+1]++;
$i++;
}
else
error("Error: Missing Command Line argument. Usage: -dbgPassword <password>");
//--------------------
case "-dbgEnable":
$GameDebugEnable = true;
$argUsed[$i]++;
//--------------------
case "-connect":
$argUsed[$i]++;
if ($hasNextArg)
{
// mark which server we will automatically connect to
setAutoConnect($nextArg);
$argUsed[$i+1]++;
$i++;
}
else
error("Error: Missing Command Line argument. Usage: -connect <x.x.x.x:port>");
default:
$argUsed[$i]++;
if($userMods $= "")
$userMods = $arg;
}
}
}
// TorqueDebugPatcher end
/// Player Initialization Procedure
///
function onStart()
{
// TorqueDebugPatcher begin
doEnableDebug();
// TorqueDebugPatcher end
}
function onExit()
{
}
//---------------------------------------------------------------------------------------------
// Load the paths we need access to
//---------------------------------------------------------------------------------------------
function loadPath( %path )
{
setModPaths( getModPaths() @ ";" @ %path );
exec(%path @ "/main.cs");
}
//---------------------------------------------
// Do some bootstrap voodoo to get the game to
// the initializeProject phase of loading and
// pass off to the user
//---------------------------------------------
// Output a console log
setLogMode(6);
loadPath( "common" );
loadPath( "game" );
onStart();
// Initialized
echo("\nTorque Game Builder (" @ getT2DVersion() @ ") initialized...");
if( !isFunction( "initializeProject" ) || !isFunction( "_initializeProject" ) )
{
messageBox( "Game Startup Error", "'initializeProject' function could not be found." @
"\nThis could indicate a bad or corrupt common directory for your game." @
"\n\nThe Game will now shutdown because it cannot properly function", "Ok", "MIStop" );
quit();
}
_initializeProject();
// Startup the project
initializeProject();
#4
03/07/2010 (1:27 am)
Hey MACies, the new TIDE version fixes the "patching" problems, see my latest blog... I also need some beta testers for a debugger fix on MacOS :)
Torque Owner Miguel Cordoba