[PDF]

Efficiency - Accuracy Balance in 2D Collision Detection: A Comparative Analysis of Grid-Based and Border-Only Algorithms


Oliwia Stajuda

08/09/2025

Supervised by Frank C Langbein; Moderated by Federico Liberatore

One of the fundamental challenges faced by 2D game developers is maintaining an accuracy - efficiency balance in collision detection. Traditional approaches require form them to choose between complex polygon and pixel-perfect methods that provide accuracy but are computationally expensive, and simple geometric shapes, which are fast but less precise. This trade-off significantly impacts modern games with numerous interactive elements and detailed artwork, especially when they are intended for various hardware platforms, such as desktop computers and mobile devices.

This project covers this difficulty by putting into practice and assessing automated hitbox generation algorithms that are able to adjust complex sprite artwork without manual configuration overhead. The project's performance baseline is Unity implementation of Sajo et al.'s grid-based collision detection algorithm, on which the new border-only strategy is built. The latter strategically places colliders only on the borders of the visible sprite area to minimise computational costs without sacrificing detection accuracy.

The study compares both algorithms in terms of hitbox generation performance, runtime collision detection efficiency, memory usage, and collision accuracy through controlled experimentation using Unity 2022.3 LTS. The measurements are made across various sprite geometries and grid resolutions to find the best algorithm selection criteria based on sprite characteristics and application needs. By this, the study fills the identifies gap between theoretical collision detection research and real-world game development implementation.


Final Report (08/09/2025) [Zip Archive]

Publication Form