Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upThings to do - new computer refactor #7
Comments
This comment has been minimized.
This comment has been minimized.
|
New computer actions:
New computer security:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
vache commentedNov 13, 2014
TODO:
Sample JSON:
This creates a computer at (1,2) (note: computer terrain must still be set in bindings), that displays:
Selecting option 1 will prompt the player to hack the terminal and check if the player has a keycard. If they fail, an alarm will sound and the terminal will shutdown, otherwise, the door at (3,4) will open, and the screen will display the message "Door Opened". Selecting option 2 does the same, but will close the door if the security attempt is passed.
In example proposed above, if the player did not have the keycard, the system would do the entire set of failures, even though it only makes sense to punish the player for the failed hack attempt, not the missing keycard. Also, system does not support alternates. IE. player must have password OR pass hack attempt, player must have keycard OR pass electronics attempt.
Possible solution:
Associate individual failure actions with security tasks, and have an exposition message on the computer screen. Computers with a combination security requires every single "requirement" to pass. Option security requires at least one "alternate" to pass. They can be nested. It ends up looking annoyingly complicated, and there's probably a more elegant way of doing this, but I don't know it. Instead of a series of combinations like this, find places where it makes sense, then make combined checks for those. Ex: instead of PASSWORD_CHECK or HACK_CHECK make PASSWORD_OR_HACK in one check.
Simplifications to code:
Condense computers down into certain templates that can be called simply. Example:
Other issues:
Setting distribution of failures with a range of values. Ex. attempting lvl 10 lock at lvl 0 computers gives a high chance for a critical failure which will shut down system, failing same attempt at lvl 9 is a mild failure that just boots user, or locks system out for a short period.