View Full Version : TBGL Stars with twinkle
Petr Schreiber
11-08-2009, 09:11
Here is very basic example on star flight.
It is hardly revolutionary, but can show you how entity system can be used for this common task.
Interesting to watch how much the twinkle improved the feeling of depth and masked reincarnating stars in the background.
Charles Pegge
11-08-2009, 10:13
Hi Petr,
Looks wonderfully serene. I am sure there are nebulae, galaxies and planetary systems forming in the background - perhaps they are made of dark matter.
Charles
Petr Schreiber
11-08-2009, 10:18
Hi Charles,
thanks :)
That %eBox was problem on my side, that line should not be there :oops:
I updated the download.
Petr
It reminds me of something you'd probably see in Star Trek. 8)
Charles Pegge
12-08-2009, 11:04
This colors the stars using pseudo random numbers derived from the star iterator e.
' -- Color change to simulate twinkle
c = sin(gettickcount*0.01+e)*.25+1.75
'
'pseudorandom tints
fr=(e*123) and msk
fg=(e*571) and msk
fb=(e*579) and msk
'
TBGL_EntitySetColor(%sScene, e, fr*c, fg*c, fb*c)
Charles
Petr Schreiber
12-08-2009, 11:14
What a colourful Space :]
Charles Pegge
12-08-2009, 11:54
A few purple stars hurtling past could be attributed to the Doppler effect when travelling near the speed of light. - unlike our red-shifted view from planet Earth.
Charles
Petr Schreiber
12-08-2009, 12:00
That is nice interpretation :)
At one point I was thinking whether to restrict maximum speed of tbgl entities to 299 792 458 m/s, then I realised I should take a rest :lol:
Charles Pegge
12-08-2009, 12:55
When coding, my head spins so fast, time slows down relative to everybody elses.
Ch a r l e s