Game Development Community

TSE's FxFoliage Replicator Doesn't Work Networked

by J.C. Smith · in Torque Game Engine Advanced · 04/26/2006 (12:29 pm) · 22 replies

I gave details on this bug when it was still in bounty form, way back when. When I did people seemed stumped, but I just checked it again today with a fresh build, using the FxFoliage Replicator from head, on two different maps and the same bug has occured.

The foliage displays perfectly when you are running the client and server in one, by starting a mission for example. If you try to join a server though, the foliage does not display to any of the clients. It spits out an error message to the console that it could not find a suitable position for the foliage.

I've tried this with two different maps, and I've pasted datablocks that work perfectly in TGE straight into TSE and just changed the position to match the Atlas terrain, and this bug happens to me every time.
Page «Previous 1 2
#1
04/26/2006 (3:08 pm)
The only reason it wouldn't be networking is if you aren't replicating it properly... which is all handled by one little command: StartFoliageReplication();

If you look at your TGE scripts versus TSE Scripts, then thats probably a difference, somewhere around the beginning of Mission Lighting phase/end of Phase 2.
#2
04/26/2006 (7:53 pm)
That all happens in common/client/missiondownload.cs. I diffed the files, and they are identical. Anyone should be able to test this using starter.fps, it works as server, but does not as client.
#3
04/27/2006 (12:29 am)
As youre using Starter.Fps, I'm not sure what to tell you. The only problem I had was the missing StartFoliageReplication line and with that added, I don't recall any network grass issues... I will do some checking tomorrow and see if there is anything else that I fixed or what it was
#4
04/27/2006 (1:58 am)
It definately is a bug. I just used a fresh MS3 install, and a fresh starter.fps to make sure. Works fine server side, but not client side. If anyone finds a fix for this please let me know.

On a side note I just tested the fixed shapereplicator and it has the same issues. It works client side, does not work networked.
#5
05/01/2006 (11:45 pm)
Noticed the same thing. So is this a bug in general, or is it a bug in the starter.fps?
#6
05/29/2006 (2:20 pm)
Any progress? Anybody?
#7
05/30/2006 (2:34 am)
I actually spent a day or two trying to get it running,never could figure it out.
#8
06/02/2006 (3:27 am)
Hm, I never realised that one (never loaded a mission on another client). I have to test it. I will see, what I can do...
#9
06/06/2006 (10:25 am)
I'll try to get a peek at this sometime this week and let you all know. The TSE FxFoliageReplicator didn't change any of the network code that existed in the TGE version. So they should work the same in that area.
#10
06/06/2006 (11:17 am)
Yeah it's pretty odd. I've diffed them and scrounged hard to try to figure out what the problem is and always came up empty.
#11
06/06/2006 (11:19 am)
Glad there's continued interest. It sort of puts the kabosh on my own project right now - at least when it comes to demoing it multiplayer.
#12
07/10/2006 (9:47 am)
Has anyone tried putting some breakpoints in the debugger and seeing where/how the replicator code is getting called, and what might be failing? It shouldn't take more than an hour or two to track down exactly what is missing on the dedicated client.
#13
07/10/2006 (10:47 am)
I keep meaning to do that but never get around to it. I'm highly dependent on the FxFoliageReplicator but so far haven't had to do anything multiplayer. Seems like it has to be something simple - something just not being called on the client side to register/init/draw/something.
#14
07/21/2006 (11:09 pm)
My game is a single player game.I am running the server and client on the same system.
I want my tree shape to get replicated. How to do that. I am placing this block in my Mission file and the tree model is in the specified path.But even though i do not find any replication.Any help pls.


new fxShapeReplicator() {
position = "773.95 703 100.4";
rotation = "1 0 0 0";
scale = "1 1 1";
HideReplications = "0";
ShowPlacementArea = "1";
PlacementAreaHeight = "25";
PlacementColour = "0.400000 0.000000 0.800000 1.000000";
shapeFile = "~/data/shapes/trees/FTREE04.DTS";
Seed = "235225523";
ShapeCount = "10";
ShapeRetries = "100";
InnerRadiusX = "0";
InnerRadiusY = "0";
OuterRadiusX = "70";
OuterRadiusY = "70";
AllowOnTerrain = "1";
AllowOnInteriors = "0";
AllowOnStatics = "0";
AllowOnWater = "0";
AllowWaterSurface = "0";
AlignToTerrain = "0";
Interactions = "0";
AllowedTerrainSlope = "90";
TerrainAlignment = "1 1 1";
FixShapeAspect = "0";
ShapeScaleMin = "1 1 1";
ShapeScaleMax = "1 1 1";
ShapeRotateMin = "0 0 0";
ShapeRotateMax = "0 0 180";
OffsetZ = "-3";
};
#15
07/23/2006 (6:05 am)
Dose this properties change totally for TSE if so could any one give a example
#16
08/17/2006 (10:52 pm)
Since TSE MS4 is right around the corner, I figured I'd follow up on this. Has this been fixed?
#17
08/21/2006 (12:52 pm)
It's not been looked at yet. It's on my shortlist of bugs, but it's not critical for MS4. Anyone else taken a look at it? Should just be a missing script call, or something just not being sent to the client in the object itself.
#18
08/21/2006 (12:54 pm)
This should be piece of cake, especially if you're a skilled programmer.
#19
08/22/2006 (10:11 pm)
That comes off sounded condascending Stefan. But definately it's a problem that seems like it should be something small, after all it is working fine if running a client and server on same box, but it never works client side only. It is trying client side but it's failing to find a suitable position. Why? No clue. I've gone back to this on three different occasions and couldn't figure out why it was happening, got frustrated after a day or so and moved on to other things on the to-do list.

It isn't anything in script though. I went through all of the old fxfoliage replicator code, and did things from scratch, script is fine. It's likely in fxfoliagereplicator.cpp but I did try a number of differnet things and never had any progress. Obviously with regards to GG, I'd much rather see the MS4 ready to go than holding up on anything like this, but with MS4 shipping I am preparing a client for the port from TGE to TSE, figured I'd ask before I went back and spent any more time on this, since it has already bested me on a couple of earlier occassions.
#20
08/23/2006 (11:14 am)
I did some more experimenting this morning on this and was able to get it to work clientside without any issues it seemed. It looks like everything does get replicated properly, but the StartFoliageReplication() is getting called before gClientContainer may have proper references to everything.

For our codebase, we just moved the StartFoliageReplication call -

function onMissionDownloadComplete()
{
   // Client will shortly be dropped into the game, so this is
   // good place for any last minute gui cleanup.

  schedule(1000, 0, "StartFoliageReplication");
}


It causes the foliage to "pop" into view, but its possible to make changes to cause it to fade in properly more than likely. In any case, it at least narrows down the issue and that is a decent workaround to make sure it is handled on the client at the proper time
Page «Previous 1 2