1. ## Creating a galaxy!

Hi folks.

For a game that's been on the shelf for a couple of years now, I need to build a Galaxy and store the points and revolution data. I'm pretty much fine with everything, but I am certainly no mathematician and I'm struggling building a sensible looking galaxy. Maybe there is no such thing as a sensible galaxy, but I'm not getting what I need.

A galaxy is far more congested towards the centre, a more dense proportion of starts/matter. For this I've tried building in rings and segments, but it's ether obvious there are rings, or I have distance problems. The distance problems being, there must be a minimum and maximum distance between suns, without this the game mechanics can't work. When I populate the centre portion of a galaxy I end up with a very structured look as I have to create a coordinates then check every other sun to make sure the distance is ok, it looks horrible.

As the radius grows the maximum and minimum distance can grow as well, as players progress longer journeys between stars will be possible. But again it all looks too ordered.

I basically have a bunch of variables describing an area where to try placing a star, then a load of checking to make sure it's ok. But my variables and the calculations are nothing like neat and tidy. If I'm creating 50,000 suns, planets for each sun, moons for each planet, rocks in each solar system I end up with a database of millions of records. My last test took 14 hours to complete. This isn't a huge problem, but I can't help thinking I'm not being very efficient.

I can't go the Elite Dangerous way, I can't generate on the fly as I have to store loads of data against each sun and planet.

Does anyone have some code that will plot suns in a galaxy? A couple of calculations describing how to plot a galaxy? Any advice on how to plot a galaxy? Anyone eaten a galaxy?!

Any tips would be very welcome.

Many thanks.

2. ## Re: Creating a galaxy!

This is not a VB.NET question. This is a maths question. This site has a maths forum. I have asked the mods to move this thread. Once you have the maths worked out, then you can look at implementing it in whatever language you like.

3. ## Re: Creating a galaxy!

https://stackoverflow.com/questions/...on-of-a-galaxy

4. ## Re: Creating a galaxy!

Thread moved to the 'Maths' forum

Originally Posted by Clancey
Anyone eaten a galaxy?!
I've eaten many of them over the years, they have a lovely creamy taste

(for those who don't know, Galaxy is a brand of chocolate)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

Featured