Ship Editor MVP - barsandcat/HMS-Sunflower GitHub Wiki

Undo

Should we have and undo?? Does KSP has undo? Yeaaa it does. Start of drag is recorded as state you can return to, which is kind of lame. And there is redo.

Well, we can have wrap each change to the ship design as an command object that can both be applied and undone. Like really simple - add object, remove object, and crucially - move object, so you can undo your drag and drop in one go, unlike the KSP )

So, undo and command patter are separate from edit state. But edit state finally creates those commands.

Controller support

CommonUI will do that. Keyboard, mouse and gamepad buttons icons https://thoseawesomeguys.com/prompts/

Fuck blueprint is a bad name. ShipPlan.

What I am bothered is that I do not understand how to fit all of that in part browser:

  • Category filter - checkbox list
  • Perk filter - checkbox list
  • Sorting
    • cobmobx + direction button
    • table with header sort... + filter?
      • We have no space for that

And what is worst - it is not controller friendly at all. What if I can comeup with interface that is gamepad friendly? Maybe I should build one, and only one version of module selection flow.

Perfect mouse UX is just list of buttons. If they do not fit to screen, add scroll. All the filters may be unnecessary if you do not have that much parts.

Perfect gamepad UX? You do not need to do different ui element for it, you can just open panel by button press. Part selection is by one cardinal movement up and down in a list - left\right + x, circle - hide entire panel Part list if filtered simultaneously by two other filters Category and perks both apply immediately on selections. Both support forward and backward movements - shoulder pads and up/down You can pin categories and perks with 2 additional buttons (triggers). Each filter has 3 states minimum - off, include perk, exclude perk. Sorting is 2 another buttons - cycle stats for sorting open dialog box and use up/down to select sorting by, and another button to inverse direction of sort (square, triangle)

Since 2 cardinal directions are horizontal - part list has to be horizontal. Category list should be vertical, bottom left corner. Part list horizontal, bottom part of the screen, and perks filter and sorting panel about part list, horizontally as well. Part browser can be hidden\shown.

MVP Functionality

About edit state: selection mode, area selection mode, paint mode, pan mode, drag and drop mode -> not all of that needs to be one state

Edit state:

  • Selection state - regular mouse cursor, default state, part browser is visible
  • Painting state - preview of possible placement of part or group of parts, part browser is not visible Into painting state:
  • Select part in part browser
  • Hold mouse over selected placed part or group of parts
  • Copy input if selected part or group of parts Into selection state:
  • Escape, cancel or back input
  • Place input

Box selection is sub state available only in selection state. Paning should work in both states safely.

Placing parts on top of each other:

  • Do not let
  • Allow to do it, but placed part is in invalid state - do not like it
  • Allow to do it, but original part is deleted - that is easy option for mouse hold

All the rotation/flipping stuff should go into "Brush" object, which will abstract away our rotation/flipping and placing code. So if you have brush you are in paint state, thats it, you do not need FSM.

ViewModel-Editor-MVP

⚠️ **GitHub.com Fallback** ⚠️