Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#Actualnfactorial

Posted 14 June 2013 - 11:24 AM

You should only ever need to store two object states, the 'previous' and the 'current'. Where the 'previous' is the last concrete snapshot taken from the server and the 'current' is the extrapolated local calculation. You don't go into details about what is contained in your state information, but I would recommend a flat array of structures rather than a list of objects. Structs in c-sharp are value types and thus should be a lot less heavy on the garbage collector.

 

[edit] pretty much what hplus says above.

 

n!


#1nfactorial

Posted 14 June 2013 - 11:23 AM

You should only ever need to store two object states, the 'previous' and the 'current'. Where the 'previous' is the last concrete snapshot taken from the server and the 'current' is the extrapolated local calculation. You don't go into details about what is contained in your state information, but I would recommend a flat array of structures rather than a list of objects. Structs in c-sharp are value types and thus should be a lot less heavy on the garbage collector.

 

n!


PARTNERS