CPCWiki forum

General Category => Programming => Topic started by: Devilmarkus on 20:33, 14 November 12

Title: "Der Springende Punkt" - 11Liner ;)
Post by: Devilmarkus on 20:33, 14 November 12
Have fun!
10 MODE 1:INK 1,24:INK 0,1:INK 2,1:BORDER 1:INK 3,15
20 LOCATE 1,25:PEN 2:PRINT"Der Springende Punkt"
30 FOR y= 14 TO 0 STEP -2:FOR x=0 TO 320 STEP 2:IF TEST(x,y)>0 THEN PLOT x*2,100+(y*2),3:PLOT (x*2)+2,100+(y*2):PLOT (x*2)+2,102+(y*2):PLOT (x*2),102+(y*2)
40 NEXT:NEXT
50 LOCATE 1,25:PRINT SPC(30);:INK 2,15:st=4:xlr=12:PRINT CHR$(23);CHR$(1);:x=-100:y=0:PLOT x,y:ax=x:ay=Y
60 x=-100:y=0:PLOT x,y:ax=x:ay=Y
70 PLOT ax,ay,1:PLOT x,y,1:CALL &BD19:ax=x:ay=y:x=x+st:y=y+xlr
80 IF x>630 THEN st=-4 ELSE IF x<10 THEN st=4
90 IF y > 100 THEN xlr=xlr-1 ELSE IF y < 0 THEN y=0:xlr=RND*10+10
100 GOTO 70


Who also can do silly effects in 11 BASIC lines? ;)
Post your results here :D
Title: Re: "Der Springende Punkt" - 11Liner ;)
Post by: AMSDOS on 06:30, 16 November 12
Quote from: Devilmarkus on 20:33, 14 November 12
Who also can do silly effects in 11 BASIC lines? ;)
Post your results here :D
Slightly confused.
Do you want people to add an extra line (making that 11) to your existing program just to make it silly or something? I've pretty much filled a whole thread with silly routines and stuff (perhaps not in 10 or 11 lines though) ;D
Obviously to make things look sillier, it's good to alternate the ink colours and "Speed Ink 1,1" is your friend when it comes to being silly, perhaps add some cursor control to the program and throw in a Speed key 1,1 or something weird. Don't think you can alternate the speed between "SPEED INK", so you could have one 1 flashing away at one speed and another at a different speed, Amstrad probably didn't want people having seizures. You could add some really slow or weird Speed Key to what your moving just to make it all weird.  ;D
Title: Re: "Der Springende Punkt" - 11Liner ;)
Post by: HAL6128 on 10:39, 16 November 12
...I like the movement of the "jumping point". It's almost a parabel which means a realistic jumping/movement path with the help of fast integers calculations.
(no, I haven't an "eleven-liner" for the moment...  :) )
Title: Re: "Der Springende Punkt" - 11Liner ;)
Post by: Devilmarkus on 12:29, 16 November 12
No, my program already has 11 lines ;)

I want other programs in 11 lines, which also do some silly effects :D
Title: Re: "Der Springende Punkt" - 11Liner ;)
Post by: AMSDOS on 12:35, 16 November 12
Quote from: Devilmarkus on 12:29, 16 November 12
No, my program already has 11 lines ;)


Explain
Title: Re: "Der Springende Punkt" - 10Liner ;)
Post by: Devilmarkus on 12:41, 16 November 12
Ouch... 10 lines... (Well it was late when I coded it)

Ok so post a 10 liner here ;)
Title: Re: "Der Springende Punkt" - 11Liner ;)
Post by: Devilmarkus on 13:29, 16 November 12
Still 10 lines:
10 MODE 1:INK 1,15:INK 0,1:INK 2,1:BORDER 1:INK 3,15:SYMBOL 255,&X1111,&X1111:LOCATE 1,25:PEN 2:PRINT"Der Springende Punkt"
20 FOR y= 14 TO 0 STEP -2:FOR x=0 TO 320 STEP 2:IF TEST(x,y)>0 THEN PLOT x*2,100+(y*2),3:PLOT (x*2)+2,100+(y*2):PLOT (x*2)+2,102+(y*2):PLOT (x*2),102+(y*2)
30 NEXT:NEXT
40 LOCATE 1,25:PRINT SPC(30);:LOCATE 1,1:PEN 1:INK 2,15:st=4:xlr=1:PRINT CHR$(23);CHR$(1);:TAG:x=236:y=128:PLOT x,y,3:PLOT x+2,y:PLOT x+2,y+2:PLOT x,y+2:PLOT x+4,y+2:PLOT x+4,y:PLOT x+6,y:PLOT x+6,y+2:PLOT -x,-y,1:x=x-8
50 y=y+2:MOVE x,y:PRINT CHR$(255);:ax=x:ay=Y:INK 1,15,24:FOR t=1 TO 10:SPEED INK 11-t,t:FOR e=1 TO 500:NEXT:NEXT:INK 1,24:GOSUB 100
60 MOVE ax,ay:PRINT CHR$(255);:MOVE x,y:PRINT CHR$(255);
70 CALL &BD19:ax=x:ay=y:x=x+st:y=y+xlr:IF x>624 THEN st=-4 ELSE IF x<6 THEN st=4
80 IF y > 100 THEN xlr=xlr-1 ELSE IF y < 0 THEN y=0:xlr=RND*10+10
90 GOTO 60
100 MOVE ax,ay:PRINT CHR$(255);:MOVE x,y:PRINT CHR$(255);:CALL &BD19:ax=x:ay=y:y=y+xlr:x=x+xlr/2:xlr=xlr+0.125:rr=rr+1:IF rr>50 THEN RETURN ELSE GOTO 100

Title: Re: "Der Springende Punkt" - 11Liner ;)
Post by: Gryzor on 14:25, 14 December 12
Just saw these two now! The physics in the first one is very nicely done :DThe second one is a bit more boring.
Powered by SMFPacks Menu Editor Mod