This week was the first week of working on the game. The first task I was given was to make a puzzle API. The game dissonance has a puzzle element. The game right now has multiple puzzles but they were all written by the programmer and is spaghetti code. So the API is designed to make all the code well written and so the designers can make all the puzzles not the programmers.
The programmers on the team designed the API to be designer friendly, self containing and well written. The API is going to have a puzzle class manager and a puzzle class. I am working on the class while the other programmer is working on the manager. This is the outline for the puzzle class.
Puzzle Class
{
Datatypes:
Enums
PuzzleType - Values: [ Piano/Button Sequence, Object in Zone, Conditional, “Use” Puzzles]
Button - Char Array, “Answer”, Timeout Condition [ time based, only correct inputs matter ]
OIZ - “destination” (Puzzle Trigger), Object to be in zone [these are by tag]
Conditional - reference to the boolean value(s) that must be true
“Use” - will just take in a call to a generic interface function and execute a referenced function
Optional - see if the puzzle is optional or not
Active Level:
Other variables:
Array - Text messages
Array - When the message is played
Bool - is the puzzle solved
Functions:
InitPuzzleDataTypes(); //pass in the puzzletype, maybe pass in all the starting values
CheckStatusOfPuzzle(); //checks to see if puzzle was started, in the process, or complete
UseFunction(); // the “Use” function
Update(); //updates the puzzle
}