RougeEric

joined 9 months ago
[–] RougeEric@lemmy.zip 0 points 1 month ago* (last edited 1 month ago)

I went with a stack pattern and priorities.

Within a priority the last "layer" to activate is the only one to receive inputs. The priority system just means that if a layer from a lower priority gets activated, it doesn't take over until the upper layer is empty.

It's a bit stricter (only one layer active at all times), but you can always subscribe to inputs from multiple layers to achieve what you were describing.

The main advantage here was that you can safely rely on enabling/disabling layers without ever getting a conflict... If some popup comes in over your menu, the popup is in charge until it's closed. No need for them to communicate, and you reliably know that inputs will eventually return to the menu properly, even if something else gets interposed.

And since it's tacked onto the existing system, you can always have parts of the code that ignore the layer system entirely if necessary (like a mute button that has to work across all systems/menus for example).

[–] RougeEric@lemmy.zip 0 points 1 month ago (2 children)

Not sure if I'll ever get around to adapting the concept to Godot, but I'd be happy if anyone comes around and takes the core logic that's there and adapts it ;)

[–] RougeEric@lemmy.zip 0 points 1 month ago (5 children)

Thanks!!

TBH, I'm probably going to switch over to Godot at some point myself as well.

 

A few years ago I decided to fix my biggest gripe with Unity's InputSystem: there is no intuitive and fuss-free way of determining which UI, character controller, popup, etc. should be receiving inputs at any given time.
Sure, the Action Maps are a great baseline for handling this since they let you assign a set of inputs to each given system; but you still have to make sure to enable and disable them at the correct moment. This can be easy in a small project, but when you have dozens of systems and UIs to contend with; it can get kind of messy.

So I started working on a system that sort of "automatically" handles all the mess for me and handles the complexity on its own.
After a few years of working on it when I felt like it in my spare time, I'm officially taking InputLayers out of beta:

You can get InputLayers for free on the asset store.

What is InputLayers?

The short version is that it's a system that lets you assign input actions to layers that "stack" priority. So when your popup comes up on screen, its layer is added to the top of the stack; and as long as no other layer takes its place, only inputs from that layer will be taken into account.
There's a bit more depth to all this, with layer priorities that prevent less "important" systems from taking over higher priority ones; but at its core; it basically lets you set things up using a single configuration window; and then never have to worry about if your character will keep moving when your main menu is open, or whatever other similar conflict you can imagine.

Video overview

I go over the core idea in a little bit more detail in this video: https://youtube.com/watch?v=bXEuzpbGlCI

Sample scenes

I've included a few sample scenes that cover most of the basic use cases. Their code is a bit complex if you're unfamiliar with UI Toolkit, but I've mostly isolated the fussy stuff so you can concentrate on understanding how the actual InputLayers stuff get handled.

Documentation

I've set up the documentation over on GitHub for ease of access; and so that people can post issues they may encounter easily.

 

A few years ago I decided to fix my biggest gripe with Unity's InputSystem: there is no intuitive and fuss-free way of determining which UI, character controller, popup, etc. should be receiving inputs at any given time.
Sure, the Action Maps are a great baseline for handling this since they let you assign a set of inputs to each given system; but you still have to make sure to enable and disable them at the correct moment. This can be easy in a small project, but when you have dozens of systems and UIs to contend with; it can get kind of messy.

So I started working on a system that sort of "automatically" handles all the mess for me and handles the complexity on its own.
After a few years of working on it when I felt like it in my spare time, I'm officially taking InputLayers out of beta:

You can get InputLayers for free on the asset store.

What is InputLayers?

The short version is that it's a system that lets you assign input actions to layers that "stack" priority. So when your popup comes up on screen, its layer is added to the top of the stack; and as long as no other layer takes its place, only inputs from that layer will be taken into account.
There's a bit more depth to all this, with layer priorities that prevent less "important" systems from taking over higher priority ones; but at its core; it basically lets you set things up using a single configuration window; and then never have to worry about if your character will keep moving when your main menu is open, or whatever other similar conflict you can imagine.

Video overview

I go over the core idea in a little bit more detail in this video: https://youtube.com/watch?v=bXEuzpbGlCI

Sample scenes

I've included a few sample scenes that cover most of the basic use cases. Their code is a bit complex if you're unfamiliar with UI Toolkit, but I've mostly isolated the fussy stuff so you can concentrate on understanding how the actual InputLayers stuff get handled.

Documentation

I've set up the documentation over on GitHub for ease of access; and so that people can post issues they may encounter easily.

 

I've been working on a plugin to solve the issue of responsive images in Markdown without breaking standard syntax.

I've been using marked.js for a personal project, and found one big issue with markdown in the context of modern web content is the lack of responsive image support. So I hacked together a little extension that adds an srcset sizes and loading="lazy" tags to the generated image.

I wanted to make sure this didn't break markdown, so I made it use the file name to generate all the variants, while still keeping the standard markdown image code fully functional.

Just wanted to share in case anyone else finds it useful!

Link: github.com/ELowry/MarkedResponsiveImages

[–] RougeEric@lemmy.zip 22 points 3 months ago

As a French person... Nobody gets turkey. Capon, yes, though it's become too expensive so most people go for chicken.

[–] RougeEric@lemmy.zip 0 points 3 months ago

Yeah, no worries. Someone else pointed it out to me recently.

I feel there's a place for both of these. This is lightweight and focused on updates, whereas UniGet is a full-fratured app. Both have their benefits IMHO.

[–] RougeEric@lemmy.zip 0 points 3 months ago

Ah, interesting. I'll look into that at some point.

[–] RougeEric@lemmy.zip 0 points 3 months ago (2 children)

How though?

Everything I see online indicates that to have chocolatey handle an app it needs to be installed BY chocolatey; and that the "fix" is to uninstall and reinstall.

[–] RougeEric@lemmy.zip 0 points 3 months ago (4 children)

Winget can handle apps installed via other sources, including things like all the Visual C++ Redistributable packages and stuff I had previously installed using an installer.

It may not seem like much, but it's a massive advantage for managing multiple computers in my family.

[–] RougeEric@lemmy.zip 0 points 3 months ago* (last edited 3 months ago)

At this point, things like O&O ShutUp10++ and how Microsoft have left a ton of overrides for their horrible advertising/tracking/ai crap in for businesses to use in large scale deployments means you can actually get a really decent experience in Windows 11… It's just not accessible to most people.

I recently installed Everything Search and, Command Palette plugin someone made for it, and this little gem to fix my last remaining gripe with it: the lack of a good search feature.

[–] RougeEric@lemmy.zip 0 points 4 months ago (2 children)

Yeah. It's kind of surprising how many actually good things people at Microsoft have put out there that are just not advertised at all (cough... Power Toys... cough).

 

I was fed up with having to keep things like npm, NodeJS and git up to date manually; so I created a little script that keeps things up to date automatically (configurable on a per-app basis) via WinGet.

I know there are already things out there… but they looked like a pain to install, and this is simple enough that I actually understand what it’s doing XD

https://github.com/ELowry/WinGet-Updater

[–] RougeEric@lemmy.zip 87 points 5 months ago (9 children)

Arguably, it's at least in large part the efforts of socialists, communists, and radical feminists that made some of these possible. But decades of vilification in the USA have made them virtually invisible to the general population.

[–] RougeEric@lemmy.zip 0 points 6 months ago (4 children)

Have you hard of our lord and savior, the metric system?

view more: next ›