Game Development Community

dev|Pro Game Development Curriculum

How to port the TGE Starter.FPS pack to TGEA 1.0.3

by Joseph Euan · 09/26/2007 (12:53 pm) · 31 comments

This is a simple "How to" to walk you through how to port the starter.fps from TGE 1.5 to TGEA 1.0.3

Step 1:
Copy the starter.fps pack from TGE

Step 2:
Files\Folders to copy over:

From TGEA example\demo\client\ folder
prefs.cs
defaults.cs

to the example\starter.fps\client folder


-

From TGEA example\demo\client\scripts folder

commonMaterialData.cs
glowBuffer.cs
optionsDlg.cs
precip.cs
Shaders.cs

to the example\starter.fps\client\sripts folder

-

From TGEA example\demo\client\ui folder

optionsDlg.gui

to the example\starter.fps\client\ui folder

-

Step 4:

Open example\starter.fps\client\init.cs

add

//-----------------------------------------------------------------------------
// loadMaterials - load all materials.cs files
//-----------------------------------------------------------------------------
function loadMaterials()
{
   for( %file = findFirstFile( "*/materials.cs" ); %file !$= ""; %file = findNextFile( "*/materials.cs" ))
   {
      exec( %file );
   }
}

function reloadMaterials()
{
   reloadTextures();
   loadMaterials();
   reInitMaterials();
}

//-----------------------------------------------------------------------------
before the line
function initClient()

Add
// material related
   exec("./scripts/glowBuffer.cs");
   exec("./scripts/precip.cs");
   exec("common/client/shaders.cs");
   exec("./scripts/shaders.cs");
   exec("./scripts/commonMaterialData.cs" );

   loadMaterials();
   initRenderInstManager();
to around line 111


Add
function checkVideoInit()
{
   if($GFX::OutdatedDrivers)
   {
      MessageBoxOK("Old Video Drivers",
         "You have old video drivers.  " @
         "TGEA uses many advanced rendering features, and older drivers may not support them correctly. " @
         "YOU SHOULD UPDATE YOUR DRIVERS BEFORE PROCEEDING.  " @
         $GFX::OutdatedDriversLink);
   }
}
After
}

   Canvas.setCursor("DefaultCursor");
}
(at the bottom of the init.cs file

Find the line that says
initCanvas("Torque Game Engine", true);
change to
initCanvas("Torque Game Engine Advanced");

Step 5:
From TGEA example\demo\data copy over the files/folders

materials.cs

water folder
textures Folder

to example\starter.fps\data

Step 5: SpaceOrc Player
Copy the contents of
example\demo\data\shapes\spaceOrc
to
example\starter.fps\data\shapes\player folder

open example\starter.fps\data\shapes\player\materials.cs

and change all the lines that say
~/data/shapes/SpaceOrc
to
~/data/shapes/player

All thats left is to open the example/main.cs file and make sure you edit
$defaultGame = "demo";
(change "demo" to "starter.fps")

You should then be able to start up the starter.fps :)

After some testing.. the all the .dif models work in TGEA.. but a few of the missions don't work.

No doubt theres going to be bugs, missing code etc... if you do find them and have a fix... please email me or post here and I'll update the info

I made this based on the TGE 1.5 starter pack.. but I'm told it also works for the 1.4 starter pack

marinainternet.co.uk/dev/tgea01.jpg
Page«First 1 2 Next»
#21
01/19/2008 (2:30 pm)
Could this work with TGEA 1.01? I tried but I get an error every time I try to start TGEA. Help please!
#22
01/26/2008 (7:23 am)
It's hard to help if you won't tell what the error is.
#23
01/26/2008 (8:35 am)
When i try to run the starter.fps.bat it just shows the TGEA.exe has encountered a problem and needs to close... error.
#24
02/15/2008 (12:01 am)
When I run stronghold, I get the error:

Title: Fatal-ISV:(\QuickBuild\working\root\Tgea\continuous\checkouts\...
Error Message: Invalid st coord encoding in Interior::readMapTG



... Do you indeed have to re-export all the interiors? Any way around this? Anyone got a batch file that would handle all of em?
#25
02/22/2008 (11:57 pm)
Eit stopped at LOADING OBJECTS

xecuting starter.fps/server/scripts/player.cs.
Executing starter.fps/data/shapes/player/player.cs.
Validation required for shape: starter.fps/data/shapes/player/player.dts
Executing starter.fps/server/scripts/chimneyfire.cs.
Executing starter.fps/server/scripts/aiPlayer.cs.
Validation required for shape: starter.fps/data/shapes/player/player.dts
Executing starter.fps/server/scripts/sgExamples.cs.
starter.fps/server/scripts/sgExamples.cs (28): Unable to instantiate non-conobject class ScopeAlwaysShapeData.
starter.fps/server/scripts/sgExamples.cs (206): Unable to instantiate non-conobject class ScopeAlwaysShapeData.
ParticleEmitterData(RealFireBigEmitter) thetaMax > 180.0
*** LOADING MISSION: starter.fps/data/missions/features.mis
*** Stage 1 load
*** Stage 2 load
Executing starter.fps/data/missions/features.mis.
TSStatic::onAdd: unable to load shape: starter.fps/data/shapes/test/knot.dts
starter.fps/data/missions/features.mis (0): Register object failed for object (null) of class TSStatic.
Object 'BoxEffects' is not a member of the 'GameBaseData' data block class
starter.fps/data/missions/features.mis (0): Register object failed for object TestBox of class Item.
Object 'TestSphere' is not a member of the 'GameBaseData' data block class
starter.fps/data/missions/features.mis (0): Register object failed for object TestSphereThing of class Item.
*** Mission loaded
starter.fps/server/scripts/game.cs (121): Unknown command think.
Object AIManager(1813) AIManager -> ScriptObject -> SimObject
Connect request from: IPX:65005368:61646572206D:29793
Connection established 1814
CADD: 1815 local
*** Sending mission load to client: starter.fps/data/missions/features.mis
Mapping string: ServerMessage to index: 0
Mapping string: MsgConnectionError to index: 1
Mapping string: MsgLoadInfo to index: 2
Mapping string: MsgLoadDescripition to index: 3
Mapping string: MsgLoadInfoDone to index: 4
Mapping string: MsgClientJoin to index: 5
Mapping string: Welcome to the Torque demo app %1. to index: 6
Mapping string:  Visitor to index: 7
Mapping string: MissionStartPhase1 to index: 8
*** New Mission: starter.fps/data/missions/features.mis
*** Phase 1: Download Datablocks & Targets
Mapping string: MissionStartPhase1Ack to index: 0
Error: shape starter.fps/data/shapes/crossbow/ammo.dts-collision detail 1 (Collision-3) bounds box invalid!
Validation required for shape: starter.fps/data/shapes/player/player.dts
Validation required for shape: starter.fps/data/shapes/player/player.dts
Mapping string: MissionStartPhase2 to index: 9
*** Phase 2: Download Ghost Objects
Mapping string: MissionStartPhase2Ack to index: 1
Ghost Always objects received.
Mapping string: MissionStartPhase3 to index: 10
common/client/missionDownload.cs (67): Unable to find function StartClientReplication
fxFoliageReplicator - replicated client foliage for 0 objects
*** Phase 3: Mission Lighting
Successfully loaded mission lighting file: 'starter.fps/data/missions/features_233f13e5.ml'
Mission lighting done
Mapping string: MissionStartPhase3Ack to index: 2
Missing spawn points group MissionGroup/PlayerDropPoints
Object 'PlayerBody' is not a member of the 'GameBaseData' data block class
starter.fps/server/scripts/game.cs (305): Register object failed for object (null) of class Player.
Set::add: Object "0" doesn't exist
starter.fps/server/scripts/game.cs (309): Unable to find object: '0' attempting to call function 'setTransform'
starter.fps/server/scripts/game.cs (310): Unable to find object: '0' attempting to call function 'setShapeName'
starter.fps/server/scripts/game.cs (313): Unable to find object: '0' attempting to call function 'setInventory'
starter.fps/server/scripts/game.cs (314): Unable to find object: '0' attempting to call function 'setInventory'
starter.fps/server/scripts/game.cs (315): Unable to find object: '0' attempting to call function 'mountImage'
starter.fps/server/scripts/game.cs (318): Unable to find object: '0' attempting to call function 'getEyeTransform'
Mapping string: MissionStart to index: 11
Mapping string: SyncClock to index: 12
CDROP: 1815 local
starter.fps/client/scripts/serverConnection.cs (163): Unable to find function clearTextureHolds
*** ENDING MISSION
Exporting server prefs...
Exporting client prefs
Exporting client config
Exporting server prefs
Exporting client prefs
Exporting server prefs
Cur. D3DDevice ref count=1
#26
02/23/2008 (12:58 pm)
I too get the error "A Copy of torque is already running"

EDIT - was the fact i didn't save the init.cs file after editing. seems to work now
#27
02/23/2008 (4:24 pm)
now I got the game to run but no character
#28
03/23/2008 (9:08 pm)
I treid the porting, I can start TGEA, but when I try to start Barebones the program crashes when the program is finished "LOADING OBJECTS" and says:

'An unhandled win32 exception occured in TGEA.exe [316]'

But the numbers in the [####] are always different.

On the Stronghold and the Lighting Demo I get the same error

'Invalid st coord in Interior::readMapTG'

reguarding the model re-exports

Anyone have an idea what i might have done wrong?
#29
04/16/2008 (8:48 pm)
This is an example of the wrong format for TGEA. Load into constructor 1.0.4 (you need the patch) export as DIF (just the first option) and try again.

here's the update
www.garagegames.com/mg/forums/result.thread.php?qt=73816
#30
04/18/2008 (3:49 pm)
TGEA 1.07 porting i think don't work...
#31
04/30/2008 (10:53 pm)
Hello,

If you want to get the basic shell of the starter.fps, you can add parts of it to tgea 1.0.1, 0.3 ect.

Open -> example\demo\client\init.cs

Comment out or remove exec("./ui/overlayDlg.gui"); and exec("./ui/MainMenuDlg.gui");

From the 1.5 starter fps, copy files from client\ui such as background.jpg, startMissionGui.gui, mainMenuGui.gui and paste those into the tgea\example\demo\client\ui directory.

This will give you the starter fps menu screen with the background and the map/mission selector. Then just load the mission editor, create a new mission and you can go from there.

If you do as I mention above, you can also remove the exec("./ui/features/features_ and so on from the demo\client\init.cs since that was for the old menu that this will replace.

This is sorta backwards from the idea above but you can add parts of the starter.fps piece by piece without breaking anything.

Chris
Page«First 1 2 Next»