Welcome to Phrogram Sign in | Join | Help


Re: Our first Phrogram - Spaceship Attack

  •  10-29-2006, 9:57 AM

    Re: Our first Phrogram - Spaceship Attack

    This is cool, TomDad, thanks!  What's most amazing is you did this in about 50 instructions - cool!

    As Hymake said, it's very hard, because it goes so fast.  I added a 100 millisecond delay to the main loop, as shown here - that's only 1/10 of a second - and now I can actually play it, slow oldish guy that I am, lol!  Here's how that fit in on my copy of the program:

     

    For moveSpaceshipUpTheScreen = 640 To -50 Step -50 // This is the counter to move the spaceship up the screen

          moveTheSpaceshipsRandomly() // See comments in moveTheSpaceshipsRandomly Method

          moveTheUFOWithTheMouse() // See comments in moveTheUFOWithTheMouse Method

          hasTheSpaceshipHitTheUFO() // See comments in hasTheSpaceshipHitTheUFO Method

          // This is the timer that tells you how long a program has been running.

          // It is divided by a 1000 because it counts in milliseconds

          // Floor() is used to take out unwanted decimal places.

          delay(100)

          howLongHasGameBeenRunning = Floor((TickCount() / 1000 ))

          // This puts the Score, number of hits and time at the bottom of the screen

          Status( "Score: " + SpaceshipCount + "    Hits:" + SpaceshipHits + "    Time: " + howLongHasGameBeenRunning  )

    Next

    Filed under: , , , , ,
View Complete Thread