Created
February 21, 2023 17:38
-
-
Save ilyaevseev/6be94625768fdd63143a0ea8bbc35ed0 to your computer and use it in GitHub Desktop.
First sample for Sofa on QB64
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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