Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 16 Mar 2013
Offline Last Active Mar 21 2013 03:55 PM

Posts I've Made

In Topic: How to efficiently handle game objects in a client server model on the host s...

17 March 2013 - 05:24 PM

So yes, this is pretty much how real games do it. It's always been the case that whoever hosts the game is expected to have the more powerful machine.


I was thinking along these lines as well. Old IPod Touch is weak. Its not my fault. Once I move onto even "decent" hardware, I shouldn't have any performance problem concerning this issue. But then I thought, well my game is simple now, so the objects don't need much memory. What if I moved onto more powerful hardware, and created a more complicated game, and my objects each required more memory now, and there were more objects. So is it wrong to assume that moving on to better hardware, you will never deal with this problem again? Then I was thinking what if I worked on Uncharted for Naughty Dog? You know they literally try to maximize every ounce of resource they have, and I concluded, they are probably not doubling up the data.

You can make the messaging more efficient by just passing the messages by reference and ignoring all the serialisation and networking


Message serialization speed actually was a performance problem when the client and host were the same. I fixed it back then, and am still using the same fix, which is pretty much what you describe in that I don't actually serialize the messages, but have the objects references intact. I have a concept of a network pipe vs a local pipe which routes messages via serialization, and the local pipe doesn't actually do any serialization in its implementation.


client objects and server objects are usually quite different, both in terms of the data they store and in how they act (eg. interpolated positions for client objects).


I haven't thought about this so much, because I'm using Unity as my game framework. It uses the concept of prefabs so if I had a character prefab made up of components like animation and physics as well as any other components. I haven't thought through how to cleanly create a client and server version of the prefab. If would be a maintenance nightmare. You wouldn't think that a animation component is needed on the server side of things since its all "visual", but I need it since animation can trigger events based on specific events, and my game logics uses events a lot to run the actual game.

In Topic: How to efficiently handle game objects in a client server model on the host s...

16 March 2013 - 10:47 PM

Ok cool. Sounds like a good plan to move forward to. I just need to rework some of my code now so it fits better by this design.