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.

Dark GDK / Stars effect

Author
Message
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 9th Feb 2006 21:37
Hi I'm doing a 3d space simulator, but when I'm moving through space I'm not having the sensation of moving foward, then I remembered star trek, where the stars seams to move towards the ship, I was looking for some ideas how to do that effect!
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 9th Feb 2006 23:29
The way I used to do it years ago, was to create random pixels around the centre of the screen, each with its own X & Y step value and move the pixels accordingly.

There should be some code around that creates 3D stars.

Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
Smoke me a computer chip, I'll be baking breakfast.
Acolyte
18
Years of Service
User Offline
Joined: 3rd Feb 2006
Location:
Posted: 10th Feb 2006 04:35
Hey man. I would definitely try to do this with the pixel functions from within the SDK. You could try to store a multi-dimmensional array that holds the xyz info on the stars, but this would be pretty resource consuming. You could check for the color of a star at a location on the screen just using an incremental for for the x and y position. Depending on the color, you could then do a line function that creates a simmulated star blur by drawing a line in the opposite direction of the direction your moving. So if you were moving forward, the star would naturally come toward you, and depending on how fast you were moving you could make the line function draw long, or short trails. As far as just making the stars look like their moving toward you, if you don't want to do a hyperspace sort of blur effect, make it so that the star move away from the middle of the screen. This alone will simulate the effect that your moving toward the stars. Sorry if I wasn't more help.

The scarecrow has no mind, but serves its function well.
Barnski
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: Switzerland, Zurich
Posted: 10th Feb 2006 14:00 Edited at: 10th Feb 2006 14:03
Hehe, I think its normal in space that you don't think your moving when ur moving. Why? Because your movespeed is soooo low compared to the extreme size of space and pretty all objects in it, that you just don't get a noticeable effect in a short time (unless you move at some speed much higher than light-speed, which is I think what in star trek is/must be the case, or you would never get these light distortions (lines expanding from the center)).

Look for example at these data:
source: http://www.bigear.org/seti.htm
edit: this is when travelling with light-speed (which is the theoretical maximum speed in our universe)
Earth to moon 1 second
Earth to sun 500 seconds (8 min.)
Sun to Mars 12.5 minutes
Sun to Jupiter 40 minutes
Sun to Pluto 5.5 hours
Solar system diameter (at orbit of Pluto) 11 hours
Sun to nearest star 4 years
Sun to center of galaxy 30,000 years
Diameter of galaxy 100,000 years
Distance of Andromeda galaxy 2 million years
Distance to "edge" of universe 15 billion years


As I dont think your simulator allows this high speed travels, I suggest something different:

You can give a sensation of moving if you let the camera behind when giving more speed (requires external ship view), you know, by changing the distance of camera and ship you can notice movement.
You can furthermore draw variable gas emission (which is realistic anyways, unless your ship moves with some fictive engine that does not work on the actio = reactio principle...)...

I would only do the light effect when traveling at a very high speed as in star trek (altough its still unrealistic if you look at the time table )

But in the end its your simulator and you can do whatever you want / like

This was just what popped into my mind when I read this.

greets,
Barnski.

-- I just started with DarkSDK, by translating DBP Projects. --
Miguel Melo
18
Years of Service
User Offline
Joined: 8th Aug 2005
Location:
Posted: 10th Feb 2006 14:51
Barnski's science is correct, but it's all a game and we probably want to give an exhilarating (sp?) experience to the user, eh?

You probably want to give the speed sense by having debris flying past (that stuff can be close by and give the sense of speed you want). Have some billboards coming through and you should get the effect and still keep the science boffins happy ehehe
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 10th Feb 2006 23:00
Well first of all thank you all for answering!
Acolyte:
That was one of my initial ideas, but as you said it's pretty pretty resource consuming, about the lines it was my next idea but it's not quite what I want!

Barnski and Miguel Melo:
Well I am trying to put some realism, but the problem is the realism VS experience to the user, some details might make the game less interesting..

One of my latest ideas was to lock several objects on the screen witch would be invisible when the ship was stopped, and who would move in the opposite direction I was moving, when they moved out of my camera range they would positioned in the direction I was moving...
Newbie5UK
19
Years of Service
User Offline
Joined: 13th Nov 2004
Location:
Posted: 11th Feb 2006 09:59
Jna, I'm also writing a shuttle simulator. I have a Skybox star field that only moves when I pitch, roll or yaw the shuttle. I use the camera to do this. If I use higher speeds I can move the camera z axis slightly if required.

Do create a sense of movement however I use planets and am also looking at the odd asteriod to add. Here I will use a combination on object scale and z axis.

The onw area I am struggling with is build a galaxy and storign the data i.e a 3D cirtual map... I have no idea how to do this.. any pointers ? At present I have Earth with the moon orbiting it...
Barnski
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: Switzerland, Zurich
Posted: 11th Feb 2006 12:12
Are you refering to how you should save and load a "space" map?

If so, maybe following idea could be interesting:
write into your file an xml or html like code:


this is just a rough sketch about what you could do using such tag-like code format.

greets,
Barnski.

-- I just started with DarkSDK, by translating DBP Projects. --
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 11th Feb 2006 12:36
Newbie5UK:
About the camera if you know Crimson Skies or Freespace my camera is something like that! I understand if I create planets, debrie or ships I can create a sense of movement but I was trying to create something indiferent to have or not exterior objects to compare!
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 12th Feb 2006 22:35
Hi everybody just to anounce that I've finished the Stars effect!!!
Barnski
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: Switzerland, Zurich
Posted: 13th Feb 2006 00:18
Looks very nice at first view, but looking closer revealed some flickering of some stars, and most obvious is the reshuffling when moving forward/backward that takes place from time to time.

But altogether I think you managed to give a quite cool sensation of 3d-moving in space

-- I just started with DarkSDK, by translating DBP Projects. --
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 20th Feb 2006 01:31
Well people I've made some modifications, I'm now trying to fix some problems that the moveStarsXZ is still doing but if you only wanna strafe left/right up/down with stars effect feel free...
My problem is when I make an YRotate of the object and then do a roll the stars disapear
Jna99
18
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 23rd Feb 2006 14:20
Hi everybody well it's just to say that I've completed my stars effect, I've made some modifications, but at the moment I'm not at home so, only in my next post I'll post the source!

Login to post a reply

Server time is: 2024-05-06 00:35:11
Your offset time is: 2024-05-06 00:35:11