First Spear Posted November 30, 2017 Share Posted November 30, 2017 My AA-search-fu is weak at the moment... I thought that there was a sample "earthquake" IntyBASIC example that shook the screen, I think using SCROLL. But now I can't find it. Can anyone point me? Quote Link to comment Share on other sites More sharing options...
+nanochess Posted December 1, 2017 Share Posted December 1, 2017 Maybe this could serve you: FOR c = 0 TO 20 SCROLL RANDOM(,RANDOM( WAIT NEXT c SCROLL 0,0 WAIT 1 Quote Link to comment Share on other sites More sharing options...
mmarrero Posted December 2, 2017 Share Posted December 2, 2017 I recommend SCROLL, and it's the easiest to use - if you don't mind losing a few 16-bit variables. I've used the hardware registers for the shake effect. CONST SCROLL_X = $30:CONST SCROLL_Y = $31 '---delay/scroll registers- DIM ToggleShake,IsShaking, i PRINT AT 80 COLOR 1,"Hit button to shake!" MainLoop: ToggleShake=FRAME AND 7 '--- 0 to 7 PRINT AT 0,<3>ToggleShake WAIT '<---- IF CONT1.B0 THEN POKE SCROLL_X,ToggleShake '--scroll x IsShaking=0 ELSEIF CONT1.B1 THEN POKE SCROLL_Y,ToggleShake '--scroll y IsShaking=1 ELSEIF CONT1.B2 THEN IF ToggleShake <4 THEN POKE SCROLL_X,3 '--shake x, every other frame ELSE POKE SCROLL_X,0 END IF IsShaking=2 ELSE POKE SCROLL_X,0 '--back to normal if no button held POKE SCROLL_Y,0 IsShaking=10 END IF PRINT AT 40,"B",<1>IsShaking GOTO MainLoop 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.