我在 VB.NET 中制作文字云,但我遇到了性能问题。我试过四叉树,但我的实现很慢。
我遵循了本教程: http: //gamedevelopment.tutsplus.com/tutorials/quick-tip-use-quadtrees-to-detect-likely-collisions-in-2d-space--gamedev-374
但我的主要问题是,当我在“画布”上放置文字时,我经常进行检查,因为我有半径步长示例 0.01,以便最好地紧贴中心,同样的事情适用于角度步长 0.5
1 take word
2 place it to center of canvas
3 while it collides with other(I am testing all other objects)
move it by little bit on the spiral
4 set radius to 0, so I start at center again, angle is not changed
5 step 1
所以我的问题是,对于不经常检查或其他性能调整,您有什么建议?提前致谢
以下是结果的截图: