Multiple CharacterControllers On Xbox
Posted: Wed Jan 05, 2011 7:01 pm
Hey, so the game I am making is a multiplayer game where you and other players will be running around in an environment and be able to throw items (just a few spheres). Each player is using their own instance of the CharacterController class from the most recent demo to handle movement and physical interaction. Everything is fine and dandy with a single player where I get 60 FPS. If I add 4 players and all they are just standing in the spot I spawned them at, the game starts to struggle with 55 - 60 FPS. If all four players start touching or interacting with each other, the game's FPS goes down to 20-25. I dont even want to think about what the game will do if they are all touching and throwing things. Note that it only has this much issue on the Xbox. When I run the game on my computer, I get 60 FPS regardless.
I have already added multiple threads with this:
space.ThreadManager.AddThread(information => Thread.CurrentThread.SetProcessorAffinity(new[] { 1 }), null);
space.ThreadManager.AddThread(information => Thread.CurrentThread.SetProcessorAffinity(new[] { 3 }), null);
space.ThreadManager.AddThread(information => Thread.CurrentThread.SetProcessorAffinity(new[] { 5 }), null);
space.UseMultithreadedUpdate = true;
and I dont know that it is important, but this is the constructor I use for the CharacterController class for each player:
physicalCharacter = new CharacterController(Vector3.Zero, 4.5f, 2f, 100f, .9f, .01f, .04f);
Is there anything else I can do to help speed this game up?
I have already added multiple threads with this:
space.ThreadManager.AddThread(information => Thread.CurrentThread.SetProcessorAffinity(new[] { 1 }), null);
space.ThreadManager.AddThread(information => Thread.CurrentThread.SetProcessorAffinity(new[] { 3 }), null);
space.ThreadManager.AddThread(information => Thread.CurrentThread.SetProcessorAffinity(new[] { 5 }), null);
space.UseMultithreadedUpdate = true;
and I dont know that it is important, but this is the constructor I use for the CharacterController class for each player:
physicalCharacter = new CharacterController(Vector3.Zero, 4.5f, 2f, 100f, .9f, .01f, .04f);
Is there anything else I can do to help speed this game up?