CloneWith / osu

Another osu! client fork, tailored for tournament hosting
https://osu.ppy.sh
MIT License
1 stars 0 forks source link

Traps implementation #13

Closed CloneWith closed 3 months ago

CloneWith commented 4 months ago

Facts

Traps are a special type of beatmap block, and will cause a special effect upon being triggered.

We have three types of traps:

And Swap is absolutely the hardest one in terms of implementation.

Tasks


You're right, but Genshin Impact is what, I forgot it whatsoever.

Hello everyone, I'm short dolly. Today I'll show something ya want to see.

NaughtyChas commented 4 months ago

Thought for a while:

​The trap type cannot be displayed before that box is selected by the red/blue team, in other words: trap type can only be displayed when a trap is selected. Pending location of displaying trap type will be just below the board.

We need to define the properties of the grid in lazer when we know the location of the red/blue trap.

​The process is as follows:

  1. Know the exact information of the trap and set them properly, including assign correct values:

    • trap set by red/blue
    • trap type
    • trap location
  2. When a trap is picked during the match, it should demonstrate:

    • this box is being picked by red/blue
    • at the same time the trap is being picked, display trap type information below
CloneWith commented 4 months ago

Know the exact information of the trap and set them properly, including assign correct values:

One possible way to do this:


For Swap, when the trap source is picked, the trap information is shown below, but the destination isn't. We can take adventage of this feature, using a (Neutral) Swap button to specify the destination, after gameplay and before judgement.

Then all the three types of traps are the same at first.

NaughtyChas commented 3 months ago
  • [x] Handling (Swap specific)

We have to re-design the swap implementation logic, Perform Swap now can only be used to swap another box with currentTrapBox. It should be better to change its logic to "allow any two boxes to swap with each other".


  • [x] Add support for adding 2 traps at the same box

Newer version of the OFFC gamerule have updated to allow two traps to set at the same box. Triggering of these traps will be designed as:


Should be a tough work for the dev team, heads up as we will get though these tons of mess. Add new tasks to the 1st comment in this issue if there is something missing.

CloneWith commented 3 months ago

Some (maybe) ideal solution for this imo:

It should be better to change its logic to "allow any two boxes to swap with each other".

Since the two's swap would be performed immediately, we can use our current logic part. When a swap object (here because it doesn't know which exactly the map is, the source or the target) is added to an observable list (i.e. PendingSwaps):

头抬起,您不是最新的。

NaughtyChas commented 3 months ago

Heads up as I just found a brand new bug waiting for resolve:

Take a fresh start up of osu!lazer tourney and get straight into Board scene. The board has used once in OFFC test match, but all the boxes seems to have no status, as they display in plain box with no special visual effects.

When pressing down Free Swap button once, it turned into Free Swap(Target). Which shouldn't be normal as I have not assign the first box for swap. In this case I have pressed down left mouse button once on box NM3, an unexpected swap just happened.

Take a look at the board before this action & after this action:

Before After
image image

Unexpected swap observed between HD2 and NM3. After this bugged swap, everything about Free Swap works fine.

This bug might be able to re-produced using a board used in a match, or it just because the board is being created and played on a older version of the osu!lazer tourney. Should be safe if we ignore this bug if you cannot reproduce this on your side using your config of bracket.json.


[Updated]

Tested on a new created board on the latest build, I cannot reproduce the same bug now.

CloneWith commented 3 months ago

Chances are that all lists are stored with rounds, which won't keep up with our newest code.

Since we've been using old one-argument swaps, that match left a stray item in the PendingSwaps list, which was detected and used by our new client.

Similar to this, we have introduced many breaking changes so far ;w; Anyway if we still want the older behaviour, just need to hit Reset and simulate the situation by ourselves.

CloneWith commented 3 months ago

Since we've implemented all traps and added animation for Swap effect, this issue should be completed.