Answer the question
In order to leave comments, you need to log in
Generating 2d terrain in unity How to implement?
Good afternoon. I am developing a game with children. And the question arose about generating the world.
As a matter of fact, there were questions.
To begin with, what we have and what we want.
1) There are terrain generation textures (example below), they all consist of blocks.
Questions
1.1) It doesn’t really dawn on me how to make the generation in unity so that it rests on a fragment of the level square
. new generation.
that is, as a class system in inheritance. Nooo how to do it. With what help I don’t know.
1.2) When the character reaches a certain square, then a save zone is created, so to speak. And 3 squares to the right of him and 3 squares to the left of him will be saved. (so to speak, they are saved forever and we will be able to return there in the future) the rest of the squares are newly created will continue to be generated.
For what it is necessary I can explain if necessary.
Answer the question
In order to leave comments, you need to log in
What a noble job you have. It will be commendable if children grow up to be real game developers. :)
And at the expense of generation - look towards the Square-Diamond algorithm. I think this is exactly what will help you.
Related links :
https://habrahabr.ru/post/111538/
https://habrahabr.ru/post/249027/
https://habrahabr.ru/post/226635/ will generally help you understand the mechanics.
https://habrahabr.ru/post/128368/
And here my good friend and former colleague built a small craft. Perhaps this will be useful to you too. :)
www.gamedev.ru/projects/forum/?id=181167
Ask for additions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question