locked
Starfield Simulator RRS feed

  • General discussion

  • Hi I made a simple starfield simulator... please try it out: JJS099 Thank You.

    You can increase/decrease speed with the UP/DOWN key up to 60.
    Saturday, June 29, 2013 1:01 PM

All replies

  • Your program runs smoothly which is because it is well structured with good use of arrays and subroutines.
    Saturday, June 29, 2013 3:32 PM
  • Thank you litdev, I put a lot of effort into it.

    Saturday, June 29, 2013 4:30 PM
  • Wow! This is very cool! Good graphics and performance. Nice work! :)
    Saturday, June 29, 2013 6:15 PM
  • Cool! very nice graphics and code.

    I am a 12 year old learning how to code using small basic.

    Saturday, June 29, 2013 6:23 PM
  • Very cool Florian. 

    I tried one little change to it, just two lines of code, so that the stars move slowly from the center and speed up as they pass you, see what you think:

        ' 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

    http://smallbasic.com/program/?JJS099-0
    • Edited by bigdaddyo Friday, August 30, 2013 11:08 PM added hyperlink
    Friday, August 30, 2013 11:07 PM
  • Wow. What a top a program.
    Saturday, August 31, 2013 1:32 PM
  • Let's make this thread sticky for a week so people notice it more.

    I also featured your program here: http://blogs.msdn.com/b/smallbasic/archive/2013/08/31/starfield-simulator-small-basic-featured-program.aspx

    Thanks!


    Ed Price, SQL Server Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Saturday, August 31, 2013 6:39 PM
  • Florian, thanks for posting this, your sample gave me the solution to an issue I had with one of my programs.

    start_time = Clock.ElapsedMilliseconds
        Update()
        end_time = Clock.ElapsedMilliseconds

    Thanks, a very helpful sample.

    Sunday, September 1, 2013 8:45 AM