Skip to content

Fix Example Powerup Collision#30

Merged
wick3dr0se merged 4 commits intowick3dr0se:mainfrom
cyypherus:cyy/collision
Apr 3, 2025
Merged

Fix Example Powerup Collision#30
wick3dr0se merged 4 commits intowick3dr0se:mainfrom
cyypherus:cyy/collision

Conversation

@cyypherus
Copy link
Contributor

The collision was previously using the top left corner of the player sprite as the center for collision checks - this updates the example to use the center of the player.

@cyypherus cyypherus marked this pull request as draft April 3, 2025 21:02
@wick3dr0se
Copy link
Owner

wick3dr0se commented Apr 3, 2025

@cyypherus nice! Last time I ran it, I was thinking about how terrible the collisons were lmao

It's ready for merge right (asking because draft mark)? It looks good to me

@cyypherus
Copy link
Contributor Author

Not quite, I think I'm still missing something. I'll mark it ready when I get it straightened out.

@cyypherus
Copy link
Contributor Author

This should be good to go now.
Position now always represents the center of the sprite so the rendering code has been modified a bit.
Power ups now have a width & a height for uniformity & collision uses the size of both the powerup & the player to check collision.

@cyypherus cyypherus marked this pull request as ready for review April 3, 2025 21:50
@wick3dr0se wick3dr0se merged commit c5f3bdc into wick3dr0se:main Apr 3, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants