b3ta.com qotw
You are not logged in. Login or Signup
Home » Question of the Week » Old stuff I still know » Post 1263738 | Search
This is a question Old stuff I still know

Our Ginger Fuhrer says that he could still code up a simple game idea in Amstrad Basic, while I'm your man if you ever need to rebuild the suspension on an Austin Allegro (1750 Equipe version). This stuff doesn't leave your mind - tell us about obsolete talents you still have.

(, Thu 30 Jun 2011, 17:04)
Pages: Latest, 17, 16, 15, 14, 13, ... 1

« Go Back

5 CLS
10 LET G$ = INKEY$
20 IF G$ = "Q" THEN DRAWR 0,-10
25 IF G$ = "q" THEN DRAWR 0,-10
30 IF G$ = "A" THEN DRAWR 0,10
35 IF G$ = "a" THEN DRAWR 0,10
40 IF G$ = "O" THEN DRAWR -10,0
45 IF G$ = "o" THEN DRAWR -10,0
50 IF G$ = "A" THEN DRAWR 10,0
55 IF G$ = "p" THEN DRAWR 10,0
60 IF G$ = "X" THEN BREAK
65 IF G$ = "x" THEN BREAK
70 GOTO 10

Not the most thrilling thing ever but, given that I learned it at age 6 and I'm now in my mid thirties it is old, and given that I know it in standard basic also (the above is Amstrad basic) I think it counts as a skill and useless.
(, Sat 2 Jul 2011, 2:18, 7 replies)
Change the drawr command to "plot" and break to "STOP"
And you're in ZX BASIC territory..
(, Sat 2 Jul 2011, 12:03, closed)
Etch-a-sketch?

(, Sat 2 Jul 2011, 12:19, closed)
Yup, it's an Etch-A-Sketch.
You have to use "DRAW" rather than "DRAWR" for it to work on Spectrums, by the way, if you use plot you just get a dot. I learned it on a ZX81 and went home and worked it out on my CPC464 -- I may have got it working in QBasic once, but I forget.
(, Sat 2 Jul 2011, 16:59, closed)
Nope..
Plot indeed does produce a dot, but the loop moves the new position of the cursor (so to speak) one pixel in any of the chosen directions.. To avoid creating a load of gaps between your plotted dots, change the 10' to 1' -1 etc..

The draw command has two coordinates, the start of the line, the end of the line, then it simply connects the two.

Oh, and stick this in at the end (before the loop):
66 If g$ = " " THEN CLS:PLOT 128, 191

That'll clear your screen, then re-centre your dot.
(, Sat 2 Jul 2011, 17:22, closed)
Then you were using different Spectrums to the ones I was.
Plot does do what you say but it's next to useless in drawing the lines. DRAW simply draws from the last cursor position (either top left, or a plotted dot) for the length required. I know I'm right because I recall the program pretty much line for line -- I don't have a photographic-style memory of the book I copied it from now, but I did about 2 decades ago.
As for clearing the screen etc. -- I added a lot since then, including clear the whole screen, use an eraser-line, add characters, add plotted dots, draw diagonal lines, and so on. I omitted the add-ons for brevity.
(, Sat 2 Jul 2011, 19:32, closed)
Agreed..
There were many ways to get the 'etch a sketch' effect, the plot routine is the one I remember.

I do recall combining this with a UDG editor, so I could put fancy borders and patterns on the screen too.

Damn, I really should have got out more when I was younger *sigh*
(, Sat 2 Jul 2011, 19:58, closed)
(coff)
Line 50, I think you mean "P"
(, Tue 5 Jul 2011, 12:57, closed)

« Go Back

Pages: Latest, 17, 16, 15, 14, 13, ... 1