Author Topic: Twister?!? in BASIC  (Read 3009 times)

0 Members and 1 Guest are viewing this topic.

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1017
  • Likes Given: 926
Twister?!? in BASIC
« on: 16:34, 31 March 13 »
Code: [Select]
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

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 16.807
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 3973
  • Likes Given: 7115
Re: Twister?!? in BASIC
« Reply #1 on: 01:33, 01 April 13 »
Wow, this is beautiful! And if you set WinApe to about 250-300% it could be a nice screensaver! :D

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1017
  • Likes Given: 926
Re: Twister?!? in BASIC
« Reply #2 on: 21:48, 01 April 13 »
And the next: Scroller for poor people:

Code: [Select]
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

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1985
  • Likes Given: 4650
Re: Twister?!? in BASIC
« Reply #3 on: 21:58, 01 April 13 »
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

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1017
  • Likes Given: 926
Re: Twister?!? in BASIC
« Reply #4 on: 22:04, 01 April 13 »
Yeah sure, TFM :D  8) 8) 8)

For the lazy people:
Twister:
* freaks.cdt (1.07 kB - downloaded 34 times)


Scroller:  [ Invalid Attachment ]
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

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1017
  • Likes Given: 926
Re: Twister?!? in BASIC
« Reply #5 on: 00:18, 02 April 13 »
Update for the scroller:
Code: [Select]
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

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 16.807
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 3973
  • Likes Given: 7115
Re: Twister?!? in BASIC
« Reply #6 on: 21:15, 03 April 13 »
Heheheh loving it. As for the lazy ones, Winape auto-typing is easier :)

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1017
  • Likes Given: 926
Re: Twister?!? in BASIC
« Reply #7 on: 21:22, 03 April 13 »
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

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1017
  • Likes Given: 926
Re: Twister?!? in BASIC
« Reply #8 on: 21:26, 03 April 13 »
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

Offline MartinW

  • CPC664
  • ***
  • Posts: 64
  • Country: gb
    • Guddler's Domain
  • Liked: 15
  • Likes Given: 8
Re: Twister?!? in BASIC
« Reply #9 on: 22:57, 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 !

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1017
  • Likes Given: 926
Re: Twister?!? in BASIC
« Reply #10 on: 23:08, 03 April 13 »
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

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1985
  • Likes Given: 4650
Re: Twister?!? in BASIC
« Reply #11 on: 00:42, 04 April 13 »
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

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1017
  • Likes Given: 926
Re: Twister?!? in BASIC
« Reply #12 on: 00:44, 04 April 13 »
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

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1985
  • Likes Given: 4650
Re: Twister?!? in BASIC
« Reply #13 on: 00:48, 04 April 13 »
Good luck!!!
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 16.807
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 3973
  • Likes Given: 7115
Re: Twister?!? in BASIC
« Reply #14 on: 20:44, 06 April 13 »
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!!!

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1017
  • Likes Given: 926
Re: Twister?!? in BASIC
« Reply #15 on: 13:05, 07 April 13 »
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 ;)
« Last Edit: 13:09, 07 April 13 by Devilmarkus »
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