Background image BIGGER than the display screen:
This is just left and right, A and D, maybe @TempodiBasic can add up and down?
Code: (Select All)
_Title "Image bigger than screen" ' b+ 2024-12-30
Randomize Timer
Screen _NewImage(800, 600, 32)
_ScreenMove 100, 20
Dim bg&
bgw = 2400
bgh = 600
bg& = _NewImage(bgw, bgh, 32)
_Dest bg&
For i = 1 To 100
Line (Rnd * bgw, Rnd * bgh)-Step(Rnd * 100 + 50, Rnd * 75 + 25), _RGB32(Rnd * 255, Rnd * 255, Rnd * 255), BF
Next
_Dest 0
d = 1
While _KeyDown(27) = 0
Cls
k$ = UCase$(InKey$)
If k$ = "A" Then d = -1
If k$ = "D" Then d = 1
If d Then
If le + 800 > bgw Then
d = -d
te = bgw - le
_PutImage (0, 0)-(te, bgh), bg&, 0, (bgw - te, 0)-(bgw, bgh)
_PutImage (te, 0)-(800, bgh), bg&, 0, (0, 0)-(800 - te, bgh)
Beep
Else
_PutImage (0, 0)-(800, bgh), bg&, 0, (le, 0)-(le + 800, bgh)
End If
End If
le = le + d
If le < 0 Then le = 0: d = -d: Beep
_Display
_Limit 120
Wend
This is just left and right, A and D, maybe @TempodiBasic can add up and down?
b = b + ...