Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / 3D Space Map Question . How do I store and detect location of 3D ojects ?

Author
Message
Newbie5UK
20
Years of Service
User Offline
Joined: 13th Nov 2004
Location:
Posted: 9th Feb 2006 21:36
Hi, you have probably gathered I am writing a space sim. However I am stuck on how to store 3D objects so that they appear when co-ordinated are approached. I guess I want to map out the solor system or a galaxy, but how do I store and make sure the planets are always in the same place.

Any guidance much appreciated. BTW I have no map as such as I have a background and just want 3D objects seperately in the forground..

THx
Classic Evil
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: watching you through your window
Posted: 9th Feb 2006 22:37
I had an idead for a space sim sort of. I called it The Sims: Sci Fi
expansion pack. Just watch I garentee they will make this. Any way you could use a method were you write all the cordinates into a file then read that file later.

There are two types of people in this world: people who are extremly cool and are good at everything and people who are me.
Newbie5UK
20
Years of Service
User Offline
Joined: 13th Nov 2004
Location:
Posted: 9th Feb 2006 22:48
I guesss that's how it could be done, the co-ordinates plus planet details. Not sure how to d othat though, or what format to have the data in. The tricky bit would be detecting the range etc. that the planet woudl then be visibile. Probably basic stuff to a more experienced programmer, to me it would seem to mean loads of "IF" statements... anyone else got any ideas ?
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 9th Feb 2006 23:06
You make it sound complicated. It's just X/Y/Z. The camera has a built in visible range which you can change. So just get the sizes of the planets right at they will automatically become visible at the right time. You also have a light range, so that your suns can give out accurate light. There is nothing difficult about this. It was the first 3D game I ever made with DB Classic, and I made it in about 3 weeks.

Classic Evil
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: watching you through your window
Posted: 9th Feb 2006 23:11
exactly.
just use a command like this

etc...

There are two types of people in this world: people who are extremly cool and are good at everything and people who are me.
Newbie5UK
20
Years of Service
User Offline
Joined: 13th Nov 2004
Location:
Posted: 10th Feb 2006 10:46
Thx, understand using the Z-axix but that woudl mean effectively displaying ALL the galaxy and relying on a deep enough 3D SkyBox. In amking the Galaxy too large the texture on the sky box gets stretched too much and doesn't look realistic.

As far the the code extract, how woudl I implement that ?

Arrays ? storing position, size, etc of planets ?

Bit confused with how the last two posts relate.

Forgive me I'm a newbie...

Login to post a reply

Server time is: 2025-05-23 12:35:27
Your offset time is: 2025-05-23 12:35:27