Game Development Community

dev|Pro Game Development Curriculum

PhysX in TGE Version 0.3 (Work-In-Progress)

by Shannon "ScarWars" Scarvaci · 07/03/2006 (11:35 am) · 269 comments

Outline
1. License
2. Get SDK from Ageia
3. Implementation
4. Scripts
5. Know Issues
6. Need your supports!

License:
The license of PhysX is following:
Free:
  * Commercial & non-commercial use on PC
       Must keep registration information currect
       Must agree to the EULA at the time of download (pops up, but is copied below)
       Available for Windows & Linux (soon)
       No PhysX HW support requirement
  * PS3 platform (through Sony pre-purchase)
  * All platforms through some of our middleware partnerships, such as UE3, Gamebryo 2.2,
     and others
k per platform:
  * Xbox 360
  * Fee may be waived at our discretion for multi-platform developers providing PC HW support
  * Fee may be waived at our discretion for some Tools & Middleware providers

Get SDK from Ageiq
You can obtain the SDK from www.ageia.com website, my currently version for this physics is 2.7.0.

If you are using Visual Studio then you need to add "include" and "library" in the project configuration.
(If you using linux or mac, then i don't know where to setup because I dont have linux or mac with me)
Directory for include files:
C:\Program Files\AGEIA PhysX SDK\v2.6.4\SDKs\Physics\include
C:\Program Files\AGEIA PhysX SDK\v2.6.4\SDKs\Foundation\include
C:\Program Files\AGEIA PhysX SDK\v2.6.4\SDKs\PhysXLoader\include
C:\Program Files\AGEIA PhysX SDK\v2.6.4\SDKs\Cooking\include
Directory for library files:
C:\Program Files\AGEIA PhysX SDK\v2.6.4\SDKs\lib\win32
Note: These files' path's are relative to my hard drive, your files may be in different directory depending on how you installed the PhysX SDK.

Please install AGEIA PhysX Runtime in your PC (prefered lastest version)
Also put two dll file (PhysXLoader.dll and NxCooking.dll from AGEIA PhysX SDK\v2.7.0\SDKs\Bin\win32) in the example folder.


Implementation
Copy the 17 files from "PhysX" folder into engine/PhysX and modify some TGE's source code files.

Player
in game/player.h in bold
//----------------------------------------------------------------------------

[b]struct sNxActor;[/b]
class Player: public ShapeBase
{
  typedef ShapeBase Parent;
  [b]sNxActor *mActor;[/b]
protected:
  /// Bit masks for different types of events
  enum MaskBits {

game/player.cc at the top in bold
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
[b]#include "physX/PhysX.h"
#include "physX/PhysXWorld.h"[/b]
#include "game/player.h"

game/player.cc in Player::Player() function
mMountPending = 0;

   [b]mActor = NULL;[/b]
}

game/player.cc in Player::onAdd() function
gCamFXMgr.clear();
        }

	 [b]PhysXWorld *PxWorld = PhysXWorld::getWorld(isServerObject());
	 if (PxWorld) {
		 mActor = PxWorld->AddShapeBase(this);
	 }[/b]

   return true;

game/player.cc in Player::setPosition(...)
else {
      mat.set(EulerF(0, 0, rot.z));
      mat.setColumn(3,pos);
   }
   [b]if (mActor) {
      QuatF q(mat);
      Point3F pos;
      mat.getColumn(3,&pos);
      NxQuat quat;
      quat.setXYZW(q.x,q.y,q.z,q.w);
      mActor->actor->setGlobalOrientationQuat(quat);
      mActor->actor->setGlobalPosition(NxVec3(pos.x,pos.y,pos.z));
   }[/b]
   Parent::setTransform(mat);
   mRot = rot;
}

Terrain
in terrain/terrData.cc
at the top of the file
#include "terrain/terrRender.h"
#include "terrain/blender.h"

[b]#include "physX/PhysXWorld.h"[/b]

extern bool gDGLRender;

terrain/terrData.cc in TerrainBlock::onAdd function near the end
if(!unpackEmptySquares())
                 return(false);

	[b]PhysXWorld *PxWorld = PhysXWorld::getWorld(isServerObject());
	if (PxWorld) {
		PxWorld->SetupTerrainCollision(); // old style
	}[/b]

   return true;
}

Interior
in interior/interior.h
class Interior
{
   ...
   friend class EditInteriorResource;
   [b]friend class PhysXInterior;[/b]

in interior/interiorInstance.h
class InteriorInstance : public SceneObject
{
   ...
   friend class FloorPlan;
   [b]friend class PhysXInterior;
   friend class PhysXWorld;[/b]

in interior/interiorInstance.cc
#include "platform/profiler.h"
[b]#include "physX/PhysXWorld.h"[/b]

...

bool InteriorInstance::onAdd()
{
   ...
   
   addToScene();

   [b]PhysXWorld *PxWorld = PhysXWorld::getWorld(isServerObject());
   if (PxWorld) {
      PxWorld->SetupInterior(*this);
   }[/b]
   return true;
}

TSStatic
in ts/tsShapeInstance.h
class TSShapeInstance
{
   ...
   friend class TSPartInstance;
   [b]friend class PhysXTSStatic;
   friend class PhysXActor;[/b]

in game/tsStatic.h
class TSStatic : public SceneObject
{
   ...
   friend class TSStaticConvex; 
   [b]friend class PhysXTSStatic;[/b]

in game/tsStatic.cc
#include "sim/netConnection.h"
[b]#include "physX/PhysXWorld.h"[/b]

...

bool TSStatic::onAdd()
{
   ...
   
   addToScene();

   [b]PhysXWorld *PxWorld = PhysXWorld::getWorld(isServerObject());
   if (PxWorld) {
      PxWorld->SetupTSStatic(*this);
   }[/b]
   return true;
}

ShapeBase
in game\shapeBase.h
class ShapeBase : public GameBase
{
   typedef GameBase Parent;
   friend class ShapeBaseConvex;
   friend class ShapeBaseImageData;
   [b]friend class PhysXWorld;[/b]

Material in GameBase
in game\gameBase.h
[b]struct PhysXMaterialData;[/b]
struct GameBaseData : public SimDataBlock {
   ...
   void unpackData(BitStream* stream);
   [b]// PhysX
   PhysXMaterialData* mMaterialBlock;[/b]
};
...
class GameBase : public SceneObject
{
   ...
   enum GameBaseMasks {
      InitialUpdateMask =     Parent::NextFreeMask,
      DataBlockMask =         InitialUpdateMask << 1,
      ExtendedInfoMask =      DataBlockMask << 1,
      ControlMask =           ExtendedInfoMask << 1,
      [b]//NextFreeMask =        ControlMask << 1
      // PhysX
      MaterialDataBlockMask = ControlMask << 1,
      NextFreeMask =          MaterialDataBlockMask << 1[/b]
   };
   ...

   [b]// PhysX
   bool setMaterialDataBlock(PhysXMaterialData* dptr);
   bool onNewMaterialDataBlock(PhysXMaterialData* dptr);[/b]

};
...
in game\gameBase.cc
[b]#include "physX/PhysX.h"
#include "physX/PhysXActor.h"[/b]
#include "platform/platform.h"
...
GameBaseData::GameBaseData()
{
   ...
   [b]mMaterialBlock = 0;[/b]
}
...
[b]IMPLEMENT_CONSOLETYPE(PhysXMaterialData)
IMPLEMENT_GETDATATYPE(PhysXMaterialData)
IMPLEMENT_SETDATATYPE(PhysXMaterialData)[/b]

void GameBaseData::initPersistFields()
{
   Parent::initPersistFields();
   ...
   [b]addField("materialBlock", TypePhysXMaterialDataPtr, Offset(mMaterialBlock, GameBaseData));[/b]
}
...
bool GameBase::onNewDataBlock(GameBaseData* dptr)
{
   ...
   [b]onNewMaterialDataBlock(mDataBlock->mMaterialBlock);[/b]

   setMaskBits(DataBlockMask);
   return true;
}
...
bool GameBase::setDataBlock(GameBaseData* dptr)
{
   ...
}

[b]bool GameBase::setMaterialDataBlock(PhysXMaterialData* dptr)
{
   if (isGhost() || isProperlyAdded()) {
      if (mDataBlock->mMaterialBlock != dptr)
         return onNewMaterialDataBlock(dptr);
   }
   else
      mDataBlock->mMaterialBlock = dptr;
   return true;
}

bool GameBase::onNewMaterialDataBlock(PhysXMaterialData* dptr)
{
   mDataBlock->mMaterialBlock = dptr;

   if (!mDataBlock->mMaterialBlock)
      return false;

   setMaskBits(MaterialDataBlockMask);
   return true;
}[/b]
...
U32 GameBase::packUpdate(NetConnection *, U32 mask, BitStream *stream)
{
   ...
   [b]if (stream->writeFlag((mask & MaterialDataBlockMask) && mDataBlock->mMaterialBlock != NULL)) {
      stream->writeRangedU32(mDataBlock->mMaterialBlock->getId(),
                             DataBlockObjectIdFirst,
                             DataBlockObjectIdLast);
   }[/b]

   // cafTODO: ControlMask
   return 0;
}

void GameBase::unpackUpdate(NetConnection *con, BitStream *stream)
{
   ...
   [b]if (stream->readFlag()) {
      PhysXMaterialData* dptrMD = 0;
      SimObjectId id = stream->readRangedU32(DataBlockObjectIdFirst, DataBlockObjectIdLast);

      if (!Sim::findObject(id,dptrMD) || !setMaterialDataBlock(dptrMD))
         con->setLastError("Invalid packet GameBase::unpackUpdate()");
   }[/b]
}

Scripts
Copy three script files (PhysX.cs, physXActorBox.cs and physXActorSphere.cs) in starter.fps/server/scripts and add three lines of code in starter.fps/server/scripts/games.cs

// PhysX
	 exec("./physX.cs");
	 exec("./physXActorBox.cs");
	 exec("./physXActorSphere.cs");
	 exec("./physXJoints.cs");

add one line of code in common/client/mission.cs
function clientCmdMissionStart(%seq)
{
   // The client recieves a mission start right before
   // being dropped into the game.
	[b]startPhysX();[/b]
}

and in every mission file need to add PhysXWorld as show in bold:
new SimGroup(MissionGroup) {

	 [b]new PhysXWorld() {
		errorReport = false; // set to true if you want error report from PhysX
	 };[/b]
	
	 new ScriptObject(MissionInfo) {
	 ...

If you want to testing around by droping the object in the free-look camera, then use default.bind.cs script
function addCrate(%val)
{
	if (%val)
		commandToServer('pxcrate');
}
function addBox(%val)
{
	if (%val)
		commandToServer('pxbox');
}
function addRock(%val)
{
	if (%val)
		commandToServer('pxsphere');
}

moveMap.bind( keyboard, "alt r", addCrate);
moveMap.bind( keyboard, "alt t", addBox);
moveMap.bind( keyboard, "alt y", addRock);

Know Issues
Terrain is the problem here because PhysX can accept 256x256 collision mesh in their engine which is mean squareSize equal to one! So the TGE's default squareSize is 8 and you see object will miss the collision in some area of the terrain. Possible solution is to create chunks, for example if you use squareSize of 8 then use 64 chunks of 256x256 collision mesh.

Loading the mesh of 256x256 collision will very slow but there possible solution is to write the mesh to file create by PhysX engine and read the file from PhysX will be lots faster, similar to lighting system which is used in TGE.

I've tried number of way to use Terrain collision in PhysX such as split in four section, NxHeightfield which make it very slow but I haven't tried this in PPU yet. So I have to stick with 256x256 collision mesh for a while.

Player/ShapeBase collision with PhysX's object is not complete.

Networking:
Loading objects from the begin in the remote client sometime not showing but if object appear during the gameplay will work ok. That something i need to be working on. (There may be some problem because of improved speed, but didn't test it yet)

Improved PhysX Speed
Big thank to decryptoid for helping us in PhysX, esp. for speed improvement.

Need your supports!
Now you can play with PhysX in your TGE game! If you find any improvement for this Physics in coding or script or anything please post here and I'll happy to update in here.
Also please use TDNfor any info to advise for our community

In the future:
- Run in PPU.
- Player collision.
- ShapeBase, (TSStatic and Interior - Completed) collision.
- Use advance physics such as joints, clothes and fluid. Done two type of joints

Enjoy your Physics!

Check out the video.
First Video
Second Video
Joints Video (4MB, prefer download before watch)

This is my first resource, please be kind to me :)

Due to file limit please download from here Updated 13th Apirl 2006

Here TGEA PhysX Resource here
#201
04/23/2007 (2:44 pm)
Interesting... I got a few errors in PhysXActor.cpp (something about var conversion) to fix it I did the following:
Added:
#include "ts/tsShape.h"
#include "ts/tsShapeInstance.h"
to the top of PhysXActor.cpp

Now I'm getting:
12>c:\program files (x86)\ageia technologies\ageia physx sdk\v2.7.0\sdks\physics\include\NxAllocateable.h(29) : error C2059: syntax error : 'string'
12>c:\program files (x86)\ageia technologies\ageia physx sdk\v2.7.0\sdks\physics\include\NxAllocateable.h(29) : error C2091: function returns function
12>c:\program files (x86)\ageia technologies\ageia physx sdk\v2.7.0\sdks\physics\include\NxAllocateable.h(29) : error C2802: static member 'operator new' has no formal parameters
12>c:\program files (x86)\ageia technologies\ageia physx sdk\v2.7.0\sdks\physics\include\NxAllocateable.h(30) : error C2059: syntax error : 'string'
12>c:\program files (x86)\ageia technologies\ageia physx sdk\v2.7.0\sdks\physics\include\NxAllocateable.h(30) : error C2090: function returns array
12>c:\program files (x86)\ageia technologies\ageia physx sdk\v2.7.0\sdks\physics\include\NxAllocateable.h(42) : error C2761: 'void *(__cdecl *NxAllocateable::operator new(void))(size_t,NxMemoryType)' : member function redeclaration not allowed
12>c:\program files (x86)\ageia technologies\ageia physx sdk\v2.7.0\sdks\physics\include\NxAllocateable.h(42) : fatal error C1903: unable to recover from previous error(s); stopping compilation

and I have no idea why
#202
04/23/2007 (5:36 pm)
@Mr. Pig - try put those two #include below the rest of includes? Because #include "physX/physX.h" had to call first before the rest of #include.

eg.
#include "physX/PhysX.h"
#include "ts/tsShape.h"
#include "ts/tsShapeInstance.h"

not
#include "ts/tsShape.h"
#include "ts/tsShapeInstance.h"
#include "physX/PhysX.h"
#203
04/23/2007 (6:20 pm)
Ah, thanks stupid mistake.
#204
04/23/2007 (6:23 pm)
Hmm... now I have a different problem. Physics objects won't move. I'll spawn a ball and it won't be effected by gravity. If I spawn it inside a pile of boxes the boxes don't move - they used to shoot everywhere.
#205
04/23/2007 (10:40 pm)
@Mr.Pig - is this your own coding? I'm not too sure but I think something to do with PhysXActor::interpolateTick()? What code you have changed?
#206
04/24/2007 (5:00 am)
I don't think I changed anything. I'll re-copy all your code over my current PhysX directory but I just did that - maybe I commented something out by mistake. If not - I'll look into it for you.

If you have any contact info like AIM it may prove helpful.
#207
04/24/2007 (8:16 am)
@Mr. Pig - the problem is quite puzzle to me. :D Did you use latest PhysX version 2.7.0 and installed latest PhysX runtime program? Also make sure use 2.7.0's dll (PhysXLoader.dll and NxCooking.dll ) files in your example folder. Then do full re-compiled and see how it go.
#208
04/24/2007 (8:19 am)
I will try it when I get back in the office.
#209
04/24/2007 (1:34 pm)
I copied all your code over and it still fails to apply gravity. Any ideas?

[Edit]
Fixed it; I found that a line of code was "missing" and added it - it worked then I redownloaded the zip and the line of code was there. I think I got it corrupted.

All good!
#210
04/24/2007 (2:47 pm)
On network play the clients lag... no interpolation of PhysX?
#211
04/28/2007 (6:34 pm)
@Mr.Pig - I tried network on remote client with interpolation and object doesn't move, so remove interpolation and now it move but lagging, if you have better coding in interpolation pls post :D

I have small hours per week on this physX because of my work. We will beat this interpolation problem soon :D
#212
04/28/2007 (7:23 pm)
How did the guys with the ODE resource solve this?
#213
04/28/2007 (9:04 pm)
I'll look into it if I get a chance to. It's not at the top of my list atm however.
#214
06/26/2007 (10:51 am)
The TGEA.exe keep crashing or saying I have the wrong verison dll how do I fix this?
#215
06/26/2007 (10:53 am)
Make sure you copied the Cooking DLL and Loader DLL from the bin directory of the PhysX source version you are using.
#216
07/29/2007 (10:37 am)
I have tried to follow your instructions ... but it won't work, I guess there are modifications to make while working on a Mac ?!?
#217
08/24/2007 (9:38 am)
ok got a repeating error.

installed PhysX SDK
Installed Runtimes

Intigrated the resource, corrected a few pathing issues in files for includes

but no matter what i do i cannot seem to get engine to compile, pukes in this error:

fatal error C1083: Cannot open include file: 'NxPhysics.h': No such file or directory (Line Number 30)

Probably just missed something or a step somewhere.

Any help would be appreciated.
#218
08/24/2007 (1:00 pm)
ok fixed that problem but getting a whole bunch of small errors. But i am working threw them one at a time to get them fixed.
#219
09/10/2007 (8:35 pm)
Roland make sure you create a physx folder in your vc++ project, with your files. I know after I did this it fixed a bunch of linker errors, that I was getting. Also remember to set your include and lib directories.
#220
09/19/2007 (10:31 am)
I've got a problem with this resource.
Everything compiles fine and then when I start the game and load the mission torque crashes. This is my log:
//-------------------------- 9/19/2007 -- 18:59:07 -----
Processor Init:
AMD (unknown), ~2.00 Ghz
(timed at roughly 2.00 Ghz)
FPU detected
MMX detected
3DNow detected
SSE detected

Math Init:
Installing Standard C extensions
Installing Assembly extensions
Installing FPU extensions
Installing MMX extensions
Installing 3DNow extensions
Installing SSE extensions

Input Init:
keyboard0 input device created.
mouse0 input device created.
DirectInput enabled.

Initializing chunk mappings...
o 'TEXT' maps to TextChunk
o 'SCHK' maps to UnknownChunk
o 'SCHK' maps to SimChunk
--------- Loading MODS ---------
Loading compiled script starter.fps/main.cs.
Loading compiled script common/main.cs.
Loading compiled script starter.fps/client/defaults.cs.
Loading compiled script starter.fps/server/defaults.cs.
Missing file: starter.fps/client/prefs.cs!
Missing file: starter.fps/server/prefs.cs!
Loading compiled script creator/main.cs.
Loading compiled script common/main.cs.

--------- Parsing Arguments ---------

--------- Initializing MOD: Common ---------
Loading compiled script common/client/canvas.cs.
Loading compiled script common/client/audio.cs.

--------- Initializing MOD: FPS Starter Kit ---------
Loading compiled script starter.fps/client/init.cs.
Loading compiled script starter.fps/server/init.cs.
Loading compiled script starter.fps/data/init.cs.
Loading compiled script starter.fps/data/terrains/grassland/propertyMap.cs.
Loading compiled script starter.fps/data/interiors/propertyMap.cs.

--------- Initializing MOD: FPS Starter Kit: Server ---------
Loading compiled script common/server/audio.cs.
Loading compiled script common/server/server.cs.
Loading compiled script common/server/message.cs.
Loading compiled script common/server/commands.cs.
Loading compiled script common/server/missionInfo.cs.
Loading compiled script common/server/missionLoad.cs.
Loading compiled script common/server/missionDownload.cs.
Loading compiled script common/server/clientConnection.cs.
Loading compiled script common/server/kickban.cs.
Loading compiled script common/server/game.cs.
Loading compiled script starter.fps/server/scripts/commands.cs.
Loading compiled script starter.fps/server/scripts/centerPrint.cs.
Loading compiled script starter.fps/server/scripts/game.cs.

--------- Initializing MOD: FPS Starter Kit: Client ---------
Loading compiled script starter.fps/client/ui/customProfiles.cs.
Loading compiled script common/client/message.cs.
Loading compiled script common/client/mission.cs.
Loading compiled script common/client/missionDownload.cs.
Loading compiled script common/client/actionMap.cs.
Video Init:
Accelerated OpenGL display device detected.
Accelerated D3D device detected.
Voodoo 2 display device not detected.

Activating the OpenGL display device...
Activating the OpenGL display device...
Setting screen mode to 800x600x32 (w)...
Creating a new window...
Acquiring a new device context...
Pixel format set:
32 color bits, 24 depth bits, 8 stencil bits
Creating a new rendering context...
Making the new rendering context current...
OpenGL driver information:
Vendor: NVIDIA Corporation
Renderer: GeForce 6600/PCI/SSE2
Version: 2.1.1
OpenGL Init: Enabled Extensions
ARB_multitexture (Max Texture Units: 4)
EXT_blend_color
EXT_blend_minmax
EXT_compiled_vertex_array
NV_vertex_array_range
EXT_texture_env_combine
EXT_packed_pixels
EXT_fog_coord
ARB_texture_compression
EXT_texture_compression_s3tc
(ARB|EXT)_texture_env_add
EXT_texture_filter_anisotropic (Max anisotropy: 16)
WGL_EXT_swap_control
OpenGL Init: Disabled Extensions
EXT_paletted_texture
3DFX_texture_compression_FXT1

Loading compiled script common/ui/defaultProfiles.cs.
Loading compiled script common/ui/ConsoleDlg.gui.
Loading compiled script common/ui/LoadFileDlg.gui.
Loading compiled script common/ui/ColorPickerDlg.gui.
Loading compiled script common/ui/SaveFileDlg.gui.
Loading compiled script common/ui/MessageBoxOkDlg.gui.
Loading compiled script common/ui/MessageBoxYesNoDlg.gui.
Loading compiled script common/ui/MessageBoxOKCancelDlg.gui.
Loading compiled script common/ui/MessagePopupDlg.gui.
Loading compiled script common/ui/HelpDlg.gui.
Loading compiled script common/ui/RecordingsDlg.gui.
Loading compiled script common/ui/NetGraphGui.gui.
Loading compiled script common/client/metrics.cs.
Loading compiled script common/ui/FrameOverlayGui.gui.
Loading compiled script common/client/messageBox.cs.
Loading compiled script common/client/screenshot.cs.
Loading compiled script common/client/cursor.cs.
Loading compiled script common/client/help.cs.
Loading compiled script common/client/recordings.cs.

OpenAL Driver Init:
OpenAL
Vendor: Creative Labs Inc.
Version: 1.1
Renderer: Software
Extensions: EAX EAX2.0 EAX3.0 EAX4.0 EAX5.0 EAX3.0EMULATED EAX4.0EMULATED AL_EXT_OFFSET AL_EXT_LINEAR_DISTANCE AL_EXT_EXPONENT_DISTANCE

Loading compiled script starter.fps/client/scripts/audioProfiles.cs.
Loading compiled script starter.fps/client/ui/defaultGameProfiles.cs.
Loading compiled script starter.fps/client/ui/PlayGui.gui.
Loading compiled script starter.fps/client/ui/ChatHud.gui.
Loading compiled script starter.fps/client/ui/playerList.gui.
Loading compiled script starter.fps/client/ui/mainMenuGui.gui.
Loading compiled script starter.fps/client/ui/aboutDlg.gui.
Loading compiled script starter.fps/client/ui/startMissionGui.gui.
Loading compiled script starter.fps/client/ui/joinServerGui.gui.
Loading compiled script starter.fps/client/ui/loadingGui.gui.
Loading compiled script starter.fps/client/ui/endGameGui.gui.
Loading compiled script starter.fps/client/ui/optionsDlg.gui.
Loading compiled script starter.fps/client/ui/remapDlg.gui.
Loading compiled script starter.fps/client/ui/StartupGui.gui.
Loading compiled script starter.fps/client/scripts/client.cs.
Loading compiled script starter.fps/client/scripts/game.cs.
Loading compiled script starter.fps/client/scripts/missionDownload.cs.
Loading compiled script starter.fps/client/scripts/serverConnection.cs.
Loading compiled script starter.fps/client/scripts/playerList.cs.
Loading compiled script starter.fps/client/scripts/loadingGui.cs.
Loading compiled script starter.fps/client/scripts/optionsDlg.cs.
Loading compiled script starter.fps/client/scripts/chatHud.cs.
Loading compiled script starter.fps/client/scripts/messageHud.cs.
Loading compiled script starter.fps/client/scripts/playGui.cs.
Loading compiled script starter.fps/client/scripts/centerPrint.cs.
Loading compiled script starter.fps/client/scripts/default.bind.cs.
Missing file: starter.fps/client/config.cs!
Binding server port to default IP
UDP initialized on port 0

--------- Initializing: Torque Creator ---------
Loading compiled script creator/editor/editor.cs.
Loading compiled script creator/editor/particleEditor.cs.
Loading compiled script creator/scripts/scriptDoc.cs.
Loading compiled script creator/ui/creatorProfiles.cs.
Loading compiled script creator/ui/InspectDlg.gui.
Loading compiled script creator/ui/GuiEditorGui.gui.
Loading compiled script creator/ui/lightEditor.gui.
Loading compiled script creator/ui/lightEditorNewDB.gui.
Engine initialized...
*** Load Main Menu
Exporting server prefs...
Loading compiled script starter.fps/server/scripts/audioProfiles.cs.
Loading compiled script starter.fps/server/scripts/envAudioProfiles.cs.
Loading compiled script starter.fps/server/scripts/camera.cs.
Loading compiled script starter.fps/server/scripts/markers.cs.
Loading compiled script starter.fps/server/scripts/triggers.cs.
Loading compiled script starter.fps/server/scripts/inventory.cs.
Loading compiled script starter.fps/server/scripts/shapeBase.cs.
Loading compiled script starter.fps/server/scripts/item.cs.
Loading compiled script starter.fps/server/scripts/environment.cs.
Loading compiled script starter.fps/server/scripts/health.cs.
Loading compiled script starter.fps/server/scripts/staticShape.cs.
Loading compiled script starter.fps/server/scripts/weapon.cs.
Loading compiled script starter.fps/server/scripts/radiusDamage.cs.
Loading compiled script starter.fps/server/scripts/crossbow.cs.
ParticleEmitterData(CrossbowBoltEmitter) velocityVariance > ejectionVelocity
Error: shape starter.fps/data/shapes/crossbow/ammo.dts-collision detail 0 (Collision-3) bounds box invalid!
Loading compiled script starter.fps/server/scripts/environment.cs.
Loading compiled script common/server/lightingSystem.cs.

//-----------------------------------------------

Loading light datablocks from: common/lighting/lights/*.dso
Loading compiled script common/lighting/lights/sgTowerFireLightDataBlock.cs.
Loading compiled script common/lighting/lights/sgTempleWindowStaticPSDataBlock.cs.
Loading compiled script common/lighting/lights/sgTempleTorchStaticPSDataBlock.cs.
Loading compiled script common/lighting/lights/sgTempleSmallWindowStaticPSDataBlock.cs.
Loading compiled script common/lighting/lights/sgSpotSwingStaticDataBlock.cs.
Loading compiled script common/lighting/lights/sgSpotDataBlock.cs.
Loading compiled script common/lighting/lights/sgSpot2DataBlock.cs.
Loading compiled script common/lighting/lights/sgRedLightDataBlock.cs.
Loading compiled script common/lighting/lights/sgMountLight.cs.
Loading compiled script common/lighting/lights/sgLanternPSDataBlock.cs.
Loading compiled script common/lighting/lights/sgGooDataBlock.cs.
Loading compiled script common/lighting/lights/sgFirePitStaticPSDataBlock.cs.
Loading compiled script common/lighting/lights/sgFirePitPSDataBlock.cs.
Loading compiled script common/lighting/lights/sgDynamicFireDataBlock.cs.
Loading compiled script common/lighting/lights/sgDefaultLightDataBlock.cs.
Loading compiled script common/lighting/lights/sgBlueLightDataBlock.cs.
Loading compiled script common/lighting/lights/CottageLight.cs.

Loading light datablocks from: common/lighting/lights/*.cs
Loading compiled script common/lighting/lights/sgTowerFireLightDataBlock.cs.
Loading compiled script common/lighting/lights/sgTempleWindowStaticPSDataBlock.cs.
Loading compiled script common/lighting/lights/sgTempleTorchStaticPSDataBlock.cs.
Loading compiled script common/lighting/lights/sgTempleSmallWindowStaticPSDataBlock.cs.
Loading compiled script common/lighting/lights/sgSpotSwingStaticDataBlock.cs.
Loading compiled script common/lighting/lights/sgSpotDataBlock.cs.
Loading compiled script common/lighting/lights/sgSpot2DataBlock.cs.
Loading compiled script common/lighting/lights/sgRedLightDataBlock.cs.
Loading compiled script common/lighting/lights/sgMountLight.cs.
Loading compiled script common/lighting/lights/sgLanternPSDataBlock.cs.
Loading compiled script common/lighting/lights/sgGooDataBlock.cs.
Loading compiled script common/lighting/lights/sgFirePitStaticPSDataBlock.cs.
Loading compiled script common/lighting/lights/sgFirePitPSDataBlock.cs.
Loading compiled script common/lighting/lights/sgDynamicFireDataBlock.cs.
Loading compiled script common/lighting/lights/sgDefaultLightDataBlock.cs.
Loading compiled script common/lighting/lights/sgBlueLightDataBlock.cs.
Loading compiled script common/lighting/lights/CottageLight.cs.
Loading complete.
//-----------------------------------------------


//-----------------------------------------------

Loading light datablocks from: common/lighting/filters/*.dso
Loading compiled script common/lighting/filters/test.cs.

Loading light datablocks from: common/lighting/filters/*.cs
Loading compiled script common/lighting/filters/test.cs.
Loading complete.
//-----------------------------------------------

Loading compiled script starter.fps/server/scripts/player.cs.
Loading compiled script starter.fps/data/shapes/player/player.cs.
Validation required for shape: starter.fps/data/shapes/player/player.dts
Loading compiled script starter.fps/server/scripts/chimneyfire.cs.
Loading compiled script starter.fps/server/scripts/aiPlayer.cs.
Validation required for shape: starter.fps/data/shapes/player/player.dts
Loading compiled script starter.fps/server/scripts/sgExamples.cs.
ParticleEmitterData(RealFireBigEmitter) thetaMax > 180.0
Loading compiled script starter.fps/server/scripts/physX.cs.
Loading compiled script starter.fps/server/scripts/physXActorBox.cs.
Loading compiled script starter.fps/server/scripts/physXActorSphere.cs.
Loading compiled script starter.fps/server/scripts/physXJoints.cs.
*** LOADING MISSION: starter.fps/data/missions/phys_test.mis
*** Stage 1 load
*** Stage 2 load
Executing starter.fps/data/missions/phys_test.mis.

***PHYSX*** - Starting Physx System
***PHYSX*** - Setting up system....
***PHYSX*** - Found Server World
***PHYSX*** - Getting Server Materials...
***PHYSX*** - Adding Server Material - 'pxInteriorMaterial'
***PHYSX*** - Adding Server Material - 'pxTerrainMaterial'
***PHYSX*** - Adding Server Material - 'pxMaterialBox'
***PHYSX*** - Adding Server Material - 'pxMaterialSphere'
***PHYSX*** - Added Legacy Terrain on Server
***PHYSX*** - for this object.....
***PHYSX*** - Added 1 Hulls out of 1 Total
***PHYSX*** - with 6 surfaces and 24 vertices
***PHYSX*** - **Done with interior**
Unable to load interior: starter.fps/data/interiors/docks/ggdock.dif
starter.fps/data/missions/phys_test.mis (0): Register object failed for object (null) of class InteriorInstance.
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxCrate1'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxAirCrate'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPole'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPole'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPole'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPole'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPole'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPole'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPole'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPole'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPole'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPole'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPole'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPole'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxEndPlank'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPlank'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPlank'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPlank'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPlank'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPlank'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPlank'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPlank'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPlank'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPlank'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPlank'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPlank'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPlank'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPlank'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxJointPlank'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
***PHYSX*** - Adding Server Actor - 'pxEndPlank'
***PHYSX*** - Physx (PhysxActor) 'mass' set to 20.000000
***PHYSX*** - Physx (PhysxActor) 'material' set to pxMaterialBox
*** Mission loaded
Connect request from: IPX:2F736B69:65732F736B79:25695
Connection established 1618
CADD: 1619 local
*** Sending mission load to client: starter.fps/data/missions/phys_test.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:  Fresh Meat to index: 7
Mapping string: MissionStartPhase1 to index: 8
*** New Mission: starter.fps/data/missions/phys_test.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!
Could not locate texture: starter.fps/data/shapes/player/base.lmale
Could not locate texture: starter.fps/data/shapes/player/base.lmale
Could not locate texture: starter.fps/data/shapes/player/crossbow
Could not locate texture: starter.fps/data/shapes/player/clip
Validation required for shape: starter.fps/data/shapes/player/player.dts
Could not locate texture: starter.fps/data/shapes/player/base.lmale
Could not locate texture: starter.fps/data/shapes/player/base.lmale
Could not locate texture: starter.fps/data/shapes/player/crossbow
Could not locate texture: starter.fps/data/shapes/player/clip
Validation required for shape: starter.fps/data/shapes/player/player.dts
Mapping string: MissionStartPhase2 to index: 9
*** Phase 2: Download Ghost Objects