fishfolk / punchy

A 2.5D side-scroller beatemup, made in Bevy

Home Page:https://fishfolk.github.io/punchy/player/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve scrolling

odecay opened this issue · comments

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

Hmmm 🤔 I'll take a look!

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 😬.

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.

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 😄

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 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.

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!).