EagleEye
16-04-2006 22:28:58
I had not encountered this behavior previously, because I had not had my network code completed... and all item data is on the server, and is sent to the client upon "entering the world".
However, now that all that's done, I'm getting packets of data really quickly (each packet defines an item in the world, in this case the ogre head, its location and orientation... each packet is only 400 bytes or so)...
All of these items are being added to the world in rapid succession... and when that happens, I can no longer change my pitch/yaw/roll of my character/camera node...
The ORIENTATION of my character changes (I know this because I send orientation update packets to the server, and I see them coming in... and it is, indeed, changing!) But the view on my screen just locks up looking at the same area...
I can still see the clouds flowing by in my skydome, so rendering isn't locked up... it's still rendering frames, hitting the "onFrameStarted" and "onFrameEnded" subs...
So I decided to remove the server stuff and test it locally...
I created a For loop that creates 200 Ogre Heads and adds them to the world.
It seems that if I add all the items BEFORE the scene renders initially, everything is fine... I get 200 ogre heads on my screen.
If I wait until the scene is rendered, THEN add them (like having the adding of the items being triggered by a mouse click), then I experience the problem.
My thinking is that somehow an internal ogre thread is being overloaded and causing it to abort... possibly having to do with scenenode updates or something... I'm not sure about the internal workings of Ogre...
Right now, I'm not creating the scenenodes separately... I"m doing:
So the nodes are being created as subnodes of the main "worldnode" (which is the same as "Scene.GetRootSceneNode" in my program)...
I will TRY just creating the nodes then adding them later... but for now this is what I have.
However, now that all that's done, I'm getting packets of data really quickly (each packet defines an item in the world, in this case the ogre head, its location and orientation... each packet is only 400 bytes or so)...
All of these items are being added to the world in rapid succession... and when that happens, I can no longer change my pitch/yaw/roll of my character/camera node...
The ORIENTATION of my character changes (I know this because I send orientation update packets to the server, and I see them coming in... and it is, indeed, changing!) But the view on my screen just locks up looking at the same area...
I can still see the clouds flowing by in my skydome, so rendering isn't locked up... it's still rendering frames, hitting the "onFrameStarted" and "onFrameEnded" subs...
So I decided to remove the server stuff and test it locally...
I created a For loop that creates 200 Ogre Heads and adds them to the world.
It seems that if I add all the items BEFORE the scene renders initially, everything is fine... I get 200 ogre heads on my screen.
If I wait until the scene is rendered, THEN add them (like having the adding of the items being triggered by a mouse click), then I experience the problem.
My thinking is that somehow an internal ogre thread is being overloaded and causing it to abort... possibly having to do with scenenode updates or something... I'm not sure about the internal workings of Ogre...
Right now, I'm not creating the scenenodes separately... I"m doing:
With Item
Nodes.Add(WorldNode.CreateChildSceneNode(.Position, .Orientation), .ItemName)
Entities.Add(Scene.CreateEntity(.ItemName, .Mesh & ".mesh"), .ItemName)
Nodes.Item(.ItemName).AttachObject(Entities.Item(.ItemName))
End With
So the nodes are being created as subnodes of the main "worldnode" (which is the same as "Scene.GetRootSceneNode" in my program)...
I will TRY just creating the nodes then adding them later... but for now this is what I have.