| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | PET Colonies, based upon Conway`s Game of Life |
I made this for the unexpanded VIC-20:
0 def fn
l(i)=a%(y-i,x-i)+a%(y-i,x)+a%(y-i,x+i)+a%(y,x-i)+a%(y,x+i)+a%(y+i,x-i)+a%(y+i,x)+a%(y+o,x+o):poke36879,8:tr%=20:tc%=21:dim
a%(tr%,tc%),b%(tr%,tc%):h=.22:o=1:sr%=3:er%=18:ec%=19:c=.:g%=.:c1=2:c2=3:gosub
1000
1 for y=.to tr%:for x=.to tc%:a%(y,x)=b%(y,x):if a%(y,x)=.then print"
";:goto 3
2 print"*";
3 next x,y:print "generation:";g%;"{home}";:g%=g%+o:for
y=o to tr%-o:for x=o to tc%-o:c=.:c=fn l(o):if a%(y,x)=o and cc1and
cc2then b%(y,x)=.:goto 5
4 if a%(y,x)=.and c=c2then b%(y,x)=o
5 next x,y:if g%<32768 then goto 1
6 goto6:donkeysoft
1000 print"{clear}{green}pet colonies, based upon space colony by
tim hartnell circa 1983 in turn based upon conway's game of
life{home}";:for y=sr% to er%:for x=sr% to ec%:b%(y,x)=rnd(.)+h:next
x,y:return
Programmed with CBM PRG Studio.
The Commodore C64/128 version is here ->
https://github.com/sbebbers/PET-Colonies#pet-colonies-64-for-the-commodore-64128-and-compatibles
Obviously, with it being BASIC, it's quite slow. Although with an
accelerator and BLITZ BASIC it's pretty quick.
Regards,
Shaun
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)SEEN-BY: 57/0 116/102 153/150 250 317/2 3 393/68 633/267 280 640/384 712/620 SEEN-BY: 712/848 770/0 1 3 100 340 772/0 1 210 500 @PATH: 770/3 1 712/848 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.