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 /
This question was closed Apr 20, 2013 at 09:54 PM by Eric5h5 for the following reason:

Duplicate Question

avatar image
0
Question by Legnar · Apr 20, 2013 at 09:50 PM · performancerandomvoxelminecraftperlin

Perfomance Issue With Minecraft Clone.

Trying to make a basic minecraft clone, or a cube world. To do this i am using a perlin noise 2d function to set the height of the individual cubes, works great but i have a giant problem with the framerate, if i make the world any bigger than 100x100 my framerates drops trough the roof. It seems like the gameobjects is a massive resource hog. How can i fix or improve this. Thank you! :)

Script:

 void PerlinFunction ()
     {
         
         PerlinNoise perlin = new PerlinNoise(Random.Range(0,800));//Perlin function seed
         
         for (int x = 0 ; x <100; x++)//Size of the world(x,z)
         {
             
             for (int z = 0 ; z <100; z++)//Size of the world(z)
             {
 
                 int yvalue = (int)perlin.FractalNoise2D(x,z,1,48,16);//Gets a random pelin value,used as the y size
                 GameObject cube = Instantiate(prefabgrass, new Vector3(x, yvalue, z), Quaternion.identity) as GameObject;//Instantiates a new cube at location x,PERLINNOISE,z
                     
             }
             
         }
             
     }

Looks like this:

alt text

terrain.jpg (309.5 kB)
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 Loius · Apr 20, 2013 at 09:53 PM 0
Share

most existing unity $$anonymous$$ecraft questions answer this already

avatar image Eric5h5 · Apr 20, 2013 at 09:55 PM 1
Share

Please do a search; this has been discussed to death. In short, don't use separate GameObjects for each voxel, that's ridiculously inefficient.

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

13 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

Related Questions

Minecraft kind visibility render 1 Answer

Minecraft block placing/ block building - how to? 2 Answers

Minecraft strater package in JS 0 Answers

Question about slideScrolling Voxels 0 Answers

Texture mapping procedural mesh with texture atlas? (Minecraft style terrain gen) 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