Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating random tile map world generation
    text
    copied!<p>so after searching I've found only Java and C++, and I'm fond of and only know .net enough to complete my project. We're creating a random tile generating map (think terraria/flat minecraft kinda thing) and after creating almost all of the materials and a bunch of other code in Unity I've realized I can't quite figure this out (and know next to nothing about perlin and can't figure it out, so examples would be appreciated.)</p> <p>I started in .net (MS VS) splitting the screen space into pieces I called parcels that are 32x32 and created a loop to fill it. But we're using Unity as it's already a game engine and aren't sure how to accomplish this.</p> <p>First there's the different sprites the map must be made of, I already created classes and coded lists of what must go into what height but I don't know how to generate all random terrain out of nothing, since the world would need to be random and created before the player sees anything.</p> <p>I tried a mesh but it uses too much memory looping the way it does; I also tried a plane and filling it with textures, but couldn't get the randomization right and then of course it's a flat object with images and not blocks that can be interacted with.</p> <p><strong>My direct question: How do we generate a world made of thousands of intractable tiles (we have a limit in mind already for both X &amp; Y) out of random tiles that is in 2D space in C#?</strong> (Either strict C# or something that can be imported into Unity, similar to the games I mentioned already.)</p> <p>Thanks in advance for any advice, hope I gave enough information. I know this is all about procedural generation and probably perlin noise algorithms, but neither of us know about those nor know where to start.</p> <p><strong>Edit:</strong> I was asked to give more information, so far I've been using for loops to create both single and chunks of random tiles. Using an IList to store what's gone where so as it's generating nothing overlaps. (I don't know a <em>better</em> way to do this.)</p> <p>Both methods work great until I star passing about 150 blocks, then it simply locks up and has to be crashed. I've tried it without the list system thinking that data was the cause, it's not. I've tried using Tidy Tile Mapper in Unity, but the same problem exists once you pass about 200 tiles. I can't find the correct way to create objects the player can interact with without clogging memory.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload