Is
movement on the moon at a rate of 1/6th or 1/2 of Earth? |
| Private
Sub cDrop_Click() LabelMax.Caption = 0 ScaleRat = 0.6667 'arbitrary scale can ignore (turns twips (1/15th of a pixel) into mm) Command9.Visible = True 'make pause button visible Grav = Val(TextGee.Text) 'gravity BallVel = 0 Chronos = HScroll1.Value Timer3.Interval = Chronos 'set frame rate interval ElapseT = 0 Hippos = 0 Msurface = LabelSurface.Top - CricketBall.Height 'set surface of planet/moon AstroPosition = 1800 Timer3.Enabled = True 'start frames Timer2.Enabled = True 'record duration of jump End Sub Private Sub Command1_Click() Private Sub Command10_Click() Private Sub Command3_Click() Private Sub Command4_Click() Private Sub Command6_Click() Private Sub Command7_Click() Private Sub Command9_Click() Private Sub CommandReset_Click() Command3.Value = True Private
Sub HScroll1_Change() 'set timer rate from scrollbar Private
Sub Text1_LostFocus() Private
Sub Text2_LostFocus() Private
Sub Timer1_Timer() 'for astronaut AstroPosition
= AstroPosition - Jumpup Buzz.Top
= AstroPosition Jumpup
= Jumpup - Grav 'get
max height of astronaut If Buzz.Top
> Msurface Then 'land on surface (end jump) AstroPosition
= AstroPosition - BallVel CricketBall.Top
= AstroPosition BallVel
= BallVel - Grav 'get
max height of astronaut If CricketBall.Top
> Msurface - CricketBall.Height Then 'land on surface (end jump) End Sub Private
Sub Timer2_Timer() End Sub |
| Global
Grav As Double 'gravity
Global Chronos As Integer 'timer speed Global Jumpup As Double 'velocity of astronaut Global Msurface As Integer ' surface position of planet/moon Global ElapseT As Currency ' elapsed time '(currency is more accuarate for avoiding rounding errors when in 10ths or 100ths of a second) Global AstroPosition As Double 'position of astronaut on Y-axis Global Hippos As Double 'highest position of astronaut Global ScaleRat As Double Global BallVel As Double 'credits (2008) 'www.poseidons.net 'youtube 'rollitup.org |