Let's discuss your "Game of Life"

Looks awesome man! I wish I started with canvas. After done a lot of research about how to render quickly, canvas seemed the best one. Good job!

Another canvas implementation

Project Link --> https://codepen.io/BrusBilis/full/BLrgNg

Project Link - https://codepen.io/cjsheets/full/BLEwgq/

Nothing fancy, simple implementation leaning entirely on react and only built to spec. Criticism is always welcome.

Iā€™ve learned a lot going through the react projects, reading documentation and particularly seeing some of the impressive submissions of other Campers. I think Iā€™ll take a few cues from how others completed this project while working on the Dungeon Crawler.

Your implementation is very impressive.

I understand your struggle and desire to keep everything in react, though I guess in a way you choose the best tools for the task at hand. It doesnā€™t appear your knowledge of the framework was the limiting factor anyway.

Iā€™m actually learning about as much reading over your code as I did researching for the project. I appreciate your effort.

i fixed that bug, now it works properly. Thanks

Thereā€™s a bug in your code: when I hit clear button twice, it will resume the map generation.

1 Like

I believe you need to tweak or modify your algorithm on how each state generates new ones. It doesnt behave quite exactlyā€™s John Conway

Thank you very much for looking over my project.

I fixed the bug. I wrote a really poorly considered ā€œtoggle stateā€ method that led to the issue. Replaced it with a set-state method.

No problem.
As Iā€™ve suggested in this thread to someone, try to implement requestAnimationFrame instead of using setInterval

More info: https://css-tricks.com/using-requestanimationframe/

Thanks DUDEEEEEEEEEEEEEEEEEE

1 Like

http://codepen.io/MichaelWStuart/full/yVjJxE/

here is mine:

Project Link - http://codepen.io/chemok78/full/aBgRGm/

Hereā€™s my Game of Life: http://codepen.io/LarryMary/pen/LbwvLa?editors=0010. I havenā€™t turned it in yet as Iā€™m having a few issues still. Thought maybe I could get some feedback here. The first is my ā€œrandomizeā€ and ā€œtrashcanā€ buttons need to be pressed twice to do their thing. I canā€™t figure out why this is. Following in the debugger it seems like everything is ok; methods run, variable and state are set. For whatever reason I canā€™t get a re-render on the first press. Iā€™m also having issues with general performance. The animation seems to get really bogged down with larger grid sizes.

Hereā€™s my game of life. Itā€™s basic but I made it so you can click and drag to add or remove cells.

Game of Life

Any critiques are welcome.

I implemented the Game of Life a couple of months ago with vanilla JavaScript, but I wanted to re-do it after learning React & Redux to test my chops. It wasnā€™t as easy as I expected, but I definitely learned a lot doing it!

Link

Hi - I just finished the ā€œGame of Lifeā€ project.
I tried to keep the UI as clean as possible.
I went a step further with it and added some functionality to stop the game, go back a step (essentially a history of moves), forward one step, clear the screen and also added the ability to increase the rows/columns dynamically.
Iā€™d love to have any feedback you might have :slight_smile:

Game of Life http://codepen.io/alamm/full/aBMwxb/

Hey Jordan - I really like the click and drag feature !

Hey thanks a lot. It took some fiddling to get it to feel smooth. The ability to step through yours forwards and backwards was a nice touch.