![]() ![]() It includes all of the implementations discussed in this blog.Conway's Game of Life: an Overview The Game of Life Table of Contents This was also the first time using babylon.js, and it was pretty easy to use. The only change I did was change the rules to better fit the 3D space. Implementing the game of life in 3D was pretty straight forward, and it helped a lot to first test it in 2D, as the algorithm works exactly the same in 3D space as 2D space. This reduces the number of batches to the GPU from 6,859 to less than 100! As a result, the game now runs at a premium 60 fps! Conclusion The greatest performance benefit came from using only one material for all the meshes and making the meshes copies of a root mesh. I also froze the positions of all the cells, as the cells don’t move after being created and so babylon.js doesn’t need to check for changes. To improve performance, if a cell was dead I would set the cube as not visible after it’s animation was finished. This of course led to pretty poor performance (15 fps). This means that I have 6,859 cubes being rendered to the screen… that’s a lot! The cube mesh only becomes visible when the cell becomes alive. In the above examples, for every possible location of a cell, there is a cube mesh. Let me know if you find any cool configurations! Optimizing See if you can find the configuration by trying it out yourself. I am still in the process of discovering it. I have tried really hard to find a configuration that produces the glider behavior found in the 2D version. This is a cube that repeats every 3 generations. I have taken the liberty to name them as well :) The Stairs I created the ability to randomize the starting population and found some really neat cell behaviors. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |