sloukit / pydew-valley-uzh

Mod of Pydew Valley for an experimental study in Psychology
Creative Commons Zero v1.0 Universal
31 stars 61 forks source link

enha(Hitboxes): Enhancing hitboxes and collision detection #89

Closed michelfinley closed 3 months ago

michelfinley commented 3 months ago

Summary

This PR enhances the current hitbox system to improve collision detection, and fixes several related bugs.

See also #72 #42 and #35.

Fixed several bugs such as NPCs bugging through hitboxes or out of bounds, and the Player being set back to an illogical position when colliding with objects from the wrong direction.

Implemented by @raphael-pietrzak:

Implemented by @michelfinley:

Media

image sprite rect and hitbox overlay

image Object hitboxes can be added in Tiled's tile collision editor

Checklist

Labels

https://github.com/sloukit/pydew-valley-uzh/labels/area%3A%20code%20quality https://github.com/sloukit/pydew-valley-uzh/labels/game-mechanics https://github.com/sloukit/pydew-valley-uzh/labels/priority%3A%20high https://github.com/sloukit/pydew-valley-uzh/labels/type%3A%20enhancement