Jump to content
  • Advertisement
Sign in to follow this  
shawnre

To Infinity and Beyond!! (XNA 3D Universe Question)

This topic is 3748 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all, I recently started trying to break out of the 2-D shell I have been huddled in for the past year or so with XNA (really no other expericence in 3-D anywhere else either). In trying to EASE myself into 3-D, I decided to start with a simple project (or maybe not that simple). I am making a "universe" using just primitives as "stars". I have a class for a Camera and a class for a Star. In the main Game class, I was just going to create a List of star objects and allow for the camera to basically fly around for now (eventually I would like to maybe add some planet models, but have not read on how to do models yet, like I said, starting slowly). Anyhow, the list of stars of course will be random locations spread around. What I am confused with is, how to make this a "infinite" universe. I figured my stars can all have different X and Y positions and was thinking of the Z as just a flat plane...but how do you provide for infinity then? Do you continuously create stars and add to the list? If you want to maintain, for example, the universe you have "flown" by, I could see that list getting very large. How does one handle that?

Share this post


Link to post
Share on other sites
Advertisement
If you're using randomly placed stars, you can create a list of stars for a "region" based on a unique random number seed, perhaps generated from the "origin" of that "region." When that region is "out of sight," you can throw away the list and, if needed again, use the same random number seed to regenerate the list.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!