Bombardlos Posted June 23, 2022 Share Posted June 23, 2022 I'm trying to make a cellular automaton using Pixi.js, and so I want it as fast as possible. Each 2 by 2 square is a unit called a bug that looks like this: (without the outline). The top right and bottom left will always be the same color, so on start I currently create 3 sprites based on a white square, put one that covers the whole bug and then one in the upper and lower corner on top of it, create a new container, put these 3 sprites in it, and run a loop that does this and puts each new container in a 2d array that represents the board. Then on each update cycle, I cycle thru the array and for each bug that needs to change, I get its 3 children by id and change their tint. I am very new to Pixi, and to javascript for that matter. I've read thru the pixi API a lot trying to understand how it all works, but I'm not sure if I'm missing something in my methodology that may make it run faster. Any advice? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted July 5, 2022 Share Posted July 5, 2022 join our discord and ask there ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.