Code Monkey home page Code Monkey logo

stipple-effect's Introduction

Hi there 👋🏽

I'm currently writing my first book, Afrocentury, but I still regularly contribute to various projects that I maintain. Some that may be of interest to you include:

  • Stipple Effect, a pixel art editor and animator
  • Translation, a simple platforming physics game with a level editor
  • Delta Time, library for developing games and GUI programs in Java
  • Wordle+, my implementation of Wordle, extended to optionally play with 4-, 6-, and 7-letter English words
  • Flash Fluency, a text-based spaced repetition flashcard program

You can download my published games here and hire me to make a game or write software for you here.

The best way to get in touch with me is via email :)

stipple-effect's People

Contributors

jbunke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

stipple-effect's Issues

Redesign layer-specific buttons

Tasks:

  • Integrate isolate layer behaviour into visibility button and remove independent isolate layer button
    • Extend toggle button to allow for unique modified input behaviours (e.g. Shift + Click or Right Click)
    • Isolate layer instead of toggling visibility if button is shift-clicked
  • Move onion skinning to after layer-frame locking
  • Lock onion skinning toggle on disabled if layer is frame-locked
  • Add other layer properties to layer settings dialog
  • Extend number of characters of the layer name that can be printed on the button before the cutoff thanks to the additional icon button worth of space that removing isolate layer button will make available

Redesign and extend project dialogs

Description

  • Draw mockups for non-trivial dialogs
  • Redesign project dialogs to be more dynamic and extensible
  • Improve formatting with line breaks
  • Use dropdown menus instead of toggle buttons with more than two options
  • Don't use super wide button or textbox elements
  • Avoid static offsets between labels and mutator elements; prioritize "following" offset instead
  • Refactor code with new Layout and DialogAssembly helpers

Dialogs

Dialogs without sub-tasks generally only require formatting/layout redesigns and code refactoring

  • Resize
    • Add checkbox that for preserving aspect ratio (round complementary dimension to nearest integer)
    • Add toggle button to resize by pixels or nonzero real-number scale factor
  • Pad
  • Import file
    • Preview the number of frames and the frame canvas bounds based on X and Y divisions
    • Mockup
  • New project
    • Add preset buttons for bounds from defaults and from clipboard contents
  • Save as
    • Reorder elements to put scale factor slider below file type toggle button
    • Hide scale factor slider for STIP
    • Add frame index bounds for animation exports (including both PNG exports)
  • Palette dialogs
    • Sort
      • Add backwards option
    • Save palette
    • Add contents to palette
    • Palettize
    • Palette settings
  • Settings
    • Consider whether "Startup/default", "format", and "visual" are the most sensible way to categorize settings
    • Put related settings on the same line; e.g. checkerboard x and y
    • Add settings as needed
    • Add "Apply" button
      • Hold settings assignments in temporary variables in DialogVals
      • Upon pressing apply, use custom logic to determine whether settings have meaningfully changed and re-computations are necessary; e.g. only redraw pixel grid if pixelGridX or pixelGridY setting values are changed by the assignment
  • Outline
  • Panel manager
  • Layer settings

Add shade brush

Add a shade brush tool (dedicated tool separate from brush tool) that replaces the previous color that was drawn over with the adjacent color in the palette's present color order iff the color that was drawn over was in the palette and has an adjacent color in the relevant direction. Left click shifts the replacement color to the left in the palette; right click to the right.

Preconditions for implementation:

Tasks:

  • Tool button
    • Tool icon sprite
    • Tool tip
  • Tool assignment shortcut [ D ]
  • class ShadeBrush and tool behaviour
  • Info menu blurb (Tools page)

Change internal versioning system

Description

Change Stipple Effect's internal versioning system to match what Delta Time does.

Tasks

  • Use Delta Time's Version class
  • Separate devbuild status to outside of version number
  • Add incrementation system

[BUG] Scrollable menu elements are being rendered outside of scrolling bounds

Bug in action

Bug description

Instances of ScrollableMenuElement are being rendered when they have been displaced outside of the bounds of the ScrollingMenuElement that contains them. This bug was observed in a devbuild for v0.3.0 and I could not replicate it in 0.2.0.1.

Expected behaviour

Do not render (or process) child ScrollableMenuElement instances when they have been displaced outside of the bounds of their container.

Tasks

  • Investigate ScrollingMenuElement and its parent class MenuElementContainer
  • Investigate ScrollableMenuElement

Add Polygon Select tool

Add a polygon select tool that uses rudimentary pixel raycasting to determine whether pixels in rectangular bound area are in- or outside the defined polygon.

Tasks:

  • Tool button
    • Tool icon sprite
    • Tool tip
  • Tool assignment shortcut [ Y ]
  • class PolygonSelect and tool behaviour
    • Override hasToolContentPreview() and getToolContentPreview(final ProjectState state)
  • Info menu blurb
  • Series of cursors
    • Draw cursor sprites
    • Update SECursor

Extend `GradientTool` behaviour again

Description

Extend class GradientTool to...

  • Have an additional scope mode where only the pixels of the same colour as the initial anchor pixel are replaced
  • Have a spiral shape

Prerequisites

Tasks

  • Same colour scope
    • Convert field boolean wholeCanvas to an enum Scope with literals WHOLE_CANVAS, START_TO_END, WHOLE_CANVAS_MASKED, START_TO_END_MASKED
    • Add same colour behaviour to ...MASKED enum constants
    • Extend with tolerance
  • Spiral
    • Use Geometry.calculateAngleInRad to get started with the getC function for new enum constant SPIRAL in enum Shape

Add line tool

Add a line tool. Click and drag to draw a line, unclick to place it. Holding Shift will snap line to the nearest 15-degree angle. Holding Ctrl will make the line a gradient ranging from the primary to the secondary color.

Preconditions for implementation:

Tasks:

  • Tool button
    • Tool icon sprite
    • Tool tip
  • Tool assignment shortcut [ L ]
  • class Line and tool behaviour
    • Override hasToolContentPreview() and getToolContentPreview(final ProjectState state)
  • Info menu blurb

Snapping behaviour for move selection

Holding Shift while moving the selection with either mover tool (move selection or pick up selection), whether with the arrow keys or click and drag, should snap to multiples of the selection's dimensions.

With arrow keys: instead of incrementing position by +/- 1 on either x or y, incrment by the selection's relevant dimension (width or height)
With click and drag: snap delta position to nearest multiple of selection's dimensions

Tasks:

  • Update snap check in MoverTool
  • Update arrow key behaviour
  • Update click and drag behaviour

Add HSV shifting and brightness/contrast adjustment

Description

Add dialogs for HSV shifting and brightness/contrast adjustment for a variety of scopes.

Tasks

  • Add buttons and shortcuts to colors menu to open dialogs
    • HSV shifting
    • Brightness/contrast
  • Research maths
  • In-dialog previews
  • Same scopes as palette operations:
    • Layer-frame
    • Layer
    • Frame
    • Selection
    • Project
  • Reference Brandon James Greer's hue shifting video to for intuitive relationships between hue, sat., and value (presets)

Redesign tool options bar items to be more consistently and compactly spaced

Description

Tool options bar elements with dynamic labels followed by UI elements have abstract spacing that looks awkward. Redesign this to be more compact overall and consistent with the spacing conventions used by options with static text labels.

Tasks

  • Move all elements even closer together if possible
  • Redesign relevant elements:
    • Breadth (px):
      • Brush
      • ShadeBrush
      • Eraser
      • GradientTool
      • Line
      • BrushSelect
    • Scale (multiplication factor "x") - TextTool
    • Dither (percentage of pixels assigned to primary color)
      • Pencil
      • Brush
    • Tolerance (percentage)
      • Fill
      • Wand

Add gradient brush tool

Add a gradient brush tool that remembers the pixels it has painted over separately for every target pixel change. That way, ...

Preconditions for implementation:

Tasks:

  • Tool button
    • Tool icon sprite
    • Tool tip
  • Tool assignment shortcut [ G ]
  • class GradientBrush and tool behaviour
    • Override hasToolContentPreview() and getToolContentPreview(final ProjectState state)
  • Info menu blurb

Add tool options bar

Description:

  • Located under projects and frames tab; length of workspace above workspace
  • Used for supplementary tool settings

Tool settings:

  • Brush tool
    • Bayer matrix for dithering brush
    • Breadth in pixels
    • Brush shape
    • Brush angle
  • Shade brush
    • Breadth in pixels
    • Brush shape
    • Brush angle
  • Gradient brush
    • Breadth in pixels
    • Brush shape
    • Brush angle
    • Color mode: in-between or dithered
  • Searchers (wand and fill)
    • Diagonal search option
    • Tolerance
  • Text tool
    • Font
    • Scale factor (integers from 1 to 10)

Generalize dither percentage option in `ToolThatDraws` to "tendency" and apply to all color modes

Description

Reimplement field DitherStage ditherStage in ToolThatDraws as a field double tendency that ranges from 0d to 1d. This tendency describes how much each color sampling mode (DITHER, BLEND and NOISE) will tend towards the primary color vs the secondary color.

Tasks

  • Change the tool options bar implementation, implementing the slider as a 0 - 100 scale and the value formatter as multiplying tendency by 100 and casting it to int before describing it as a percentage
  • Color sampling mode implementations
    • DITHER: get the dither stage from the nearest fraction just like how GradientTool does it
    • BLEND
      • Multiply primary channel by tendency and add to secondary channel multiplied by complement of tendency
      • Only cast to int after addition
      • Something like (int) ((primary.getRed() * tendency) + (secondary.getRed() * (1d - tendency)))
    • NOISE: Figure out if a tendency application for noise mode makes sense and what the maths would entail

Add pixel grid

Add a pixel grid that can optionally be displayed starting at a zoom threshold of 400%

Tasks:

  • Add startup setting for whether grid is enabled on startup
  • Add toolbar toggle icon for grid
    • Tool tip
  • Toggle shortcut [Ctrl + G]
  • Info page blurb on "More" page

Use Unicode Private Use Area in BMP (U+E000 to U+F8FF) to extend Delta Time font character set for composed Yoruba letters (subdot + tonal mark)

Description:
Use Unicode Private Use Area in BMP (U+E000 to U+F8FF) to extend Delta Time font character set for composed Yoruba letters (subdot + tonal mark)

Tasks:

  • Yoruba letters to add
    • ọ+ò
    • ọ+ó
    • ẹ+è
    • ẹ+é
    • ń
    • ǹ
  • Assign further letters
  • Research escaped Unicode character literals in Java (e.g. '\uE000')
  • Think about how to parse these from plain text via Delta Time for the sake of Readler

Change checkerboard size settings

Change the single checkerboard size setting into two - one for X and one for Y - making each dimension independent

Tasks:

  • Change setter menu element(s) from slider(s) to text boxes with suffix "px"
  • Range of valid values is to be 1 - 256 inclusive
    • Consider adding info label on the visual settings menu page that indicates the valid range
  • Update SEContext.redrawCheckerboard to account for changes
  • Update class Settings

Make layer, frame count limits, state manager stack size dynamic

Adjust layer/frame count limits and the size of the state manager state stack dynamically based on project attributes like canvas dimensions and present layer and frame counts, performance considerations, and unassigned heap memory available to the JVM.

Extend `Textbox` to have support text selection

Objectives:

  • Engaging (clicking on) textbox should highlight all/any present text
  • Left/right arrow keys should collapse any selection to the left/right cursor bound
  • Shift + Left/right arrow keys should expand selection to the left/right by a single character

More status updates

Send more status updates to increase feedback to the user and user's confidence in functionality, especially when relevant menu panels are hidden from view.

Status updates for...

  • Saving... do not close Stipple Effect until the project has been saved
  • Color slider adjustments iff color selection panel is hidden or ColorMenuMode is set to PALETTE
    • Example: V slider value set to 210; selected color is R: 210, G: 154, B: 210, A: 255
  • Layer actions iff layer panel is hidden
    • Merge with layer below
    • Navigate to layer above/below (include editing layer index and layer count)
    • Added layer (include editing layer index and layer count)
    • Duplicated layer (include editing layer index and layer count)
    • Removed layer (include editing layer index and layer count)
    • Add editing layer index and layer count to move layer status updates
    • Action not permitted message for all of the above
  • Frame actions iff frame panel is hidden
    • Add frame count to move frame status updates
    • Added frame (include frame count)
    • Duplicated frame (include frame count)
    • Removed frame (include frame count)
    • Navigate to next/previous frame (include frame count)
    • Action not permitted message for all of the above
  • Color actions iff color selection panel is hidden
    • Swap colors
    • Added selected color to palette
    • Removed selected color to palette
    • Palette action not permitted

New fonts for 0.2.0 including monospaced default "MonoSE"

MonoSE should be minimally stylized and prioritize readability with clean, narrow lines.
Bruch should be somewhat medieval looking; inspired by Fraktur.

MonoSE tasks:

  • Draw in Stipple Effect with #00ff00 (? - reference Delta Time documentation to confirm color) evenly spaced monospacing borders
    • ASCII set
    • Latin Extended set
  • Add to SEFonts
  • Make default in Settings

Bruch tasks:

  • Draw in Stipple Effect
    • ASCII set
    • Latin Extended set
  • Add to SEFonts

Add text tool

Prerequisites:

Tasks:

  • Reassign brush select tool to hotkey [ V ]
  • Tool button
    • Letter 'T' tool icon sprite
    • Tool tip
  • Tool assignment hotkey [ T ]
  • class TextTool and tool behaviour
    • Override hasToolContentPreview() and getToolContentPreview(final ProjectState state)
  • Info menu blurb
  • Series of cursors
    • Draw cursor sprites
      • I-beam
      • Caret (no flash)
    • Update SECursor
  • Implement tool options bar behaviour
    • Font selection from custom drop down which previews text in font
    • Upload font button with add font dialog
    • Scale factor controls (integer from 1-10)

Add symmetry tool

Add toggleable x- and y-axis symmetry tool that, when enabled, reflects edits along the moveable mirror plane. Some tools - like fill - are intentionally outside of the scope of the symmetry tool.

Make complex tools more efficient with threads

Description

Use and track threads as fields inside Tool classes. Delegate tasks currently performed directly inside update(SEContext context, Coord2D mousePosition) to these threads and kill ongoing threads that are no longer relevant.

For example, if the target pixel of a move selection operation has changed before the thread completed the operation pre-processing, kill the thread executing the task and reassign the thread field to a new thread with the updated conditions for the operation. However, if the target pixel is still the same as the ongoing thread operation, and no other metadata is relevant, allow the thread to continue executing.

Optimize selection overlays

Tasks:

  • Investigate performance issues arising from redrawing selection overlays and come up with solutions to improve performance

Overhaul preview window

Tasks:

  • Add border to canvas preview to satisfy window minimum size requirement
  • Add zoom controls to preview window
  • Separate playback from main window and add playback controls on preview window

Overhaul and extend palette sub-menu of color selection menu

Tasks:

  • Add buttons:
    • Remove palette button
    • Create new, blank palette button
    • Move selected color left/right in palette buttons (precondition is selected color is in palette)
    • Palette settings (launches dialog akin to layer settings button)
      • Make name editable
      • Immutable palettes cannot be edited (button precondition is mutability)
  • Split palette buttons along lines of functionality into two rows - can still be created with calls to icon button populator; offset second row segment position (Coord2D) by 0, Layout.BUTTON_INC
  • Extend palette color button so that shift-clicking buttons excludes them from shading and palettization processes
    • Add final Map<Color, Boolean> inclusionMap field to Palette class - propagate changes to colorSequence contents to inclusionMap
    • Add exclusion overlay sprite and render above potential primary/secondary color selection overlay on palette color button
  • Assign and implement shortcuts
  • Write and check tool tips and info page blurbs

Add second snap mode to `MoverTool` implementations for pixel grid snapping

Description

Add a second snap mode to the MoverTool implementations (MoveSelection and PickUpSelection) where the top left of the selection area is snapped to the top left of the pixel grid cell that is occupied. This will exist alongside the existing snap mode, which moves the selection area by the nearest multiple of its own dimensions.

Tasks

  • Add boolean field in MoverTool to toggle between potential snap modes
  • Assign a toggle key - tentatively [ Ctrl ]
  • Implement pixel grid snapping behaviour
    • Ensure pixel grid checks are passed before executing snap
      • Reference BoxSelect snap implementation to ensure consistency
  • Update tool blurbs to account for extended behaviour

Add frame stitching and splitting behaviours

Description

This should enable easy assembly and disassembly of sprite sheets. If a project has a single frame, it can be split. If a project has multiple frames, it can be stitched together.

Approach

For stitch and split functions:

  • Build back from final ProjectState result definition; this will be a getState() call appended with mutator-returners

Tasks

  • Split dialog
    • Mockup
    • UI assembly
    • Condition validation
  • Stitch dialog
    • Mockup
    • UI assembly
    • Condition validation
  • split and stitch functions
    • Preserve layer data
      • Pixel content
      • Visibility
      • Opacity
      • Onion skin mode
      • For stitch, auto-lock all layers
      • For split, auto-unlock all layers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.