The system uses a specified number of tumblers or pins which hold the lock closed. The player must apply tension to the lock cylinder (via a tension wrench) with either keyboard buttons or a control stick for any of the pins to "grab" onto the edge of the lock cylinder, just like a real lock. While maintaining tension, the player must then use the lock pick to push each pin upwards until it is in the correct position. Once all the pins are in their correct places, the lock is then able to open.
This is all fairly typical for a lock pick system, but Ive implemented some details that make this more fun, challenging and true to the real way lock picking actually works.
First off, the tension supplied by the tension wrench is displayed on a radial meter. If not enough tension is applied, all the pins will fall back to their lowest positions, resetting any pins which may have been previously set. If too much tension is applied, then raising any pin past its target position will cause it to become "stuck", meaning it will no longer lower or reset until the tension falls below a certain threshold. Any stuck pins must be "released" by lowering the tension on the wrench. Im not sure how many of you are familiar with the process of lock picking, but I find this "sticking" problem to be the main challenge to overcome. This means that the tension must be held within a small margin between too high and too low for the pins to become set but not stuck, which keeps the player engaged with both the pin manipulation and maintaining the correct tension.
As of now the UI can display the tension, which pins are set and which pins are stuck in a simple and unobtrusive manner, however they can be switched off to create a more immersive experience and substituted for audio or vibrational cues.
All parameters are adjustable so that you can set how many pins are in the lock, the thresholds for the various tensions, the precision of the pin positions required and much more. Ive even allowed the tension meter to automatically show colored zones in proportion to the tension thresholds set by the user so that the player can visually see if the tension theyre applying to too much or too little.