ChessPuzzleEditor
Details of this scene
Last updated
Details of this scene
Last updated
There are two mode available in this scene where one is for editing starting board position while the other is for editing puzzle level.
For editing starting board position
Descriptions of numbered UI in image above :
1) Invert Turn Color Button - Change the color of the player taking the first turn in Edit Puzzle Mode, as displayed by the UI above the button.
2) Castle Setting Checkboxes - The configurable castle setting allow setting available castle moves on edit puzzle mode. The game logic included adjustment for invalid castle setting when first enter edit puzzle mode. So, it's safe to have invalid castle settings set on these toggles.
3) All of the Side Tiles(Editor pieces) - The editor pieces that can be used to spawn pieces on the board. Green tile indicate selected editor piece which can be spawned to any tiles on the board by click or drag. Deselect any selected editor piece by clicking them again.
4) Edit Puzzle Button - Enter edit puzzle mode, in edit puzzle mode, as the name suggest, are meant for creating puzzle level from available pieces on the board.
5) Clear Board Button - Clear all the pieces on the board.
6) Change Pieces Mode Button - Change all pieces model to their opposite mode, from 2D to 3D or 3D to 2D.
Tips : Removing piece can be done by dragging a piece onto the other piece.
For editing puzzle level
Descriptions of numbered UI in image above :
1) Fixed Move Scroll View - UI for displaying fixed move histories as buttons with algebraic notation as it's text, clicking any button in it will make the button turn green and the board position will be reversed or forwarded to the designated state of the fixed move history. By right, it is not allowed to make any move by the controller while the state of board position is within any fixed move, EXCEPT for the last one where it will formed a bridge to very first board state history in 2) Move Variants Scroll View.
These fixed move data can be created with the 3) Cut Button or being transfer from PGN scene and are being displayed exactly as they were right inside this UI in Puzzle Scene by the circle area as displayed in image below.
Delete Button(Underneath the Fixed Moves Scroll View UI)
It can delete all fixed move histories. Basically, any unwanted moves made with controller can be cut over to fixed moves and then deleted, the starting board position will be adjusted to the last fixed move history, automatically.
2) Move Variant Scroll View - UI for displaying all move histories made by controller as buttons with algebraic notation as it's text. Clicking any button in it will make the button turn green and the board position will be reversed or forwarded to the designated state of the move variant history. When green button is within this scroll view, legal move can be performed while clearing all of its subsequent move variant histories, it is more of a auto undo feature. Move variants data are meant to be converted to as the answer for puzzle level in Puzzle Scene as shown by the circled area in image below.
3) Cut Button - This button is primarily for converting partial or all move variant histories to fixed move histories or the other way around.
If the green button is in 1) fixed move scroll view, the cutting point will be starting from the green button to the very last fixed move. On the other hands, if the green button is in 2) move variant scroll view, the cutting point will be starting from the very first move variant history after the grey button up to the move variant history of the green button.
4) Save Move Variant Button - All move variant histories displaying on the 2) move variant scroll view will be saved to a list as indicated by the drop down UI above the 2) move variant scroll view UI. There is build in logic to prevent repeating saving of the exact same set of move variant histories. With these features, more than one puzzle level variant can be created in one puzzle level.
5, 6) Undo View Button and Redo View Button, respectively. Making navigation from green button to the previous or next available history conveniently. Unlike actually undoing or redoing a move like in chess game, it will not remove or recreate any historical record.
7) Edit Board Button - Change the underlying logic back to edit board mode where all the unsaved data in Edit Puzzle Mode will be wiped out with the initial board position being the one before any move.
8) Restart Button - Navigate to the state of initial board position, it's just a fast way to clicking the 5) Undo View Button to it's max attempt.
9) To PGN Scene Button - Load PGN Scene, and If this scene was being loaded by the Puzzle Editor Button in PGN Scene, the state of PGN Scene where it left off will be continued.
In ChessPuzzleEditor scene, under the ChessGameObjectBase scene gameobject, there are ChessPuzzleEditorGUI script component attached to it. Any updating and saving of puzzle data is through the interface provided in this component.
1) Refresh Button - Clear all pieces on the board while replacing all of them by the provided FEN string. Make sure the Start With Fen toggle is ticked and the mode is set to Edit Board Mode before hitting the button.
2) Create Button - Create a new ChessPuzzleLevel scriptable object in path Resources/ScriptableObjects/ChessPuzzle/Levels where all of the puzzle data are saved. Alternatively, right click on the project tab and select Create -> TheChess -> Puzzle -> PuzzleLevel.
3) Load Button - Load previously saved puzzle level data. It can only be used on Edit Board Mode.
4) Save As Button - Save all the relevant puzzle data into the ChessPuzzleLevel scriptable object.