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

Add "Blinds" mod #3180

Merged
merged 28 commits into from Dec 20, 2018
Merged

Add "Blinds" mod #3180

merged 28 commits into from Dec 20, 2018

Conversation

WebFreak001
Copy link
Contributor

@WebFreak001 WebFreak001 commented Aug 5, 2018

Adds a new mod which is similar to flashlight but is based on the HP. This also adds an Overlays container to RulesetContainer which is always drawn above hit objects. It allows to implement Flashlight more easily in the future.

Basically the mod is 2 blinds which open and close depending on your HP. Maybe actual blinds textures could be added in the future, but it's only black for now. Currently only for standard mode. I could imagine this in Mania (1 vertical blind). CTB and Taiko could probably even use the same.

Old Video [9.8 MiB]: https://wfr.moe/fDEJkH.mp4
Old Video 2 [9.9 MiB]: https://wfr.moe/fiBhQw.mp4
Old Video 3 [9.8 MiB]: https://wfr.moe/fiQlYa.mp4
Current Video [9.9 MiB]: https://wfr.moe/fiJPrG.mp4

this is required for mods such as flashlight which always want to draw
objects above hitcircles. If just adding children to a RulesetContainer
the hit circles would always be above the added children (no matter
the Depth).
@WebFreak001
Copy link
Contributor Author

WebFreak001 commented Sep 15, 2018

https://wfr.moe/frfAy8.png

I think it's more fun with textures than black and it transports the meaning and the thought behind the mod a lot more clearly.

Here is the texture which I made for this: wfr.moe/fiB3rM/osu.Game.Resources/Textures/Play/osu/blinds-panel.png (outdated, check comment with embed below)

});

this.skin = skin;
skin.SourceChanged += skinChanged;

This comment was marked as off-topic.

There are now skinnable actual blinds (shoji screen panels)
The black overlay is still behind them to avoid cheating with skins
The blinds don't open linearly anymore, they are health squared now
When easy mod is on, there is always a little gap open
@WebFreak001
Copy link
Contributor Author

WebFreak001 commented Sep 15, 2018

This is the video how it currently looks (if you add that resource) linked in the comment above both without EZ and with EZ: [9.9 MB] https://wfr.moe/fiBhQw.mp4

@holly-hacker
Copy link
Contributor

Continuing the discussion from Discord: perhaps you could make it so HR adds 1 circle's diameter as offset to the blind opening (which gets clamped for drawing), so your health will have to drop to some value below 100% for the blinds to open? Same would go for EZ but in reverse: exactly 1 circle's diameter would be visible at 100% health. This should again add some more depth to the mod and will make the difficulty scale somewhat with CS.

As for the current distance scaling algorithm, perhaps a power of 2 is a bit too much for nomod. This very much depends on the current HP algo (which may change in the future), but scaling this power depending on the current mod or OD value could be an idea. Perhaps n^1.5 for EZ, n^1 for HR, n^1.166 for nomod?

It'll probably take a bunch of playtesting to get these right and I haven't tried it myself yet, so do take everything I suggest with a grain of salt.

@WebFreak001
Copy link
Contributor Author

well if CS is becoming a per circle property instead of a per map property I can't really use it here. OD would be a possibility for the curve. Maybe also include it in the gap calculation, but only with the mods EZ or HR on because they actually change the score multiplier to something more extreme which should actually make it that extreme.

/// <summary>
/// Black background boxes behind blind panel textures.
/// </summary>
private Box box1, box2;

This comment was marked as off-topic.

Width = 512 * 0.4f,
Height = 512 * 0.95f,
RelativePositionAxes = Axes.Y,
X = -512,

This comment was marked as off-topic.

This comment was marked as off-topic.


private float applyGap(float value)
{
float ret;

This comment was marked as off-topic.

PanelTexture = skin.GetTexture("Play/osu/blinds-panel");
}

private float applyGap(float value)

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

protected override void Update()
{
Height = Parent?.DrawHeight ?? 0;
if (Height == 0 || Texture is null)

This comment was marked as off-topic.

{
public override string Name => "Blinds";
public override string ShortenedName => "BL";
public override FontAwesome Icon => FontAwesome.fa_osu_mod_flashlight;

This comment was marked as off-topic.

@WebFreak001
Copy link
Contributor Author

WebFreak001 commented Sep 16, 2018

here is my current blinds texture with semi transparent panels which looks nice when it overlaps and the npc walks behind them:

Outdated Panel texture

https://wfr.moe/fiJ2ns.png

@peppy
Copy link
Sponsor Member

peppy commented Oct 10, 2018

Really love the added doors! It takes this mod from being pretty lame to being something quite unique.

@WebFreak001
Copy link
Contributor Author

should I make a PR to osu-resources to add the blinds texture?

@peppy
Copy link
Sponsor Member

peppy commented Oct 10, 2018

Don't just yet, we'll do a pass on them (@arflyte may have something to say).

@arflyte
Copy link

arflyte commented Oct 12, 2018

I suggest changing the wooden part to brown with faint wooden texture. Currently, the paper texture looked like a wallpaper's; suggest changing that to a paper texture with a warmer tint.

@WebFreak001
Copy link
Contributor Author

yeah the paper part is currently just white with the normal map of a wallpaper because I don't have any paper/fabric normal maps. I thought something like that would fit because it is basically just noise (as heightmap) in the end. Proper paper textures are kind of hard to generate in comparison.

@WebFreak001
Copy link
Contributor Author

WebFreak001 commented Oct 12, 2018

@arflyte tried paper texture now, added a new wood texture and used a warmer (in-door) HDR instead of studio lighting:

blinds-panel

ingame screenshot: https://wfr.moe/frfAy8.png

Updated

@peppy
Copy link
Sponsor Member

peppy commented Oct 12, 2018

Are you able to explain what the fruit catcher is doing in this mod? I don't really understand.

@WebFreak001
Copy link
Contributor Author

It is just a random character going in and out. Gameplay wise it reveals parts of the playfield for just a brief period of time if you are doing well (combo-wise) so that it isn't completely memorizing a map.

@WebFreak001
Copy link
Contributor Author

I have removed the catcher sprite for now

@peppy peppy changed the title New Blinds mod Add "Blinds" mod Dec 7, 2018
@peppy
Copy link
Sponsor Member

peppy commented Dec 14, 2018

Was looking at getting this in but having issues making the door resource small enough to include.

@WebFreak001
Copy link
Contributor Author

WebFreak001 commented Dec 14, 2018

If lossy compression is ok, the image could be compressed to webp with 90% quality being 877 KB with the 1310x2048 resolution. Lossy compression of png with pngquant --speed=1 gives me a 1.6 MB file. With crunch I could make it 1.5 MB

Both look nearly the same and look perfectly fine for ingame usage:
original [4.4 MiB] (100%)
pngquant [1.6 MiB] (35.2%)
crunch [1.5 MiB] (32.8%)
webp (external link) [857.2 KiB] (18.9%)

@johnneijzen
Copy link
Contributor

hmm I tried to compress image software i used was FileOptimizer

Lossless Version 3.37 MB
Lossy Version 752 KB

@peppy
Copy link
Sponsor Member

peppy commented Dec 20, 2018

Let's go with the lossy one for now. We probably need to rethink the texture ing general and the current may not be the final design, so best to get something in for now.

Not sure if we want this going forward.
We decided that mods shouldn't be interacting with other mods. This can be added once we have the ability to have per-mod settings, as a difficulty setting local to blinds.
Copy link
Sponsor Member

@peppy peppy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@peppy peppy merged commit f195d6c into ppy:master Dec 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants