News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Devilmarkus

Twister?!? in BASIC

Started by Devilmarkus, 14:34, 31 March 13

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Devilmarkus

10 MODE 1:INK 0,0:INK 1,24:INK 2,6:INK 3,18:BORDER 0:OUT &BC00,6:OUT &BD00,24:a$=CHR$(207)+CHR$(143)+CHR$(207):pps2=300:pt2=4:pps=300:pt=8:xp=15:xs=4:xpa=15:xsa=3:xpb=15:xsb=2:LOCATE 1,1:PRINT CHR$(23);CHR$(1)
20 TAG:PLOT -4,-4,2:MOVE ((34-xp/2)*2)+pps,14:PRINT a$;:PLOT -4,-4,3:MOVE (xpa*2)+pps2,14:PRINT a$;:TAGOFF:LOCATE 1,25:PRINT CHR$(10)
30 xp=xp+xs:IF xp>20 THEN xs=xs-1 ELSE IF xp<8 THEN xs=xs+1
40 xpa=xpa+xsa:IF xpa>25 THEN xsa=xsa-1 ELSE IF xpa<8 THEN xsa=xsa+1
50 pps=pps+pt:IF pps>400 THEN pt=pt-4 ELSE IF pps<100 THEN pt=pt+4
60 pps2=pps2+pt2:IF pps2>400 THEN pt2=pt2-2 ELSE IF pps2<100 THEN pt2=pt2+2
70 GOTO 20


Not a real twister but perhaps you like the effect...
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Gryzor

Wow, this is beautiful! And if you set WinApe to about 250-300% it could be a nice screensaver! :D

Devilmarkus

And the next: Scroller for poor people:

10 MODE 1:INK 0,0:BORDER 0:INK 1,26:INK 2,3:INK 3,6:OUT &BC00,6:OUT &BD00,24
20 a$="Hello CPC freaks! "
30 LOCATE 8,10:PRINT"Hold on! Calculating..."
40 mx=LEN(a$)*8*8:DIM pix(mx)
50 FOR t=1 TO LEN(a$):LOCATE 1,25:PRINT MID$(a$,t,1)
60 FOR y=14 TO 0 STEP -2:FOR x=0 TO 14 STEP 2:pix(pt)=TEST(x,y):pt=pt+1:LOCATE 31,10:PRINT LEN(a$)-t:NEXT:NEXT
70 NEXT
80 pt=0:MODE 0:TAG:tk=200:tt=8:cl=1:FOR t=1 TO 15:READ a:INK t,a:NEXT
90 PLOT -2,-2,cl:FOR k=0 TO 7:IF pix(pt)=1 THEN MOVE tk+k*16,14:PRINT CHR$(133);
100 pt=pt+1:NEXT:TAGOFF:LOCATE 1,25:PRINT CHR$(10):TAG
110 IF pt=mx THEN pt=0
120 tk=tk+tt:IF tk>240 THEN tt=tt-1 ELSE IF tk<200 THEN tt=tt+1
130 cl=cl+1:IF cl=16 THEN cl=1
140 GOTO 90
150 DATA 1,2,11,23,22,18,9,12,24,25,15,6,3,4,5

When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

TFM

Kicks Robins butt! Now Batman is next up...
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Devilmarkus

Yeah sure, TFM :D  8) 8) 8)

For the lazy people:
Twister: [attachurl=2]

Scroller: [attachurl=3]
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Devilmarkus

Update for the scroller:
10 MODE 1:INK 0,0:BORDER 0:INK 1,26:INK 2,3:INK 3,6:OUT &BC00,6:OUT &BD00,24:PAPER 1:PEN 0
20 a$="Hello CPC freaks! "
30 LOCATE 8,10:PRINT"Hold on! Calculating..."
40 mx=LEN(a$)*8*8:DIM pix(mx)
50 FOR t=1 TO LEN(a$):LOCATE 1,25:PRINT CHR$(24);MID$(a$,t,1);CHR$(24)
60 FOR y=14 TO 0 STEP -2:FOR x=0 TO 14 STEP 2:pix(pt)=TEST(x,y):pt=pt+1:LOCATE 31,10:PRINT LEN(a$)-t:NEXT:NEXT
70 NEXT
80 pt=0:MODE 0:CLS:TAG:tk=200:tt=8:cl=2:FOR t=1 TO 15:READ a:INK t,a:NEXT
90 PLOT -2,-2,cl:FOR k=0 TO 7:IF pix(pt)=1 THEN MOVE tk+k*16,14:PRINT CHR$(133);
100 pt=pt+1:NEXT:MOVE tk,14:DRAW tk+128,14,1:TAGOFF:LOCATE 1,25:PRINT CHR$(10):TAG
110 IF pt=mx THEN pt=0
120 tk=tk+tt:IF tk>240 THEN tt=tt-1 ELSE IF tk<200 THEN tt=tt+1
130 cl=cl+1:IF cl=16 THEN cl=2
140 GOTO 90
150 DATA 1,2,11,23,22,18,9,12,24,25,15,6,3,4,5



When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Gryzor

Heheheh loving it. As for the lazy ones, Winape auto-typing is easier :)

Devilmarkus

And mine is faster... :P
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Devilmarkus

BASIC Autotype: Like you "LIST" a program:

BASIC Autotype
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

MartinW

Quote from: Gryzor on 19:15, 03 April 13
Heheheh loving it. As for the lazy ones, Winape auto-typing is easier :)

Thank you SO much!! I typed the first one in the other day when it appeared but it took me so long I'd pretty much lost the will to live on the subject when I saw these new ones tonight so was about to ask if there was an easier way ;)
And yep, I realist the tape files are even easier but copy and paste means I don't have to download anything !

Devilmarkus

I'm coding a BASIC demo...
With these effects and perhaps some more...

I wanted to call it "100% BASIC" so perhaps it will not have any music... But perhaps it will... ;)

So stay tuned ;)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

TFM

Actually it would be cool to see what can be done by using "BASIC ONLY" ;-)
And music is doable ;-) I remember a basic program back the day, it made an awsome song.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Devilmarkus

I already have a BASIC music ;)
It's cool! Really (No, I don't tell you now, who coded it)

But will be hard to implement... Perhaps a "Music part" ;)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

TFM

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Gryzor

MartinW: before the auto-type thingy I used to type a listing every once in a while but of course it takes lots of patience and the right mood. But since it was implemented it's been a savior :)


Markus: bring it on!!!

Devilmarkus

#15
Another solution is to copy this text into a .txt file, rename it from .txt to .bas and put it onto a DSK.

The CPC can read it then. It takes a bit longer to load because it's ASCII, but should work fine ;)

Edit: Perhaps sometimes you need a BASIC program as ASCII on DSK:
No problem.
SAVE"MYPROG.BAS",A

Then you can extract it from your DSK using WinApe's filemanager or another good DSK editor and you'll have a pure text file.

AMSDOS and BASIC are more clever sometimes as you think ;)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Powered by SMFPacks Menu Editor Mod