vintage-basic.net
June 17, 2021, 04:03:52 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: SMF - Just Installed!
 
   Home   Help Search Login Register  
Pages: 1 2 [3] 4
 21 
 on: January 09, 2010, 03:02:48 PM 
Started by rdc - Last post by rdc
Heh. Thanks.

When I get a break I am going to try and do the old robots game using this to see how it works.

 22 
 on: January 09, 2010, 10:41:43 AM 
Started by rdc - Last post by Lyle Kopnicky
Random stars... cool.

 23 
 on: December 31, 2009, 09:31:17 AM 
Started by rdc - Last post by rdc
I worked up a little program to test the idea of using a string array to mimic writing to the screen. Seems to work OK.

Code:
10 REM SIMULATED LOCATE USING AN ARRAY
11 REM USING RAND DEF TO RANDOMLY PLACE CHARACTERS ON THE SCREEN
12 RANDOMIZE
13 DEF FN RN(S, L, H) = INT((H - L + 1) * RND(S) + L)
14 REM SET UP STRING ARRAY TO MIMIC SCREEN ROW, COLUMN ARE 0 BASED 24 LINES SO LAST LINE CAN BE USED FOR INPUT
15 DIM SCREEN$(24, 80)
16 REM RESET ARRAY AND PRINT TO CLEAR SCREEN
17 GOSUB 640
18 GOSUB 550
19 INPUT A$
20 FOR I = 1 TO 20
25  ROW = FN RN(1, 0, 23)
30  COL = FN RN(1, 0, 79)
40  SCREEN$(ROW, COL) = "*"
45 NEXT
46 REM PRINT TO SCREEN
50 GOSUB 550
51 INPUT A$
55 REM CLEAR SCREEN ARRAY
60 GOSUB 640
65 REM PRINT BLANK SCREEN
70 GOSUB 550
71 INPUT A$
80 END
545 REM PRINTS ARRAY TO SCREEN
550 FOR II = 0 TO 23
570   FOR JJ = 0 TO 79
580     PRINT SCREEN$(II, JJ);
590   NEXT JJ
610 NEXT II
620 RETURN
630 REM RESETS SCREEN ARRAY
640 FOR II = 0 TO 23
650   FOR JJ = 0 TO 79
660     SCREEN$(II, JJ) = " "
670   NEXT JJ
680 NEXT II
690 RETURN

 24 
 on: December 27, 2009, 04:37:36 PM 
Started by rdc - Last post by rdc
LOL. Thanks man.

 25 
 on: December 27, 2009, 09:36:20 AM 
Started by rdc - Last post by E.K.Virtanen
I should say that I saw Vintage on the Basic Programming site so I am glad E.K. mentioned it.

["commercial brake"]
http://forum.basicprogramming.org/index.php/topic,1166.0.html
["/commercial brake"]  Roll Eyes

[edit]
@rdc; Nice piece of code. Known rdc quality Smiley

 26 
 on: December 26, 2009, 10:07:54 AM 
Started by rdc - Last post by rdc
Thanks. This is my standard "roll the dice" function I use in other languages. I am glad you implemented multiple arguments as that makes it much easier to create pseudo-functions and use them in the code.

Being an old guy I am enjoying messing around with Vintage. The only thing I am really missing is a Locate statement, but I understand that it wasn't part of the original Basic language used during the time that the Big Book came out. Although I haven't tried it yet, I think I can fake Locate using an array of strings the same size as the screen and just print the array when needed. This way you can create screen-type programs like the old Robots game. Now that I am thinking of it, I may just try and create a Robots game and see how it goes.

I should say that I saw Vintage on the Basic Programming site so I am glad E.K. mentioned it. You have really done a great job with this, and I am enjoying revisiting my past (which is probably just a another sign of old age). Smiley

 27 
 on: December 25, 2009, 12:17:30 PM 
Started by rdc - Last post by Lyle Kopnicky
Yes, that works great, rdc, thanks! It's very good for picking cards or rolling dice in games. Please note that most BASICs of the era did not support multiple arguments in user-defined functions. I saw no issue with compatibility, so Vintage BASIC supports multiple arguments, and also supports string arguments.

 28 
 on: December 25, 2009, 08:00:06 AM 
Started by rdc - Last post by rdc
I did a little random integer FN that might be useful:

Code:
5 REM A LITTLE INTEGER RANDOM FUNC: S = SEED, L = LOW VAL, H = HIGH VAL
10 RANDOMIZE
20 DEF FN RN(S, L, H) = INT((H - L + 1) * RND(S) + L)
25 PRINT "NUMBERS FROM 1 TO 10"
30 FOR I = 1 TO 10
40 PRINT FN RN(1, 1, 10)
50 NEXT I
55 PRINT "NUMBERS FROM 10 TO 20"
60 FOR I = 1 TO 10
70 PRINT FN RN(3, 10, 20)
80 NEXT I


 29 
 on: December 13, 2009, 06:50:32 AM 
Started by E.K.Virtanen - Last post by E.K.Virtanen
It was clear for me at start that Vintage-BASIC is on the list. Actually i try to join in this competition (though im unofficial competitor) with Vintage-BASIC program.

You got email btw about the interview Wink

 30 
 on: December 09, 2009, 01:00:15 PM 
Started by E.K.Virtanen - Last post by Lyle Kopnicky
Sounds fun E.K.! Thanks for approving Vintage BASIC as an entry dialect!

Pages: 1 2 [3] 4
Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!