I’ve been plugging away on this little game of life project. So far there are a few problems I’ve run into that have been fairly interesting to solve:
- Detecting mouse clicks on an element. Currently I’ve got a decent solution for this but I think that I want to explore making it a little more robust in the future
- Drawing lots of objects at once is really slow, I still haven’t fully addressed this problem. I still have a few things I want to try. I think pre-rendering may help the initial load. I also need to break out my old rendering techniques book to get some ideas. I need to experiment with the concept of buffers if I want to go forward with rolling my own api for drawing stuff. I’m also considering digging into a library like kineticjs for drawing.
Up next is getting the actual game of life rules functioning and making the animation
of it all work. Currently what I have is simple but I think it demonstrates the power of the canvas and it’s totally fun!
Tonight I also updated my Gruntfile to watch my js files so I don’t have to bother running a grunt task to compile every time I want to test something. I’ve gotta say Grunt is a pretty awesome tool for automating your workflow. Stay tuned for more later!!