我应该使用什么 OOP 库来进行 2D 矢量图形推理、碰撞检测等?
假设我想制作一个简单的 2D“街机”游戏,其中多边形玩家可以四处移动、直线射击、成为爆炸的目标等。这似乎需要大量的几何计算来弄清楚哪个多边形被一条线相交,玩家和景观障碍物之间的碰撞,哪些多边形与代表爆炸的圆圈碰撞等等。
是否有一个很好的现成的面向对象的库可以处理所有这些东西都是给我的? .NET 或 ActionScript 代码是理想的选择,但如果没有其他选择,我也可以使用 C++。
suppose I want to make a simple 2D "arcade" game with polygonal players that move around, shoot straight, are targeted by explosions and similar. This seems to require lots of geometric computations to figure out which polygon is intersected by a line, collisions between players and landscape obstacles, what polygons collide with the circle representing an explosion etc.
Is there a nice ready-made object oriented library that would handle all this stuff for me? .NET or ActionScript code would be ideal, but I am fine with C++ as well if no other choice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所谓现成的,你的意思是只添加一个标题?那有什么乐趣呢?如果您正在研究 C++,那么您可以使用 DarkGDK...我听说它很容易学习,但上次我检查过,如果您使用它,他们没有 Visual Studio 2010 的补丁。我更喜欢像 OpenSceneGraph 这样的东西……一开始学起来有点麻烦,但一旦你学会了,它就可以让你以后很好地学习其他东西,比如 OpenGL。对于其他语言,可能有很多模板。它是用来做什么的?
by ready-made you mean just add a title? wheres the fun in that? if your looking at C++ then you could use DarkGDK... ive heard its quite easy to learn but last time i checked they dont have a patch for visual studio 2010 if your using that. Id prefer something like OpenSceneGraph... its abit nasty to learn at first but once you do, it allows you to go onto other things later on like OpenGL nicely. With regards to other languages there are probably alot of templates out there. Whats it going to be for?