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 / reallistic star fields?

Author
Message
Joe Cooning
22
Years of Service
User Offline
Joined: 29th Mar 2003
Location: United States
Posted: 29th Oct 2003 16:35
I'm trying to make a realistic star field for a game. Very similar to that of the ones on star wraith. I've tried several things, but the results aren't as desirable as I'd like. If you know any ways to better accomplish this, and/or software that may help, that would be much appriciated. Thanx!

"The greatest oxymoron . . . ever, 'Microsoft Works'."
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 30th Oct 2003 02:11
do you mean, you want it too look real or you want it to act real?

If you want it to act real, you need to add a paralax to it. You need closer stars to apear to be moving against a distant star background.


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Epsilon
21
Years of Service
User Offline
Joined: 30th Jul 2003
Location: North West, UK
Posted: 30th Oct 2003 02:17
Anyone know how to do a parallax for a space game plz post because i sure could do with the code on how u do it.
Arkheii
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 30th Oct 2003 02:36
But, parallax is for 2D right? SW is 3D. In 3D, can't you just make white plains that are unaffected by ambient light and faded to 200 or something and always face the player, then scatter them around? That way, as the camera moves so do the stars.

Or are you really making a 2D game?
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 30th Oct 2003 03:33
Hmm, no, and yes...

For the paralex in 2D, you'd make the background 2 Planes, one of which would move slightly everytime you rotated the character, the other one would remain fixed.

The one that rotates you would be able to see through (to see the one behind) not too sure if you can do that with planes, mabey just make it an image that has black as transparency...

Then, that way, you get the paralax effect when you turn the character...

There are many different ways you can accomplish the same thing, so just experiment...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
Epsilon
21
Years of Service
User Offline
Joined: 30th Jul 2003
Location: North West, UK
Posted: 1st Nov 2003 15:28
How do you do this effect in 3D?
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 2nd Nov 2003 04:43
Exactly the same way...

Parallex is when a closer object appears to be moving compared to more distant objects...
It's like when your in a car, and you look out the window and you see in the very far distance huge hills covered in trees (this would be your distant star background) and then, about half way between you and the hills are a few houses or possibly some more trees or something (this would be the closer stars) and these trees/houses appear to be moving sideways infront of the hills don't they? It looks like the hils are stationary but the houses are moving. But, when the car stops, it looks like the houses have stoped moving (the stars appear to stop moving) Whcih means that the Parrelex effect was only due to you, the person in the car, moving.
Of course, you know that the houses weren't moving, but in space it is ALOT harder to tell what is moving and what isn't therefore you set up a parallex like that, which has closer stars moving across the screen as your player moves and distant stars staying stationary.

Hope That Helped...

PS sorry i didn't post it in code, because i personally don't know how to do it, but i know the principles behind it all...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
JNC
21
Years of Service
User Offline
Joined: 29th Nov 2003
Location:
Posted: 1st Dec 2003 12:04
Why don't you try to create multiple "Sky Globes/Sky Domes" eache having a set of unique star maps, each with an alpha/opacity/transparency maps (this would allow the "Sky Globes/Sky Domes" behind one another to be seen. Create each of these Sky Globes to exist at slightly different distances, use either a distant fog, or some code that changes the color and fade value dependent on distance from the camera. You can alse do this with nebula as well.

You might want to consider a piece of code that will also rotate the globes slowly dependent on the plyare movement. At least this is what I am considering for my Space Combat Sim... any much more... my next problem is designing and figuring out the correct code

-- do not seek the footsetps of the wiseman
-- seek what he sought

Login to post a reply

Server time is: 2025-05-22 06:25:29
Your offset time is: 2025-05-22 06:25:29