Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Life! V1.0
#21
yeah, I'm using fbc .14, thats probably what it is. I dunno what though. :???:
[Image: freebasic.png]
Reply
#22
Strange, I downloaded .14 too see if I could do some bugtracking,
but it worked fine for me...
If you want I can upload a compiled verision too see if it behaves
odd then too...


Note that it's the LATEST .14 unstable verision I just saw at the
forums that release mor than one unstable version under the same
number...
/post]
Reply
#23
yeah, sure. post a compiled version, this confuses me :???:
[Image: freebasic.png]
Reply
#24
Me too:
http://forum.qbasicnews.com/users/file.php?id=124
/post]
Reply
#25
well, that one works.... :???:
[Image: freebasic.png]
Reply
#26
here is one i knocked up during lunch hour - will improve it soon
Code:
'                          LIFE 1.0 - Qbasic 1.0
'
'                       Coded By RaVeNXau - 18/07/05


' Initialize two grids
DIM grid1(81, 25), grid2(81, 25)
CLS

' place the Gosper glider gun in the middle of the screen
seedgrid:
READ x, y
IF x > 0 THEN grid1(x, y) = 1: GOTO seedgrid
DATA 1,5,1,6,2,5,2,6,11,5,11,6,11,7,12,4,12,8,13,3,13,9,14,3,14,9,15,6,16,4
DATA 17,5,17,6,17,7,16,8,18,6,21,3,21,4,21,5,22,3,22,4,22,5,23,2,23,6,25,1
DATA 25,2,25,6,25,7,35,3,35,4,36,3,36,4,-1,-1

' render display
render:
FOR y = 1 TO 24
FOR x = 1 TO 80
LOCATE y, x
PRINT CHR$(-176 * (grid1(x, y) = 1) - 32 * (grid1(x, y) = 0));
NEXT x
NEXT y

' calculate next generation
FOR y = 1 TO 24
FOR x = 1 TO 80
cellcount = (grid1(x - 1, y - 1)) + (grid1(x, y - 1)) + (grid1(x + 1, y - 1)) + (grid1(x - 1, y)) + (grid1(x + 1, y)) + (grid1(x - 1, y + 1)) + (grid1(x, y + 1)) + (grid1(x + 1, y + 1))
grid2(x, y) = grid1(x, y)
IF cellcount = 3 THEN grid2(x, y) = 1
IF grid1(x, y) = 1 AND (cellcount < 2 OR cellcount > 3) THEN grid2(x, y) = 0
NEXT x
NEXT y

' copy new generation to main grid
FOR y = 1 TO 24
FOR x = 1 TO 80
grid1(x, y) = grid2(x, y)
NEXT x
NEXT y

' Delay - adjust if needed
' FOR t = 1 TO 400000: NEXT t
GOTO render
Reply
#27
A glider gun! Awesome!

But.. QB? And 1.0 at that?

FREEBASIC!!!!!
Reply
#28
Quote:A glider gun! Awesome!

But.. QB? And 1.0 at that?

FREEBASIC!!!!!

QB 1.0 - as it was the only thing available on the office pc. Big Grin
Reply
#29
Oh, I see. Anyway technically that source IS 100% compatible with FB, i just noticed that it said "made in qb 1.0"

But still...

GLIDER GUN! AWESOME!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)