Inspiration

John Conway recently passed away, and i saw it on the news. I remembered long ago, when i was a kid, and i was fascinated with these little computer programs, especially Conway's Game of Life. I made this to honor him

What it does

Runs Conway's game of life with wolfram's cellular automaton fed into it.can have any of the 8-bit wolfram rules fed into it. The specific version i fed in for the video is rule 30, because it's the most famous thanks to it's nearly random behavior, but could have any rule. It just makes a real nice animation.

How I built it

I used p5js canvas and an oop system. I put a 2d array of cell classes for both games, and had methods to draw themselves and interact with each other.

Challenges I ran into

I am used to c++ so i kept forgetting to put this. infront of all my in scope variables. I also kept on forgetting to use # infront of my private variables and that was painful. It may not sound that bad, but searching for an undefined in your code for an hour because you forgot a # made me really double check. I also had issues with runtime, but with the help of my friends suggestions and testing, we managed to speed up the program as much as possible.

Accomplishments that I'm proud of

I learned more advanced js, such as OOP, 2d array's, encapsulation, and objects inside of objects. I also had a lot of fun with my less CS savvy friends while doing this project.

What I learned

I never had used js OOP before, as well as such a big project. I learned how to encapsulate data, and how to manage a team as my friends are more or less beginners in js. I learned how a hackathon works, and their different fun demos that are available, even if this was forced online.

What's next for ConwaysGame:Wolfram

I plan to make this in c++ to have it run faster and process it in 4k at up to 60fps. I also have considered feeding the game on all 4 sides, which could lead to some really interesting behavior. We also plan to implement the support to click on the field and have it interact with the game. I was also rather disappointed in how fast the dead cells decayed. When talking to my team, we know it's too late, but we plan to later add a logarithmic decay to the cells. This will make those nice big blooms stay for longer so you can see the glider trails clearer and longer, but also keep the short flashes of color short so they don't take too much attention away from the live cells. We also are considering adding a class for Conway's Game of Life Rules to make that modifiable as well. Lastly, I had to screen record this rather than a frame rendering software and later just upscaled the video in premiere, but if i had more time I would have used a saveCanvas library to get a 4k render.

Built With

Share this project:

Updates