Let's for instance say you want to make a simple 2d runner game where the distance between each block must differ by a slight bit (we are not going to ho into pooling because that is a whole new topic on its own).
You would need to calculate a random number between lets say 2 and 3 (so the gap between each platform will differ a max of 1 meter(3 Unity units)) and then just spawn each platform accordingly.
The random numbers can be called by using the 'Mathf' function. Go and have a look at the Mathf functions, there are a lot neat functions you can use.
But now of course there are lots of variables that makes a procedural game random and exciting and all of them needs to be taken into account in order to make the game fun. Things like height differnce, lenght of platform, how often certain platforms spawn etc.
I went a bit over board, but do you see how fast things can get complicated on such simple example. Not even to mention the game mechanics that needs to be implemented. So if you plan on making a procedural game make sure that you civer all bases to ensure a fun and exciting game.
I'd upload a example now, but currently on my phone. I will try and upload you an example tonight, but no promises. If you have any questions just ask
Post by Red Moon Entertainment on Feb 16, 2017 14:04:55 GMT
Well, to be honest, when I created the thread, I wasn't planning to make a procedural game but, now I'm curious and I think I can make maybe a scene in my game that could be procedural. However, thanks for reply
Feb 16, 2017 14:04:55 GMT
-I CRI EVRI TIEM-
A Steam user talking about Life Is Strange
Shoutbox is not guest accessible anymore! If you still want to view or chat in it, please, login or register!
3dradboards.org is always secure!
-- We help others to find their answers and to show their possibilities! --
Be a part of the community today!
"You are always welcome!"