none
Conway's Life V2 program RRS feed

  • General discussion

  • I'm new to Small Basic so thought I'd take a look at enhancing an existing project I spotted by Gunthtab which does Conway's Life simulation. Here's his original project - http://smallbasic.com/program/?RVR167

    I've taken his original great program and hopefully:-

    - Sped it up. I believe it works quite a few times faster.

    - Allow the user to amend the cells more easily, simply by clicking the screen directly rather than going into a dedicated editor.

    - Allows the user to define the FPS they wish to run at (ie: 1, 2, 4, 10 or 20). This includes showing the actual FPS rate and a workload bar showing how much effort your PC is making to achieve the FPS.

    - When resizing the grid, the routine now tries to move the existing "grid" to a central position...


    Here's my updated version - http://smallbasic.com/program/?JHH355

    Hope it proves of interest.

    WARNING: I noticed it unfortunately hangs/freezes when run in the browser (in Silverlight). But it certainly seems to work fine on any machine I try it directly through Small Basic itself.




    • Edited by NFawcett Saturday, May 9, 2015 9:20 PM
    Saturday, May 9, 2015 5:59 PM

All replies

  • (translated by Google-translator)

    Good job. Nice to look at the program. It's nice to work with it.

    Thank you.

    Saturday, May 9, 2015 6:51 PM
  • On a side note, I did some speed tests on arrays and it works out ARRAY.setvalue and ARRAY.getvalue are 6-10 times quicker than traditional arrays.

    eg: ARRAY.setvalue("grid", x*dimension + y, 1) is 6-10 times quicker than grid[x][y]=1.

    Using ARRAY.setvalue and ARRAY.getvalue alone doubles the FPS of the program!

    Saturday, May 9, 2015 6:55 PM