碰撞检测教程 [英] Collision detection tutorials

查看:188
本文介绍了碰撞检测教程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该开发使用AWT一个Java游戏。我坚持用碰撞检测的概念。如果你能帮助我与概念解释任何教程(它是如何工作),或举实例(来源$ C ​​$ C),我会很感激。

I'm supposed to develop a Java game using AWT. I'm stuck with the concept of "collision detection". If you can help me with any tutorials that explain the concept (how it works) or give examples (source code), I'd be grateful.

推荐答案

在2D碰撞检测强大的教程可以在的 metanetsoftware(N个品牌)

A strong tutorial on 2d collision detection can be found at metanetsoftware (makes of N)

作者写的理论基础和面临的挑战。他们给你一些code,以及(不基于AWT,但其同样的程序和code是容易翻译)。它们涵盖其网页上更高级的主题,以及(例如瓷砖的碰撞检测

The authors write about the theoretical fundamentals and the challenges. They give you some code as well (not awt based but its the same procedure and the code is easy to translate). They cover more advanced topics on their page as well (for example tile-based collision detection)

更新#2:一个伟大的概念背景在这里给出:的 GDC 2010 presentation关于联系代

Update #2: A great conceptual background is given here: GDC 2010 presentation about contact generation

更新:碰撞检测的工作是如何不同的方法,一个相当不错的例子此拉斯特库。该文档描述的一些技术和源$ C ​​$ c是pretty可以理解的。从此资源学习给你很多的了解。

Update: A fairly nice example of how different methods of collision detection work is given in this RUST library. The docs describe some of the techniques and the source code is pretty understandable. Learning from this resource gives you a lot of understanding.

在一个侧面说明:要问的东西正确的位置是在gamedev stackexchange。因为你只是在这方面开始看看这个帖子

On a side note: the right place to ask that stuff is at the gamedev stackexchange. Since you are just starting in that area take a look at this post

这篇关于碰撞检测教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆