摘要
随着电脑游戏的不断发展,游戏的类型越来越多。除了那些发生在无限空间中的游戏或棋牌类游戏以外,大部分游戏需要确定运动物体和环境之间什么时候发生碰撞。本文论述了游戏实体间的碰撞探测、游戏实体与地板、天花板、墙壁等环境碰撞的碰撞探测的编程算法,并给出了用Java语言编写的主要代码。
Along with the progress of computer games, a considerable variety of game has appeared. Except these computer games which are appeared in the infinite space or bridge-type games, in most computer games, it needs to determine when the collision between the object and the environment will happen. In this paper, the programming algorithm of collision detection between game objects itself, and between game objects and the environmental substances, such as wall, floor, and ceiling is described. Also the main codes by Java language was given。
出处
《现代计算机》
2005年第8期84-86,共3页
Modern Computer