Coding a random cave generator in Rust using cellular automata.
submitted 3 years ago by flush_the_turd from (self.programming)
Used this tutorial as a guide:
https://gamedevelopment.tutsplus.com/tutorials/generate-random-cave-levels-using-cellular-automata--gamedev-9664
Being new to Rust I'm sure there are many mistakes in my code.
[–]C3P0 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 0 fun2 insightful - 1 fun - 3 years ago (1 child)
Then the next step up from this would be making each node an instance of the class Node. Node has properties: position and neighbors. There are eight neighbors.
This way, you wouldn't have to exclude yourself in every check (i==0 && j==0).
[–]flush_the_turd[S] 2 insightful - 1 fun2 insightful - 0 fun3 insightful - 0 fun3 insightful - 1 fun - 3 years ago (0 children)
I'll give that a try.
use the following search parameters to narrow your results:
e.g. sub:pics site:imgur.com dog
sub:pics site:imgur.com dog
advanced search: by author, sub...
~1 user here now
Links:
[–]C3P0 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 0 fun2 insightful - 1 fun - (1 child)
[–]flush_the_turd[S] 2 insightful - 1 fun2 insightful - 0 fun3 insightful - 0 fun3 insightful - 1 fun - (0 children)