Game Development Community

Path Shape for TGEA 1.8.2 Having some problems...

by Sérgio Massa · in Torque Game Engine Advanced · 11/17/2009 (11:32 am) · 13 replies

Hello, in advance I'd like to thank Stefan Moises for his pathshape resource. Ive got a project deadline for next monday and its been really helpful. Here's the deal. I'm generating a pre-made path in the form of a spiral, in order to get input and path static objects to the top to form a christmas shape as the user inputs letters. I've got the logic preety much setup for that, and i've ported the Path Shape resource to the best of my ability, and it apparently works except for a glitch with the shape mesh itself. Apparently it paths fine, if I go into the mission editor I can see the object marker pathing for ever around the path as intended, but the mesh itself dissappears after a few seconds, and sometimes isnt synced with the marker. If someone could point me in the right direction I would greatly appreciate it, as I need to get this running with great urgency.

I've ported the path shape resource to TGEA 1.8.2.

I've uploaded the engine files and the script file to:
http://www.cappen.com/sergio/pathShape.zip

Thank you in advance,
Sérgio Massa

#1
11/17/2009 (2:43 pm)
hi Sergio,
actually i was the person that did the pathshape port for TGEA.
I think you are losing sync due to the network limit.
Go to pref.cs and change the limits :
$pref::Net::PacketRateToClient = "32";
$pref::Net::PacketRateToServer = "32";
$pref::Net::PacketSize = "450";

Also check this thread:
www.garagegames.com/community/resources/view/17149

And this one:
www.garagegames.com/community/resources/view/18215
#2
11/17/2009 (2:51 pm)
Thanks man, i tried setting up the network limit, still have an elf launcher going :p its losing sync halfway thru the path. I didnt find your port before, I might have messed something up or missed adding something required, i'm going to give it a try with yours. And thank you for the help. Ill post back when i have something.

EDIT: nm =p
#3
11/17/2009 (3:13 pm)
Picasso.. I tried switching the port I was using for the one you linked. Still have the same problem. Could i be messing something up in the setup?

Are you in IRC right now?

Thanks,

Sérgio Massa
#4
11/17/2009 (3:38 pm)
hmmm,may be it's a scoping issue.
Sergio,try to insert that method (just for a test):

F32 PathShape::getUpdatePriority(CameraScopeQuery *camInfo, U32 updateMask, S32 updateSkips)
{
   return 10.0f;
}

in the header file use this declaration:

F32  getUpdatePriority(CameraScopeQuery *focusObject, U32 updateMask, S32 updateSkips);
#5
11/17/2009 (3:42 pm)
okay.. give me a couple minutes, ill post back in a sec.
#6
11/17/2009 (4:09 pm)
Picasso... Some things came up here with another project for this same client, i'll have to pick this up tomorrow. I will post here for sure though. I emailed you as well with my work email.

Thank you very much, and I appreciate the attention. Ill post tomorrow the results from this, im also trying a vanilla instalation of 1.8.1 just to make sure that isnt the issue. Ill report as soon as i have something.

Thanks,
Sérgio
#7
11/18/2009 (9:39 am)
Hello... I tried to get a vanilla tgea, version 1.8.1 to match the resource, stock scripts except for the path generation. Now the mesh wont even move. The LoopingShape moves around when i open the editor to look at nodes, but the mesh will just stand still. Im starting to think might be something with my version. Would there be any chance of you uploading somewhere for me a compiled version of pathshape where it works for you? 1.8.1 or 1.8.2, so that I might see if the problem could be with the source code integration.

Thank you,
Sérgio Massa
#8
11/18/2009 (9:58 am)
Yeah, tried it with an executable that Shaderman sent to me, its the same as mine, problem must be with the amount of nodes I have, only explanation.

Thanks everyone for the help. I'm going to look for an alternate, simpler solution, deadline is creeping up on me, can't afford any more time, appreciate everything.
#9
11/18/2009 (10:35 am)
I have never tested this code with so many markers.
I saw your script,you are a creating the markers in a spiral form,so there is nothing wrong.

In the pathshape constructor,you can use this:

mState = Forward;
I think this will solve the move issue.

But actually i can not help with the sync,because these problems will take more time.The best way is to test the positions tick by tick and print the debug information to console.
#10
11/18/2009 (12:42 pm)
Yeah picasso.. I actually did that. The position is updating perfectly. Its just that the mesh itself won't move with the object. It is extremely strange.

Again, i am very grateful for all the assistance,

Thank you,
Sérgio Massa
#11
11/18/2009 (10:14 pm)
I am getting a similar result with the pathShape implementation for Torque 3D. In World Editor mode I am able to watch the object marker trace around my path as expected, however the mesh is nowhere to be seen.

(I am out of my office but I think I know the reason for mine. I am using a plane and my material is only one sided. I will try again with more geometry in my pathShape)
#12
11/19/2009 (10:58 am)
hi everyone,
today i reproduced the bug.
It turned out to be a stock bug in Torque at all.
I used the pathed camera class,i created 3 markers and let the camera cycle along them.
After 15-16 cycles the camera will lose the handle.

So it seems that is a bug not only in the pathshape class.
It is a bug with every one object that deals with paths.
I will look to solve this one,any suggestions are appreciated.
So far i think this is problem of the packet transmission.
#13
11/19/2009 (12:11 pm)
Ok,found it.
in the header file we should use a lower value for NodeWindow:

NodeWindow = 20

As we know there is limit into the packet transmision,it leads to out of memory range in bitstream.
I don't know why GG have increased this to 128,because it is impossible to be used over 45 even on a paper.
This should be a part in pathshape.h too.