One of the more complicated systems I've been building for this project started with a pretty simple mechanic:
Layered levels of interaction for more diverse methods of discovery.
The basic interaction starts with a larger, more prominent object in the world. The player clicks on it, the camera moves into a more focused view, and suddenly there are new interaction points available.
Clicking one of those can potentially take you another layer deeper.
That sounds pretty straightforward until you start asking what "interact" actually means.
Some things should just happen immediately. A light switch doesn't necessarily need a whole investigation sequence. You click it, and the light turns on.
Other things should become physical objects that the player actually has to pick up and remove from the scene. Some things are purely observational and exist to provide a little context through dialogue.
And then there are the things that are basically their own gameplay systems.
A dial lock.
A circuit that needs to be rewired.
Something that needs to be examined from multiple angles.
Something that can be picked up, manipulated, and then used somewhere else.
The more I built, the more I realized that "interacting with an object" isn't really one type of interaction at all.
There are a lot of different ways you might want the player to engage with something, and the challenge is making those interactions feel intuitive while still allowing them to feel meaningfully different.
And then come the edge cases.
A lot of edge cases.
What happens when the player is already zoomed into something and another interaction becomes available? What happens when an object gets removed? What happens when an interaction changes because of something the player did ten minutes ago? What happens when a puzzle needs to take control of the interaction system temporarily and then give control back?
This is where having clean base classes ended up saving me a tremendous amount of time.
I could build different types of interactions on top of a common foundation instead of reinventing the same behavior every time I needed something slightly different.
That said, this project has also included a pretty substantial refactor of that foundation, so I'm not going to pretend I got it all right the first time.
The refactor hurt.
It also paid for itself almost immediately.
What I like most about the system now is that it supports the investigation without making the player think about the system itself.
Ideally, the player shouldn't be thinking:
"What type of interaction is this?"
They should just be thinking:
"What is this, and what can I learn from it?"
That's the part I'm trying to get right.