Game Development Community

Polysoup TGE 1.5.2

by Eric Smith · in Torque Game Engine · 03/15/2009 (2:40 am) · 14 replies

I'm using TGE 1.5.2 because Im using MMOKIT and MMOKIT doesnt work worth a crap with TGEA... yet. But I want to add polysoup to my game. I found the download from the Merry Christmas post and put it in, got the opcode to compile. But I dont have "gfx/gfxDevice.h" which I assume is part of TGEA so my project wont compile. The closest Ive found is a file on the forums Polysoup1_5_2.zip but the link is broken.

Does anybody else have this file or know a solution to my problems? Thanks!

#1
03/15/2009 (3:26 am)
Polysoup would be a great feature in TGE1.5.2.
#2
03/16/2009 (10:10 pm)
You will have to remove all the references to GFX if you want it to compile properly. If it is complaining about gfx/gfxDevice.h then it is not compiling correctly. If you post the exact error text it is possible we can help you.
#3
03/16/2009 (10:11 pm)
Also - if you are copying files directly over one another lots of stuff will break. You will need to use a merge tool to get all the changes over. If you don't have a programming background you may be out of luck on this one. :(
#4
03/16/2009 (11:20 pm)
Well, I understood the post to be that it was a copy and paste jobber. Then I thought about the "A little merging" part and went duh. So I started over. Merged the opcode changes. Added the opcode proj to my workspace, compiled it. Opcode_D.lib and Opcode.lib show up. Can compile game and opcode, but linker wont link. Have path to lib in additional lib paths and lib in additional dependencies. libs are there. Linker finds them (I think), but cant find the functions inside them. I even put the lib paths in the Project Directories. I hex viewed the libs and could find no reference of the functions it cant find within the libs. Stumped.

Thanks for answering.
#5
03/18/2009 (7:18 pm)
Cool, sounds like you're on the right track. What functions is it saying it can't find?
#6
03/21/2009 (11:01 am)
13>tsMesh.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TSMesh::buildPolyListOpcode(int,class AbstractPolyList *,class Box3F const &)" (?buildPolyListOpcode@TSMesh@@UAE_NHPAVAbstractPolyList@@ABVBox3F@@@Z)
13>tsMesh.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TSMesh::castRayOpcode(class Point3F const &,class Point3F const &,struct RayInfo *)" (?castRayOpcode@TSMesh@@UAE_NABVPoint3F@@0PAURayInfo@@@Z)
13>tsShapeInstance.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TSShapeInstance::ObjectInstance::buildPolyListOpcode(int,class AbstractPolyList *,unsigned int &)" (?buildPolyListOpcode@ObjectInstance@TSShapeInstance@@UAE_NHPAVAbstractPolyList@@AAI@Z)
13>tsShapeInstance.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TSShapeInstance::MeshObjectInstance::castRayOpcode(int,class Point3F const &,class Point3F const &,struct RayInfo *)" (?castRayOpcode@MeshObjectInstance@TSShapeInstance@@UAE_NHABVPoint3F@@0PAURayInfo@@@Z)
13>tsShapeInstance.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TSShapeInstance::MeshObjectInstance::buildConvexOpcode(class MatrixF &,int,class Box3F const &,class Convex *,class Convex *)" (?buildConvexOpcode@MeshObjectInstance@TSShapeInstance@@UAE_NAAVMatrixF@@HABVBox3F@@PAVConvex@@2@Z)
13>tsShapeInstance.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TSShapeInstance::ObjectInstance::castRayOpcode(int,class Point3F const &,class Point3F const &,struct RayInfo *)" (?castRayOpcode@ObjectInstance@TSShapeInstance@@UAE_NHABVPoint3F@@0PAURayInfo@@@Z)
13>tsShapeInstance.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TSShapeInstance::ObjectInstance::buildConvexOpcode(class MatrixF &,int,class Box3F const &,class Convex *,class Convex *)" (?buildConvexOpcode@ObjectInstance@TSShapeInstance@@UAE_NAAVMatrixF@@HABVBox3F@@PAVConvex@@2@Z)
#7
03/21/2009 (11:10 am)
And this is compiling the Opcode:

Compiling...
cl : Command line warning D9035 : option 'QIfist' has been deprecated and will be removed in a future release
StdAfx.cpp
Compiling OPCODE
Compiling on Windows...
Compiling with VC++...
Compiling...
cl : Command line warning D9035 : option 'QIfist' has been deprecated and will be removed in a future release
IceUtils.cpp
IceTriangle.cpp
IceSegment.cpp
IceRevisitedRadix.cpp
IceRay.cpp
IceRandom.cpp
IcePoint.cpp
IcePlane.cpp
IceOBB.cpp
IceMatrix4x4.cpp
IceMatrix3x3.cpp
IceIndexedTriangle.cpp
IceHPoint.cpp
IceContainer.cpp
IceAABB.cpp
OPC_Picking.cpp
OPC_SweepAndPrune.cpp
OPC_BoxPruning.cpp
OPC_TreeCollider.cpp
OPC_SphereCollider.cpp
Generating Code...
Compiling...
OPC_RayCollider.cpp
OPC_PlanesCollider.cpp
OPC_OBBCollider.cpp
OPC_LSSCollider.cpp
OPC_AABBCollider.cpp
OPC_VolumeCollider.cpp
OPC_Collider.cpp
OPC_TreeBuilders.cpp
OPC_OptimizedTree.cpp
OPC_MeshInterface.cpp
.\OPC_MeshInterface.cpp(230) : warning C4353: nonstandard extension used: constant 0 as function expression. Use '__noop' function intrinsic instead
OPC_Common.cpp
OPC_AABBTree.cpp
Opcode.cpp
OPC_Model.cpp
.\OPC_Model.cpp(145) : warning C4353: nonstandard extension used: constant 0 as function expression. Use '__noop' function intrinsic instead
OPC_HybridModel.cpp
OPC_BaseModel.cpp
Generating Code...
Linking...
Creating library ..\out.vc7.win32.debug\opcode/../Opcode_D.lib and object ..\out.vc7.win32.debug\opcode/../Opcode_D.exp
Embedding manifest...
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 8.00.50727
Copyright (C) Microsoft Corporation. All rights reserved.

Results


Build log was saved at "file://c:\tmmokit\source152\lib\out.vc7.win32.debug\opcode\BuildLog.htm"
Opcode - 0 error(s), 4 warning(s)
#8
03/21/2009 (11:50 am)
I merged everything with a //OPCODE POLYSOUP!. The function bodies are there. And I cant find those three functions anywhere in the Opcode sourcebase.
#9
04/01/2009 (1:11 pm)
Hey Eric,

Back from GDC. The functions you are missing should have been in the .cpp files in the archive. Are you sure you merged everything properly? If you look at the linker errors, it is telling you exactly which functions are missing - they are 3space functions and doing a quick grep in the files from the archive should find them.

Ben
#10
04/02/2009 (2:18 pm)
Hey Ben,

Thanks for replying and WB from GDC. I figured out my problem... and its actually pretty stupid. When I initially merged, I didn't realize that your files are .cpp. TGE 152 files are .cc. So at first when I just copy and pasted, those files were in there except I didn't do the .h files. So I merged those and went through and THOUGHT I did the .cc files as well but actually merged into files that weren't part of the project. Even though I have it merged and can compile now and run it, loading a zone asserts that tsStatic objects already exist. FIXED: There was an additional addToScene().

Anyway, for those using a merge program like Beyond Compare, rename Bens .cpp files to .cc files before you merge into TGE 152 or you'll be scratching your noggin like Ive been.
#11
04/03/2009 (8:18 am)
IT WORKS! Only one problem. When you place a shape and toggle usepolysoup, it works. When you save and then load, it doesnt work anymore even though usepolysoup is still toggled true. If you go into the mission inspector and click the shape, then polysoup starts working again for that object. Have you heard of this problem?
#12
04/04/2009 (8:44 pm)
Glad you got it working! I don't know about that one. Probably time for a step through with the debugger. :)
#13
04/04/2009 (9:06 pm)
Yea I did. I know where the problem is. The trouble is I dont know what to do to fix it.

In TSStatic::unpackUpdate, on load, mShapeInstance doesnt exist at this point so mUsePolysoup never gets toggled at load time until you go into the editor and click it. By that time, mShapeInstance exists. /shrug

// OPCODE_POLYSOUP!
   bool usePolysoup = stream->readFlag();
   if ( mShapeInstance )
   {
	   if ( usePolysoup && !mUsePolysoup )
	   {
		   mUsePolysoup = true;
		   prepCollision();
	   }
	   else if ( !usePolysoup && mUsePolysoup )
	   {
		   mUsePolysoup = false;
		   prepCollision();
	   }
   }
   // OPCODE_POLYSOUP!
#14
04/04/2009 (10:29 pm)
Nevermind. I came up with a hack to fix it. Seems to be working fine now! Thanks for all your help! Issue closed.