Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release blocker!: Fix the collision detector to work with Level 2 and above #4

Closed
Tracked by #3
DiddiLeija opened this issue Mar 22, 2024 · 4 comments
Closed
Tracked by #3
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@DiddiLeija
Copy link
Owner

DiddiLeija commented Mar 22, 2024

First pointed in #3, this is a critical issue that must be addressed as soon as possible.

@DiddiLeija DiddiLeija mentioned this issue Mar 22, 2024
43 tasks
@DiddiLeija
Copy link
Owner Author

I'm currently trying to fix the "collision detector" directly on the function (see e2b1087), but seems to be trickier than it seems :/

@DiddiLeija DiddiLeija added help wanted Extra attention is needed bug Something isn't working labels Mar 22, 2024
@DiddiLeija DiddiLeija reopened this Apr 5, 2024
@DiddiLeija
Copy link
Owner Author

Oops, a93b489 closed this accidentally :/

@DiddiLeija
Copy link
Owner Author

I've made a few changes to the way I work with the y-level on levels from 2 and above.

Previously, it worked a bit like:

treat everything like if we're on y=0, but both {LEVEL_NAME}.draw() and detect_collision() (and related functions) have to make adjustments to work as expected

Honestly, making this has become a little tricky, so I adopted a new focus:

Notify the Player and mob classes which is the top y value on this level (and then, the bottom value is y + 120 instead of just 120), and act normally ignoring that y != 0.

Hope this new method works better 😓

@DiddiLeija
Copy link
Owner Author

Fixed! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant