Routines to be used with gint to get AABB or pixel perfect collision detection
Go to file
Sylvain PILLOT 2c6e923ea1 Added README.md and some comments in the code 2023-08-25 10:22:50 +02:00
assets-cg Significantly speed up the collision detection for Pixel Perfect 2023-08-25 09:52:01 +02:00
src Added README.md and some comments in the code 2023-08-25 10:22:50 +02:00
.gitignore first commit 2023-08-24 22:22:24 +02:00
CMakeLists.txt Significantly speed up the collision detection for Pixel Perfect 2023-08-25 09:52:01 +02:00
PixColli.g3a Added README.md and some comments in the code 2023-08-25 10:22:50 +02:00
README.md Added README.md and some comments in the code 2023-08-25 10:22:50 +02:00

README.md

Simple AABB and Pixel Perfect collision detection routines for fxSDK/gint

This is an example of routines that can be used on some image_t formats used within gint/fxSDK:

  • AABB works on all format and is based on overlapping surrounding boxes detection, which is really fast but not accurate in the case of partially transparent images,
  • Pixel Perfect work on IMAGE_RGB565, IMAGE_RBG565A, IMAGE_P8_RGB565 and IMAGE_P8_RGB565A formats (P4 formats not supported yet) and is based on image data scanning and search for collision of two non transparent pixels (one in each image)

The DEBUG version of pixel perfect draws a lot of stuff on the screen to help debugging and understanding how it works.

Feel free to use in you own programs if needed.