From 77cb03d6d04e49e43b86d5fb8a74c0a30c03aa9b Mon Sep 17 00:00:00 2001 From: Justin Young Date: Thu, 20 Jun 2024 17:14:49 -0400 Subject: [PATCH] updated --- README.md | 21 +++++++++++++++++---- image-19.png | Bin 0 -> 24670 bytes src/CA.ts | 2 +- src/main.ts | 1 - 4 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 image-19.png diff --git a/README.md b/README.md index 9b04523..4a1fd9f 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,21 @@ +# Cellular Automata Demo -The demo simply consists of a 36x36 tilemap of blue and white tiles. Blue tiles represent the walls, and white tiles represent the floor tiles. There are two buttons, one that resets the simulation, and the other button triggers the CA algorithm and uses the tilemap to demonstrate the results. +cover image -Also added to the demo is access to some of the variables that manipulate the simulation. We can now modify the behavior of the OOB indexes. For instance, instead of the default 'walls', you can now change the sim to use random setting, mirror the edge tile, or set it constant to 'wall' or 'floor'. +## Description -You also have to ability to see what happens when you unbalance the trigger points. Above we defined 3 and 5 as the trigger points for flipping a tile's state. You have the ability to modify that and see the results it has on the simulation. +The demo simply consists of a 36x36 tilemap of blue and white tiles. Blue tiles represent the walls, and white tiles represent the +floor tiles. There are two buttons, one that resets the simulation, and the other button triggers the CA algorithm and uses the tilemap +to demonstrate the results. -The demo starts with a noise field which is a plugin for Excalibur. Using a numbered array representing the 36x36 tilemap, which has ones and zeroes we can feed this array into the CA function. You can repeatedly press the 'CA Generation Step' button and the same array can be re-fed into the algorithm to see the step by step iteration, and then can be reset to a new noise field again to start over. +Also added to the demo is access to some of the variables that manipulate the simulation. We can now modify the behavior of the OOB +indexes. For instance, instead of the default 'walls', you can now change the sim to use random setting, mirror the edge tile, or set +it constant to 'wall' or 'floor'. + +You also have to ability to see what happens when you unbalance the trigger points. Above we defined 3 and 5 as the trigger points for +flipping a tile's state. You have the ability to modify that and see the results it has on the simulation. + +The demo starts with a noise field which is a plugin for Excalibur. Using a numbered array representing the 36x36 tilemap, which has +ones and zeroes we can feed this array into the CA function. You can repeatedly press the 'CA Generation Step' button and the same +array can be re-fed into the algorithm to see the step by step iteration, and then can be reset to a new noise field again to start +over. diff --git a/image-19.png b/image-19.png new file mode 100644 index 0000000000000000000000000000000000000000..671db6297f506e810f3fc451faad5c70c6838969 GIT binary patch literal 24670 zcmeFZXH=72yETd;ph&TxND~Vk0qF_?A|i&~Bai?}?;WHDK|w)4YUn}f#RTaj6cGU_ zp+kUBMS7E7Lc+Q8yk&p;J>NcOzt6LOoN>m-7>wi&B)QjG*P7Ry^IB`Y)7Dg>r)8z3 zprD`!J$%oS!&=FS}Q^$@NmjQSLG1}vYUMgxHw~@sG&$f@g?T`@pCHR z`kd=iBM%A+hGz2bsWz7aO9~3JZO~&y{gFju(|%QtVjZZl?qUvO{iDzKxb)Fnn@ymhY}W^!Z+anvV%Zd>#Es8pBe#gd`p( zbPg!(SO!zKE^+Em&+e3vfYtko9_QP`a!Y4myunuMfV?6_dDJYu@xLopjctSbAJ~YKId2$hiI&3=8!cf09kbcT4hvNG3tCeES#7 zyMeW5)A*TI6@T!~i!SP3#sa}GCti=p~!ot=U3W++b|{HMwa~4a>S{u z1JBi^Yo0BetSAhg>7n06M+#yvHQYUsiI1Mce}ZKi`@j6)kf+Dd3VPNRb;H&@!c&+{ud$N28na_2?KI_UTk7V7qUH}~eRc{hUaSl^ z&Ep!c+fD9O3FTFJyBrLJdfB9%ek!u=NJ07Iyoi397VOA%`xPU*Q|RlPN_(Revo*8c zsSBBGtY;YGyIPnz9fJ1CMWy)oEq9l1&ZA(TD^ImfkqjL|Lo;<}H}@MkpOX#|F`@|K z>hpQ##%n`HRRfy%>k?m!x=skN%UJ&@|MbJjeV*iDLrrKbC&@Ma@OUAgN>OEMl!t?( z_4u%-a^8$IXSitP`ySEAH~hUFr=`F^z+iB34@_#$ay<4JN%;OdVX_tqMB zA2L%gsV`pp0o~a)C@xwREm`}WHub&&Um-G5^?4lPzcy%&z)@Mv7oEC$;dc~0-36@& zIu`Q#wRZEHZ4O=O_g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ac..81aa84e 100644 --- a/src/CA.ts +++ b/src/CA.ts @@ -62,7 +62,7 @@ function countAdjacentWalls(map: number[], width: number, height: number, index: if (coinflip > 0.5) count++; break; case "mirror": - if (i == 0 || j == 0) count++; + if (map[index] == 1) count++; break; default: count++; // Perceive out of bounds as wall diff --git a/src/main.ts b/src/main.ts index 5ffcf1c..3f698ee 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,7 +2,6 @@ import "./style.css"; import { UI } from "@peasy-lib/peasy-ui"; import { Engine, DisplayMode, TileMap, Vector } from "excalibur"; import { bluey, model, template, whitey } from "./ui"; -//@ts-expect-error import { PerlinGenerator } from "@excaliburjs/plugin-perlin"; export let generator: PerlinGenerator;