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

Improve scrolling #243

Open
odecay opened this issue Aug 29, 2022 · 7 comments
Open

Improve scrolling #243

odecay opened this issue Aug 29, 2022 · 7 comments
Assignees
Labels
scope:undetermined Undetermined size, needs investigation

Comments

@odecay
Copy link
Collaborator

odecay commented Aug 29, 2022

Description

Currently, the scrolling logic is simplistic - it moves forward once one player reaches a certain threshold, unless something is holding back, e.g. the other player is on the left edge (see video).

The logic needs to be improved to work like a real beat'em up:

  • it should follow the player once it reaches a certain threshold, like it's now (although Final Fight's threshold is the center of the screen, for example)
  • it should be blocked if there is a blocker
    • a player on the left edge (like it's now)
    • a boss encounter
  • when blocked, players should be allowed to move across the whole screen
  • when not blocked, it should catch up, if needed.
2022-08-29.13-17-15.mp4
@odecay odecay added kind:bug Something isn't working scope:undetermined Undetermined size, needs investigation labels Aug 29, 2022
@64kramsystem
Copy link
Member

Hmmm 🤔 I'll take a look!

@64kramsystem 64kramsystem self-assigned this Aug 29, 2022
@64kramsystem
Copy link
Member

What happens in cases like this if you move the player that it's behind? In the (first) iteration of the scrolling, as I've implemented it, not allowing the players to move in the whole area of the screen was intentional, in order to keep the logic simple. If this is the problem you refer to, then we should improve the scrolling routine sooner rather than later 😬.

@odecay
Copy link
Collaborator Author

odecay commented Aug 29, 2022

Ah thats likely the issue! I've not been moving p1 at all but I think sometimes the enemies knock them forward and that must allow p1 to move past that point.

Let me see if I can reproduce quickly.

edit: yeap seems like you are right, in which case this is not really a bug. I think if p2 gets knocked backwards a bit from starting position by the enemies it prevents p1 from moving past the trigger point for boss. I notice now in the video I posted that sharky is a bit behind its normal starting position, compared by visual reference to the rock above.

@64kramsystem
Copy link
Member

edit: yeap seems like you are right, in which case this is not really a bug. I think if p2 gets knocked backwards a bit from starting position by the enemies it prevents p1 from moving past the trigger point for boss. I notice now in the video I posted that sharky is a bit behind its normal starting position, compared by visual reference to the rock above.

Yeah, the player that is behind inevitably blocks the scrolling. When I implemented this, there was no boss, so it was acceptable to keep it simple. The difference is that, now that we have boss fights, the players should be allowed to move over the whole screen (currently, there is a limit). It should be fairly easy to add this extra constraint, although I haven't given much thought about how to keep it as simple as possible (that is, avoid a jungle of if/else 😆). A good issue for 0.5.0 😄

@64kramsystem
Copy link
Member

64kramsystem commented Aug 31, 2022

I think we should change the wording of this, to make it clear that it's an intended upgrade of a current functionality, so that it's also more obvious for anyone who wanted to pick it up.

@odecay odecay removed the kind:bug Something isn't working label Aug 31, 2022
@odecay
Copy link
Collaborator Author

odecay commented Aug 31, 2022

I think we should change the wording of this, to make it clear that it's an intended upgrade of a current functionality, so that it's also more obvious for anyone who wanted to pick it up.

I agree. Could you edit the issue with what you think the feature should be? I don't have a clear picture of what the functionality upgrade should be so I wont update myself.

@64kramsystem 64kramsystem changed the title Sometimes it is not possible to move past a stop point and trigger the boss. Improve scrolling Aug 31, 2022
@64kramsystem
Copy link
Member

Ok. I've updated the description, and let the video. I think the logic described above should be what required, in the simplest possible terms (if you think there are other cases, please add!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:undetermined Undetermined size, needs investigation
Projects
None yet
Development

No branches or pull requests

2 participants