Galaxy generation

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
ericthered
Posts: 11
Joined: Mon Apr 05, 2010 3:36 pm

Galaxy generation

Post by ericthered »

Hello everyone. I am new to irrlicht, but I am already contemplating its many uses. :)

I've decided to begin a little hobby project. My long-term goal is to create a space simulator. None of the trade-and-shoot stuff, though; the main goal will be exploration and charting a large galaxy. If you've played anything like Noctis, you know what I'm talking about.

As for my short-term goal, I need to generate the galaxy, complete with different types of stars, gas giants, habitable worlds, etc etc. I'm not an analytical thinker, so I really have no idea where to start.

Noctis' source code has been released, but I can't seem to find it. It seems to have the ideal system-- a galaxy of 80 billion stars and yet a program a little over 1 MB in size!

Are there any ideas on how to go about this? Algorithms I should know? I have a fairly firm grasp of C/C++, so no worries there.

I understand that it may take a year or two to even get the semblance of a universe up and running, but I'm willing to put in the work. This is, after all, a hobby.

:D
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Re: Galaxy generation

Post by randomMesh »

Here's a similar project. Maybe you can get some ideas.
"Whoops..."
ericthered
Posts: 11
Joined: Mon Apr 05, 2010 3:36 pm

Re: Galaxy generation

Post by ericthered »

randomMesh wrote:Here's a similar project. Maybe you can get some ideas.
Thank you. :)

I think it would be good for me to go into more detail about what sort of universe I want to generate. There needs to be some "guidelines" in place to get this thing put together. Here are a few to start:

-Planets and stars not to scale (planets will be approx. 200 km x 200 km). This is so that the player can explore a planet outside the spacecraft in less than a lifetime.

- Set number of planet types

- Set number of star types

- Simple Newtonian physics; no complex orbital mechanics. While I do not want to diminish the "seriousness" of the simulator, I want it geared towards exploration, not orbital maneuvers. I intend for the mothership to be run mostly by autopilot anyway, and this can be manipulated to give the illusion of a more complex physics engine. :twisted:

- "Landable" planets will not be merely flat, but will have at least some degree of terrain rendering.

- Set number of space anomalies, eg black holes and what have you.


Again, this may take years to piece together, but it's always good to start with goals in mind.
kjkrum
Posts: 26
Joined: Wed Oct 29, 2003 5:34 pm

Post by kjkrum »

There have been some interesting threads about modeling planet surfaces. Unfortunately I didn't bookmark them... search should turn them up.

If scientific accuracy isn't one of your goals, I wouldn't even bother with Newtonian physics. Make the orbits circular and be done with it.

The part that sounds fun to write would be a LOD system that's based on apparent magnitude. It wouldn't be feasible to calculate the apparent magnitude for every star in the galaxy every time your vantage point changes, but you could probably get away with only testing stars over a certain absolute magnitude. Perhaps you could pre-render views of the galactic plane at different distances from the center and use those as your background/sky-sphere...
lymantok
Posts: 67
Joined: Mon Dec 31, 2007 6:13 am

Post by lymantok »

Hi,

Great topic. Several areas for you to investigate:

1. Galaxy generation. Some great ideas here on how to do it procedurally if you want a huge galaxy to explore. http://jongware.com/galaxy1.html

2. Planet generator. Generates realistic solar systems. Accrete source code can be found here: http://www.projectrho.com/smap07.html
Just scroll down a little to find it. There is also a program called Star Gen there although, Accrete is more realistic in my opinion.

3. Tarzan02 has a cool irrlichtelite project here. It a trade/fight game, but he has some interesting planetary landing/lod code. http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=21175

4. There is also great work from MasterD here: http://irrlicht.sourceforge.net/phpBB2/ ... light=yass

Finally, as I recall UncleBob on this forum was working on a 2d/3d starmap navigator although I've lost track of that project now.

Have fun!
lymantok
Posts: 67
Joined: Mon Dec 31, 2007 6:13 am

Post by lymantok »

BTW, never played Noctis, but found this link in a simple search for Noctis source code: http://anynowhere.com/bb/posts.php?t=409&p=2

There are lots of Noctis related downloads at the link above.
Post Reply