Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Game of Life animation #71

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

jsuesse
Copy link

@jsuesse jsuesse commented Jan 8, 2022

I've made a simulation of what somewhat resembles Game of Life in 3D.

Lights will have different amount of neighbors - based on a fixed distance.
State (alive/dead) of a light is calculated based on the portion of alive neighbors.

This has some interesting properties, some areas go into loops; they repeat the same effect until another pattern intrudes it.
I've no clue how this will look on the real tree, though.

Currently working on making lights that were just "born" illuminate in a different color. -> Draft Request for now.

I've followed the discussion about brightness. For this, I just assumed full brightness for all active lights. Around 120-180 are active simultaneously.
If that is too much, let me know!
Might share the code, but gotta clean it up first.

Thanks for reading.

@jsuesse
Copy link
Author

jsuesse commented Jan 8, 2022

I have removed v1, added v2. (did an oopsie - useless commits; squash and merge)
v2 uses yellow to indicate that this light just switched on.

30 or 60 fps will look okish.

Initial seeding is done randomly with a slight bias towards top and bottom lights.

Any suggestions on seeding? Tried doing it based on z-coordinate, somewhat interesting.... find it here: nukerxy:nukerxy-dev-z-axis

@jsuesse jsuesse marked this pull request as ready for review January 8, 2022 15:20
@d-albrecht
Copy link
Contributor

If you are still working on the seeding perhaps use some form of (3D-)noise generator (like in #35 ).

Another idea that could make it easier to follow the animation: You could use colors to represent the cell's age. (just an example, choose your own colors if you like:) Newly born cells start off red, the longer they are alive they then slowly transition through the rainbow, becoming orange, yellow, green, blue, with some of the "always alive" lights ultimately turning violet.

Alternatively you could use one color for cells that just became alive but will already die immediately after, one color for cells that just became alive and will stay alive at least one iteration more, one color for cells that will die next iteration (and were alive before), and one color for all other alive cells. That would create nice transitions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants