Freigeben über


Starfield Simulator - Small Basic Featured Program

It's time to feature a new program!

 

Florian Auer created this Starfield Simulator:

 

JJS099

 

 

Florian's profile image:

Avatar of Florian Auer

 

 

 

You can increase/decrease the speed with the UP/DOWN key up to 60. And if you get to 31, then you enter hyperspace! And don't go to 51 if you have epilepsy! =^)

 

 

 

 

And in this version, bigdaddyo made a tweak:

 

JJS099-0

 

 

bigdaddyo added just two lines of code, so that the stars move slowly from the center and speed up

as they pass you:

 ' Original code 'star_x[i] = star_x[i] + 
 Math.Round(speed * (star_x[i] / distance)) 
 ' star_y[i] = star_y[i] + 
 Math.Round(speed * (star_y[i] / distance)) 
 ' Modified code star_x[i] = star_x[i] + speed 
 * star_x[i] * distance 
 * 0.0001 star_y[i] = star_y[i] + speed 
 * star_y[i] * distance * 0.0001

 

 

Let Florian know what you think in this Small Basic forum thread::

 

https://social.msdn.microsoft.com/Forums/en-US/1052bae6-0f44-4e43-8ce0-c063c8d56182/starfield-simulator

 

 

 

As LitDev mentions in that thread, Florian's program runs so smoothly because it is well structured with arrays and subroutines.

 

 

 

Thanks to Florian and BigDaddyO!

 

   - Ninja Ed

Comments