Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Capricornum · May 23, 2019 at 01:34 PM · performancelistscardscollections

Too many Lists?

Dear Community,

this might not be the right place to ask this question. If so, I apologize. I don't know my way around the coding community and didn't know where else to ask.

In my game I have a world. Within the world I have a list of teams. Within every team I have a list of team members.

Every world also has a few different Card Decks. Those are comprised of lists for the deck itself and the graveyard.

In addition every team member (and that's up to 30) has lists for their card decks. Again those are comprised of the cards in their hand, their deck, their graveyard.

And it goes on with other collections like cards to buy etc. You get the picture.

I don't know how many lists I will end up with. But definitely a lot. Now it says that lists are not as good as arrays. I could be using arrays but it would be so much more difficult for me (being a beginner) to take care of sorting, adding and deleting.

So what I am asking is this: Do I need to worry about having say 1000 lists? Should I build my decks, and teams and members differently?

It's probably difficult to say. Nonetheless I'd be grateful for a hint. Thank you.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image TreyH · May 23, 2019 at 01:53 PM 0
Share

I imagine it's probably a little hard to read, but are you experiencing any sluggish behavior now or is this just curiosity / proactive?

avatar image Capricornum TreyH · May 23, 2019 at 03:45 PM 0
Share

I was just curious / worried. So far behavior is fine.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by tormentoarmagedoom · May 23, 2019 at 02:11 PM

I'm not sure, and I'm not an expert at all.... but:

I think the problem its not the number of lists, the problem is, its a list of what?

I mean, storing lists of integrers or strings is not a problem. But lists of prefabs its another dimension, much more bigger.

But also having lists is not a problem for performance. What can slow performance is to be reading multiple list constantly at same time. If you are smart to make the game to not beeing reading and writing multiple list each frame, i think you will have no problem

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Capricornum · May 23, 2019 at 03:47 PM 1
Share

It's mostly lists of integers. And also so far I am not reading from many of them simultaneously. You've helped in cal$$anonymous$$g me down. Thank you sir!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

125 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

List/Array should handle another List/Array - Upgrade System - Performance 1 Answer

How do I swap two gameObjects order in a list? 2 Answers

Performance and memory 1 Answer

How do I add new instances of a object into a list? 1 Answer

Performance question - Loading large-ish amounts of text data in a mobile game? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges