![]() |
Forum Index : Microcontroller and PC projects : CMM2:Game of Life / upgrade
Author | Message | ||||
twofingers Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1526 |
Six years ago I wrote "The Game of Life" for Maximites. This is the upgraded version of John Conway's GOL for the CMM2. Improvements: graphics, speed and menu for the demos. An editor is planned. It is fast: To complete a small world (1000 cells) it needs ~50ms. A large world (4000 cells) takes ~190ms. Life.zip Any feedback appreciated. Best regards Michael EDIT: BTW: included is a array copy for integers (CSUB). It needs 12ms for an array of 100000 integers. Only useful for very lange arrays. ' CSUB Acopy takes 12ms for 100000 elements ' compared to Basic 860ms ' ****************************************** CONST E=100000 dim integer t(E) dim integer s(E) for i = 0 to E t(i)=i next timer=0 for i = 0 to E:s(i)=t(i):next PRINT timer "ms" timer=0 acopy t(), s(), E PRINT timer "ms" end 'File acopy.bas written 20-08-2020 13:08:46 'acopy source(), dest(), elements CSUB acopy integer, integer, integer 00000000 'acopy B087B480 60F8AF00 607A60B9 617B2300 697BE00E 68FA00DB 697A4413 68B900D2 E9D34411 E9C12300 697B2300 617B3301 461A697B 73E2EA4F E9D16879 42900100 0303EB71 BF00DAE5 371CBF00 F85D46BD 47707B04 End CSUB Edited 2020-08-25 05:47 by twofingers causality ≠correlation ≠coincidence |
||||
Sasquatch![]() Guru ![]() Joined: 08/05/2020 Location: United StatesPosts: 376 |
Looks Good!!! And it is Fast! There be Gliders and Guns! You might want to set the graphics mode to 1,8 although the Small and Med playing fields also look nice in Mode 2,8 -Carl |
||||
qwerty823 Newbie ![]() Joined: 30/07/2020 Location: United StatesPosts: 30 |
Have you seen: MATH SCALE in(), scale ,out() This scales the matrix in() by the scalar scale and puts the answer in out(). Works for arrays of any dimensionality of both integer and float and can convert between. Setting b to 1 is optimised and is the fastest way of copying an entire array. |
||||
twofingers Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1526 |
Hi Carl, thanks for checking. Actually, it's made for >Mode 1,8<. Must have been lost somehow ... ![]() Hi qwerty823 and welcome! No! And you are totaly right! I replaced the ACopy() CSUB with that. It's insignificant slower. Sometimes it is worth reading the manual ... Thank you! ![]() ____________________________ This ist the new version with an included editor. I think it's cool. Life 202.zip Included are some ".gol" files please rename to "LIFE.GOL" Best regards Michael causality ≠correlation ≠coincidence |
||||
Sasquatch![]() Guru ![]() Joined: 08/05/2020 Location: United StatesPosts: 376 |
looks like maybe you accidentally left a save image test in the load function? -Carl |
||||
twofingers Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1526 |
Hi Carl, you are absolutely right again! Took a picture for the forum and forgot to remove the inserted code. It seems I'm too old for the Game of Life! ![]() Thank you! EDIT 27.09.2020: The latest version has nine slots for storing GOL files, a single step mode, additional GOL files, an auto save mode, improved speed and more. I included epsilons very useful MAR archive program (v0.3). Many thanks for that! ![]() EDIT 16.10.2020: This is the new XL version. It is working with MMBasic >=V5.05.04 but especially for MMBasic V5.05.06 and later. With MMBasic V5.05.06 it is now very fast (8 times than the older version). I had to include a brake. Livex 35.zip Enjoy! Edited 2020-10-16 22:34 by twofingers causality ≠correlation ≠coincidence |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |