dbTalk Databases Forums  

Another trip down Memory Lane: SQUARES

comp.databases.pick comp.databases.pick


Discuss Another trip down Memory Lane: SQUARES in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
frosty
 
Posts: n/a

Default Another trip down Memory Lane: SQUARES - 05-25-2006 , 05:37 PM






I believe John Bohner was the originator of this little toy
program, back in... well, don't remember the year, but I
first saw it running at 1200 baud. It actually is more fun
to watch at slower speeds. Written for uniData BASIC, but
pretty generic code that should compile on other platforms.

--
frosty

w = INT((SYSTEM(2)+2)/24)
h = INT((SYSTEM(3)+1)/12)
spots = "*+X#\/-| "
LOOP UNTIL SYSTEM(14) DO
x = 14 + 24 * (RND(w)); y = 5 + 12 * (RND(h))
zone1 = RND(5); zone2 = RND(6)
IF zone1 = zone2 THEN zone1 = 0; zone2 = 5
IF zone1 < zone2 THEN dir = 1 ELSE dir = -1
spot = spots[RND(LEN(spots))+1,1]; spot2 = spot:spot
FOR zone = zone1 TO zone2 STEP dir
t = y-zone; b = y+zone; l = x-zone*2; r = x+zone*2
IF zone1 = 0 AND zone2 = 5 THEN
CRT @(x-zone*2,y-zone):spot2: @(x+zone*2,y-zone):spot2:
CRT @(x-zone*2,y+zone):spot2: @(x+zone*2,y+zone):spot2:
END ELSE
CRT @(l,t):STR(spot,zone*4): @(l,b):STR(spot,zone*4):
FOR i = t TO b STEP 1; CRT @(l,i):spot2:; NEXT i
FOR i = b TO t STEP -1; CRT @(r,i):spot2:; NEXT i
END
NEXT zone
REPEAT
END



Reply With Quote
  #2  
Old   
Jeffrey Kaufman
 
Posts: n/a

Default Re: Another trip down Memory Lane: SQUARES - 05-25-2006 , 07:50 PM






I don't remember that one. But I think I have the old GAMES account saved
somewhere. I'll try to dig it up and post it.

"frosty" <frostyj (AT) bogus (DOT) tld> wrote

Quote:
I believe John Bohner was the originator of this little toy
program, back in... well, don't remember the year, but I
first saw it running at 1200 baud. It actually is more fun
to watch at slower speeds. Written for uniData BASIC, but
pretty generic code that should compile on other platforms.

--
frosty

w = INT((SYSTEM(2)+2)/24)
h = INT((SYSTEM(3)+1)/12)
spots = "*+X#\/-| "
LOOP UNTIL SYSTEM(14) DO
x = 14 + 24 * (RND(w)); y = 5 + 12 * (RND(h))
zone1 = RND(5); zone2 = RND(6)
IF zone1 = zone2 THEN zone1 = 0; zone2 = 5
IF zone1 < zone2 THEN dir = 1 ELSE dir = -1
spot = spots[RND(LEN(spots))+1,1]; spot2 = spot:spot
FOR zone = zone1 TO zone2 STEP dir
t = y-zone; b = y+zone; l = x-zone*2; r = x+zone*2
IF zone1 = 0 AND zone2 = 5 THEN
CRT @(x-zone*2,y-zone):spot2: @(x+zone*2,y-zone):spot2:
CRT @(x-zone*2,y+zone):spot2: @(x+zone*2,y+zone):spot2:
END ELSE
CRT @(l,t):STR(spot,zone*4): @(l,b):STR(spot,zone*4):
FOR i = t TO b STEP 1; CRT @(l,i):spot2:; NEXT i
FOR i = b TO t STEP -1; CRT @(r,i):spot2:; NEXT i
END
NEXT zone
REPEAT
END





Reply With Quote
  #3  
Old   
Tracy Raines
 
Posts: n/a

Default Re: Another trip down Memory Lane: SQUARES - 05-26-2006 , 12:08 AM



It compiled and run fine in QM. It should have a clear screen command
to start with, but ran nevertheless. QM doesn't support the typeahead
buffer (SYSTEM(14)), but the break key worked.


Reply With Quote
  #4  
Old   
Dave Mitchell
 
Posts: n/a

Default Re: Another trip down Memory Lane: SQUARES - 05-26-2006 , 12:24 AM



Same deal in UV - I added CRT @(-1) to clear the screen at the beginning and
end, and had to write a few lines of code to check for a key press rather
than SYSTEM(14), but after that it looked great. Probably made a cool
screensaver in its day....


"Tracy Raines" <liveblues (AT) gmail (DOT) com> wrote

Quote:
It compiled and run fine in QM. It should have a clear screen command
to start with, but ran nevertheless. QM doesn't support the typeahead
buffer (SYSTEM(14)), but the break key worked.




Reply With Quote
  #5  
Old   
Bruce Nichol
 
Posts: n/a

Default Re: Another trip down Memory Lane: SQUARES - 05-26-2006 , 12:49 AM



Goo'day, Tracy,

On 25 May 2006 22:08:09 -0700, "Tracy Raines" <liveblues (AT) gmail (DOT) com>
wrote:

Quote:
It compiled and run fine in QM. It should have a clear screen command
to start with, but ran nevertheless. QM doesn't support the typeahead
buffer (SYSTEM(14)), but the break key worked.
A better solution might be X = INPUT S,-1; UNTIL X DO... - check the
HELP docs...

and,IMHO, the original program "looks" better running slower... I
tried it with NAPs of 10, 20 and 30.....emulating 1200 baud....
Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

If it ain't broke, fix it until it is....


Reply With Quote
  #6  
Old   
Bruce Nichol
 
Posts: n/a

Default Re: Another trip down Memory Lane: SQUARES - 05-26-2006 , 12:59 AM



Sorry! Mental aberration.....

On Fri, 26 May 2006 15:49:50 +1000, Bruce Nichol
<reverse_ecurb (AT) taloncs (DOT) com.au> wrote:


INPUT S,-1
UNTIL Ss DO...

Apologies.
Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

If it ain't broke, fix it until it is....

Reply With Quote
  #7  
Old   
Homer L. Hazel
 
Posts: n/a

Default Re: Another trip down Memory Lane: SQUARES - 05-26-2006 , 08:46 AM



Bruce,

Please check again! 8>)

Did you really mean UNTIL Ss DO...

Thanks,

Larry Hazel

"Bruce Nichol" <reverse_ecurb (AT) taloncs (DOT) com.au> wrote

Quote:
Sorry! Mental aberration.....

On Fri, 26 May 2006 15:49:50 +1000, Bruce Nichol
reverse_ecurb (AT) taloncs (DOT) com.au> wrote:


INPUT S,-1
UNTIL Ss DO...

Apologies.
Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

If it ain't broke, fix it until it is....



Reply With Quote
  #8  
Old   
Ed Clark
 
Posts: n/a

Default Re: Another trip down Memory Lane: SQUARES - 05-26-2006 , 05:19 PM



Looks cool, even more so on accuterm running a screen size of 132x44.
And it works as is on Cache.

frosty wrote:

Quote:
I believe John Bohner was the originator of this little toy
program, back in... well, don't remember the year, but I
first saw it running at 1200 baud. It actually is more fun
to watch at slower speeds. Written for uniData BASIC, but
pretty generic code that should compile on other platforms.


Reply With Quote
  #9  
Old   
Bruce Nichol
 
Posts: n/a

Default Re: Another trip down Memory Lane: SQUARES - 05-26-2006 , 08:31 PM



Goo'day, Larry,On Fri, 26 May 2006 06:46:10 -0700, "Homer L. Hazel"
<hNoOmerlhANTI (AT) SPAMcox (DOT) net> wrote:

Quote:
Bruce,

Please check again! 8>)

Did you really mean UNTIL Ss DO...
Bloody hell! Slippery fingers. All done in a rush...late getting
to the pub, again...

Thaks for noticing. Does this mean that people actually read what I
send? Marvellous!

No, "UNTIL S DO" will DO fine.... Sorry

Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

If it ain't broke, fix it until it is....


Reply With Quote
  #10  
Old   
murthi
 
Posts: n/a

Default Re: Another trip down Memory Lane: SQUARES - 05-27-2006 , 10:59 AM



If anyone has access to the following games, I'd greatly appreciate them
posting the code. I have them, I think on an account on 8mm tape or
something, but of course it's not urgent enough for me to find a system:

1- LIFE (game of life, non-interactive, BASIC version Required a seed
string to start and totally fascinating to watch. At curent computer speeds,
the life cycle frequence would probably be almost too fast (I actually
rewrote it in Pick Assembler eventually for speed).
2- The screen version of STARTREK (mostly written by me) which, unlike
the origina, scrolling Simms version, displayed a static universe and
refreshed only the sections needed. I actually modfied the original in, say
'78 when a friend of mine was desperatley looking for work while staying
with us, and he got hooked on Startrek. At 300 baud, the new version was
enough to satisfy his obession.

Chandru

"Ed Clark" <edclark (AT) cris (DOT) com> wrote

Quote:
Looks cool, even more so on accuterm running a screen size of 132x44. And
it works as is on Cache.

frosty wrote:

I believe John Bohner was the originator of this little toy
program, back in... well, don't remember the year, but I
first saw it running at 1200 baud. It actually is more fun
to watch at slower speeds. Written for uniData BASIC, but
pretty generic code that should compile on other platforms.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.