大量物体的碰撞检测
在给定时间,我在屏幕内有大约数百个移动对象,加上一千多个静止对象。 为简单起见,您可以将其视为有很多球的台球游戏:) 其中一些保持静止,另一些以各种速度向各种不同方向移动。 每当每个球碰撞到另一个球时,我都需要进行碰撞检测。 考虑到性能和编程简单性,最好的方法是什么? 我只是在谈论算法,我想我可以自己实现它,但也欢迎有关实现的建议;)
语言是 C#,XNA 3.1,2D 图形,目标平台仅限 Windows(如果重要的话)。 在此先感谢您的帮助!
I have around several hundreds of moving objects within screen at the given time, plus a thousand+ stationary objects. For simplicity, you can think of it as a billiard game with damn lots of balls :) Some of them are stayin still, some others are moving at all sorts of speeds to all sorts of different directions. I need coll detection each time each ball bumps into another ball. What is the best method, considering performance and, well, programming simplicity? I'm talking algorithm only, I guess I can implement it myself, tho suggestions on implementation are welcome as well ;)
Language is C#, XNA 3.1, 2D graphics, target platform is Windows only (if that matters). Thanks in advance for your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能想查看此问题的答案。
You might want to take a look at the answers to this question.