### Author Topic: [Locomotive Basic] - Scrolling  (Read 443 times)

0 Members and 1 Guest are viewing this topic.

• Supporter
• CPC664
• Posts: 135
• Country:
• Amiga and CPC6128 User
• Liked: 126
• Likes Given: 122
##### [Locomotive Basic] - Scrolling
« on: 19:14, 03 July 19 »
Hi

I've made a simple "Multiple FAST" scrolling in Locomotive Basic
Code: [Select]
` 10 defint x,j,y,h,u,k,o:mode 0:border 0:ink 0,0:ink 1,26:x=1:x2=1:y=5:symbol after 25015 symbol 255,1,54,78,32,67,92,88,120 tag:move k,180-y:print " "+chr\$(249);:k=6+k mod 320:move u,200-y:print " "+chr\$(249);:u=8+u mod 32030 h=31+(h mod 320):move x+h,100-y:print chr\$(255);:40 move j+h,300-y:print chr\$(255);:tagoff:50 locate 12-o,y:print chr\$(255)+" ";:o=1+o mod 1060 goto 20` not optimized...
Retroacademy.it - retrocomputing, retrogame anni &#039;70, &#039;80, &#039;90
Retroacademy.it - retrocomputing, retrogame anni '70, '80, '90

#### AMSDOS

• Supporter
• 6128 Plus
• Posts: 3.764
• Country:
• Liked: 1011
• Likes Given: 1723
##### Re: [Locomotive Basic] - Scrolling
« Reply #1 on: 12:56, 04 July 19 »
Interesting.

I used INK Palette Switching to create the Illusion of Horizontal Movement which later on I found others were doing the same with Locomotive BASIC. With the scenery in place line 220 sets between the alternating colours and line 230 regulates the SPEED between the alternating colours. I found going any smaller than SPEED INK 3,3 and it's too fast.

Code: [Select]
`100 MODE 0:INK 2,13:INK 3,3:INK 4,0:INK 5,0:DEFINT a-z110 SYMBOL 255,126,131,129,129,139,85,170,84120 SYMBOL 254,0,124,126,126,116,0,0,0130 i1=4:i2=2:x=6:y=7140 WHILE x<15150   i=i1160   GOSUB 1000170   x=x+1180   i=i2190   GOSUB 1000200   x=x+1210 WEND220 INK 2,13,0:INK 3,3,0:INK 4,0,13:INK 5,0,3230 SPEED INK 5,5240 PEN 1:END1000 PRINT CHR\$(22)+CHR\$(1);1010 FOR c=255 TO 254 STEP -11020   LOCATE x,y1030   PEN i1040   PRINT CHR\$(c);1050   i=i+11060 NEXT c1070 PRINT CHR\$(22)+CHR\$(0)1080 RETURN`
* Using the old Amstrad Languages    * with the Firmware
* I also like to problem solve code in BASIC    * And type-in Type-Ins!

Home Computing Weekly Programs
Popular Computing Weekly Programs