Starfield Simulator - Small Basic Featured Program
Published Feb 12 2019 02:33 PM 481 Views
Microsoft
First published on MSDN on Aug 31, 2013

Authored by Ed Price


It's time to feature a new program!









Florian Auer created this Starfield Simulator:





Florian's profile image:






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:





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::






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






Version history
Last update:
‎Feb 12 2019 02:33 PM
Updated by: