Sooner or later, all players learn the password (someone give it to them) and unfortunately they just enter it instead of looking for a way to get it. It makes me sick -.-
Therefore I decided that the password should be random-generated and (optionally) changed after each successful input.
For my map I wrote a code that generates random quadratic equations; its form is ax^2 + bx + c = 0; the two roots are integers of the interval (-1000; 1000):
Code: Select all
level.x1 = randomIntRange(-1000, 1000);
level.x2 = randomIntRange(-1000, 1000);
level.b = (level.x1+level.x2)*(-1);
level.c = level.x1*level.x2;
x^2 + bx + c = 0
yeah, a is 1, but this doesn't really matter, it is still as diffucult to solve as if the number a wasn't equal with 1.
1. The majority of players are unable to solve quadratic equations.
2. If someone learns the code, it will be unable to be used one more time, as it is automatically changed upon the putting into the system.
These facts make my code system be much better than having an invariable password.
You are able not to use the equation way. There are lots of different ways, for example making a big gap jump and a button placed beyond of the gap; if pressed, the button tells the code (random generated, of course).