Controlling the Accuracy and Efficiency of Collision Detection in 2d Games using Hitboxes
- Title
- Controlling the Accuracy and Efficiency of Collision Detection in 2d Games using Hitboxes
- Creator
- Sajo P.; Gokulapriya R.; Mithun B.N.
- Description
- Collision detection is a process in game development that involves checking if two or more objects have intersected or collided with each other. It is a fundamental aspect of game mechanics that cannot be overlooked. Games invloves assets/sprites, which tend to be drawn digitally with the help of a computer program. This paper discusses controlling and detecting collisions in games that make use of PNG images as game assets. The conventional way to detect collision in a game is to check if the object is within the bounding box of another object or asset. However, such a method lacks realism and doesn't work well with much complex shapes as the game might register a hit when another object collides with the transparent part of the object being checked for collision. In order to overcome these limitations, the proposed algorithm divides the entire image into smaller rectangles and stores its coordinates in an array. The array is then pruned by removing coordinates with no translucent or opaque elements. Collision is detected by checking if any of the points of the collision object is inside the image array. 2023 IEEE.
- Source
- Proceedings of IEEE InC4 2023 - 2023 IEEE International Conference on Contemporary Computing and Communications
- Date
- 2023-01-01
- Publisher
- Institute of Electrical and Electronics Engineers Inc.
- Subject
- 2d games; accuracy; automated hitboxes; Collision detection; efficiency; hitboxes
- Coverage
- Sajo P., CHRIST(Deemed) University, Dept. of Computer Science, Bengaluru, India; Gokulapriya R., CHRIST(Deemed) University, Dept. of Computer Science, Bengaluru, India; Mithun B.N., CHRIST(Deemed) University, Dept. of Computer Science, Bengaluru, India
- Rights
- Restricted Access
- Relation
- ISBN: 979-835033577-4
- Format
- Online
- Language
- English
- Type
- Conference paper
Collection
Citation
Sajo P.; Gokulapriya R.; Mithun B.N., “Controlling the Accuracy and Efficiency of Collision Detection in 2d Games using Hitboxes,” CHRIST (Deemed To Be University) Institutional Repository, accessed February 25, 2025, https://archives.christuniversity.in/items/show/19799.