-
Notifications
You must be signed in to change notification settings - Fork 1
Application Functionality
The application comes in the form of a 64x64 pixel painting widget and a series of buttons that can manipulate properties of the painting.
The button labeled "Wall" allows a user to use the brush to draw walls onto the map. By default, the application back end considers any non-white pixel to be a wall unless directly specified.
The button labeled "Hole" will allow a user to place a hole onto the map. These are placed individually rather than drawn on with the brush. Placing a hole element will store it's location on the back-end so an identifier can be added to the output file which can let the main marple program know to render a hole.
The button labeled "Marple-Start" will allow a user to place the start location of the marple onto the map. This is where the marple will be generated from on the main game. Start locations are placed individually rather than drawn on with the brush. Placing a start element will store it's location on the back-end so an identifier can be added to the output file which can let the main marple program know to render the start-box.
The button labeled "End-Goal" will allow a user to place the end goal location onto the map. When the marple reaches this location, the game is won. End locations are placed individually rather than drawn on with the brush. Placing an end element will store it's location on the back end so an identifier can be added to the output file which can let the main marple program know to render the end-goal.
The eraser button will allow users to use the brush to erase walls and elements. The eraser will delete non-wall elements and remove them from back-end storage so issues aren't caused when processing the map file.
The "Clear Map" button will entirely clear the map. Any non-wall elements are also removed from storage in the application back-end.
The "Change Colour" button will open a dialog box that allows the user to select any colour. This is then reflected in the colour of the brush (the wall button will change to this colour too as a convenient reminder of the current brush colour for the user). The button does nothing when the eraser is selected.
The four buttons associated with the label "Brush Size" will allow a user to change the size of the brush. Options are a single pixel, 2x2 pixels, 3x3 pixels, and 4x4 pixels.
The four buttons associated with the label "Marple Size" will allow a user to set the size of the marple. Options are a single pixel, 2x2 pixels, 3x3 pixels, and 4x4 pixels. The size of the marple dictates the size of the hole, start and end elements. Changing this will force a reset of all non-wall elements, and remove them from storage and visual representation on the map. This is necessary for consistency, as all elements need to match the marple size. The option to change the marple size is still available as a feature.
The button labeled "border" will draw a wall border around the boundary of the 64x64 grid. The thickness of this border is determined by the current brush size (1 pixel, 2 pixels, 3 pixels, 4 pixels). The border will also be drawn based on the brush colour.
The button labeled "Save to file" will write the map to a .csv file under the "maps" folder in the build directory. The file is a comma seperated list with 64 rows, each row containing 64 cells. Each cell of the map represents 1 pixel of the map to be built by the main marple game. The cell contains a label to indicate which kind of element the pixel is, the colour of the pixel, and the size of the element if the pixel belongs to a hole or start location or end goal.