阅读背景:

通过2个数组javascript画布游戏优化循环

来源:互联网 

I'm working on my first javascript canvas game, and I wonder is there a better way for comparing collisons between objects in 2 arrays. For example i have an array with rockets, and array with enemies, the code is working, but i think when arrays length becomes much larger it will have effect on the performance. Example 100 rockets through 100 enemies is 10000 iterations per frameI'm working on my first javascript canvas game,




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: