Created
June 9, 2024 21:54
-
-
Save triplefox/14ac08965e4492125b50dd76978bbaeb to your computer and use it in GitHub Desktop.
Parallax scrolltext example
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
10 VDU 22, 132 : REM DOUBLE BUFFERED 640X240 | |
20 VDU 26 | |
30 VDU 23, 0, &C0, 0 | |
40 VDU 23, 0, &C1, 0 | |
50 VDU 23, 16, &51, &51 : REM MAKE TEXT CURSOR NOT WRAP OR SCROLL | |
400 VDU 5 : REM USE PLOT POSITION | |
405 DV = 1 / (240 * (3.14159) * 2) | |
410 X1 = 0 | |
450 X0 = 0 | |
460 X1 = (X1 + 1) | |
470 CLG | |
500 FOR Y0=0 TO 240 STEP 8 | |
550 X0 = 320 + SIN((X1 + Y0 * 8) * DV) * 320 | |
600 VDU 25, &04, X0; Y0; : REM SET PLOT POSITION | |
610 PRINT "ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
700 NEXT Y0 | |
5000 VDU 23, 0, &C3 : REM VSYNC | |
5100 IF INKEY(0)=-1 THEN 450 : REM EXIT ON KEYPRESS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment