We've found planets!!!

Today I wrote a little bit of code to search through a random infinite universe and find locations of planets. I still need to check that these planet areas are big enough to hold the planets as calculated but they should be based on the calculations used to comprise what level for planet existence is used.

In the screenshot we've found a planet that has a radius of 52,765,002 blocks and a block is 1 meter. According to google the earth has a radius of 6.371 million meters . That makes this planet ~8 times larger than earth. I guess the next step is to search for earth sized planets. Currently there are no solar systems or stars just simply planets. Those may come later. 

Also there is a taste of my development environment for this game and some of the code. You can see there a stack based flood-fill search of the universe. The code does not take long to execute the search and it looked through 54,705 adjacent planet sized areas before it found one that contained a planet. I tried to make the likelihood 1 in 1000.

Whats cool is that given the same master seed we get the same universe. I really love procedurally generated worlds and creating one is extremely exciting. There are a lot of things to do though, and also to figure out. It is a challenging endeavor. Especially how am I going to render the whole planet from a distance without generating all the blocks since that would literally take "for-ever". I dunno but I'll think of something...

Stay tuned...

Leave a comment

Log in with itch.io to leave a comment.