Author Topic: How are you handling Serialization with Unity3D?  (Read 20366 times)

Offline x4000

  • Chris Park, Arcen Games Founder and Lead Designer
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,225
Re: How are you handling Serialization with Unity3D?
« Reply #45 on: October 11, 2011, 04:42:48 PM »
To be clear: the AI War unit IDs can get into the millions or hundreds of millions very easily since they aren't reused.  The actual count of units active at any given time tends to remain below 100k.  Think this would still fit in the model you're thinking, Hearteater?  I expect it will based on what you said, but just wanted to make the full parameters of our use case clear. :)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Hearteater

  • Core Member
  • *****
  • Posts: 2,334
Re: How are you handling Serialization with Unity3D?
« Reply #46 on: October 12, 2011, 09:34:44 AM »
Yeah, it should work fine.  Memory is only used for active IDs.  Once you delete an ID from the Trie, it uses no more memory.  And the actual values of individual IDs has no (practical) bearing on the total memory footprint of the Trie itself.  I dug through my data structures library and I don't have my Trie implementation there, so tonight I'll boot up my old laptop and see if I left it on that.

I'm curious, what data structure do you use to look up IDs currently?

Offline x4000

  • Chris Park, Arcen Games Founder and Lead Designer
  • Administrator
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,225
Re: How are you handling Serialization with Unity3D?
« Reply #47 on: October 12, 2011, 10:02:15 AM »
Right now, in AI War, it's a generic dictionary with int key and ForegroundObjecet value.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!