Proximity-based "Holes"

When the player needs to deposit a carried Item somewhere to advance the game, a key in a lock for example or a certain colored cube in a certain shelf, I call this somewhere a "Hole". In past, a Hole was a single manipulable collider with a placement locator and a script. The only way the Hole knew it was "filled" was if you clicked on the collider with an Item in hand. That Item would be passed (in code, and in physical space too) to the Hole. If you then picked up the Item again,  it would send a message back to its former Hole saying it was now "unfilled". 

But this "event-based" Hole system (the event being clicking) was producing some non-intuitive and potentially game-breaking results, and my users let me know about it. For example, if you were to drop (as opposed to place nicely) a Suncube on the table in the cave, the game would not know the table was occupied unless you picked the Suncube up again and clicked on the invisible hit area you were supposed to! The cube could be lying right on the table in one of the niches, but not register as in the right place yet. On the other side of the coin, say you accidentally knocked a Suncube out of the tower shelves... possibly by ramming another Suncube into it in your haste. The Suncube would be physically lying on the ground, but the game would still think it's in the Hole. Because you never actually picked it up again!

Most of the Holes in original Foxhunt were designed so you couldn't just toss an Item in accidentally, and you'd have to really be trying to knock an item out with another Item, so... it worked okay for most players. But I have some new ideas for more physical puzzles and now's the time to address this buggy Holes system.

Now, Holes are Proximity-based. There is still a clickable collider that will move the Item physically from your hands to where it needs to go on click. That is a nice feature, I don't want the player to HAVE to aim a toss perfectly, especially with something like a keyhole. But there is also a trigger area that detects when an Item enters (and exits) the Hole. In other words, you can still click on the hole to deliver the Item, but you could also toss it or drop it or lay it on the ground and roll it in from afar. Whatever you want to do... this fixes a number of bugs and leaves the door open for some more emergent puzzle solving down the line.

There are also a number of new features like: one hole, multiple item combo (as opposed to one unique item per hole before); holes reject wrong items before placement (as opposed to before, where the game would accept any item in any hole); size-based rejection (as opposed to before, where the game would try to cram a giant plank into a tiny shelf and physics would bug out);  checkboxes to make items disable or parent or both after being used to unlock a Hole (as opposed to before where that behavior had to be bespoke code); and "simple placer" holes that don't trigger anything, only help positioning Items.

Leave a comment

Log in with to leave a comment.