Skip to content

Instantly share code, notes, and snippets.

@ilyaevseev
Created February 21, 2023 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilyaevseev/6be94625768fdd63143a0ea8bbc35ed0 to your computer and use it in GitHub Desktop.
Save ilyaevseev/6be94625768fdd63143a0ea8bbc35ed0 to your computer and use it in GitHub Desktop.
First sample for Sofa on QB64
Screen 12
Let StepX = 100
Let StepY = 100
Let ScreenWidth = _Width
Let ScreenHeight = _Height - 20
For X = 0 To ScreenWidth Step StepX
Line (X, 0)-(X, ScreenHeight), 7
Next
For Y = 0 To ScreenHeight Step StepY
Line (0, Y)-(ScreenWidth, Y), 7
Next
Let X = ScreenWidth / 2
Let StartY = ScreenHeight
Let StartSpeed = 10
Let Speed = 0
Let Steps = 10
Let Distance = 0
Let Gravity = 10
For N = 0 To Steps
Distance = StartSpeed * N + Gravity * N * N / 2
Y = StartY - Distance
Print "Step = "; N; ", X = "; X; ", Y = "; Y
Circle (X, Y), 3
Sleep 1
Next
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment