Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Lumos · Nov 11, 2013 at 03:15 PM · gameobjectgridunitshexsquare

Managing thousands of entities (for an RTS-like game)?

Greetings. I'm trying to set up a grid for something like an RTS I'm trying to develop. Thing is, we know Unity has got a limit on the about of GameObjects it can support, so using GameObjects for the terrain tiles is impossible - I shall be needing large game boards with sizes of potentially 500x500 tiles, and maybe even more.

This made me look at the LineRenderer as a possible solution, but I seem to be failing at the first step there, experiencing the same problems as this user from a long time ago. And even if I'd managed to do that, I've got no idea how I would have tackled tracking the thousands of units (and probably terrain types) meant to occupy these tiles.

In any case, what I am wondering is what the best way to do this is. GameObjects are out of the equation; and the LineRenderer doesn't look good. Please, dear Unity experts, help me out.

Oh, and, if it isn't completely obvious, I'm using the Unity Indie version.

Thanks in advance for your time and for helping me out in my time of need.

Comment
Add comment
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

1 Reply

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

Answer by dorpeleg · Nov 11, 2013 at 03:36 PM

Just have one big plane made of 500x500 quads.

Then, using a script, you can change the UV's for each quad (as long as all your "terrain types" are in one big atlas (similar to minecraft, only flat).

There is no game that hold thousands of units, unless they are groups and in that case, every group will be a game object.

Comment
Add comment · Show 3 · 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 Lumos · Nov 11, 2013 at 04:49 PM 0
Share

Thank you. Now, this would be a perfect solution if:

  • I can get the UVs for each quad after changing them. Can I do that? I need to know what terrain type is currently in use after all.

  • I can procedurally generate the mesh, because I'd like to use game boards of variable sizes. I am guessing that this is possible. Is it really?

avatar image dorpeleg · Nov 12, 2013 at 08:14 AM 0
Share

It should be possible to get the UVs of each quad. Getting the UVs after changing might be a bit hard (but I think possible). You might want to think about storing each quads info (UVs or whatever) during the creation and not after.

Procedurally generated mesh is defiantly possible and also not very hard once you get the hang of it.

avatar image Lumos · Nov 12, 2013 at 12:46 PM 0
Share

Fantastic. I'll go along with this approach then, and hopefully I'll manage not to screw up. Thanks a lot for the information.

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

17 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

Related Questions

Transform does not move GameObject 1 Answer

Modular hexagon terrain 0 Answers

Grid Increment by Rotation 2 Answers

Creating an Object with a string C#! How? 1 Answer

Change mesh to to GameObject 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