New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor mirror tiles layer #21317
Editor mirror tiles layer #21317
Conversation
5fcbfcc
to
01ddf8a
Compare
thanks awesome PR again. Here's few notes from user perspective:
|
This needs to go back into the oven. As I was implementing the axis angle display, I realized the isometric mod tile mirroring only has the broad appearance of working, but is actually completely broken. I need to re-do the mirror tile position calculation in a way that respects the isometric projection. Additionally, I think I need to put the overlay checkboxes i.e. "Show Terrain Geometry", "Show Buildable Terrain" back into a drop-down at the top of the map like it used to be. Then, a drop-down should be added to the Tools panel that lists other tools such as Mirror Tiles. Upon selecting a tool, the controls for that tool should be displayed in the panel. Otherwise, we're completely out of room already. |
d19a305
to
c880aa5
Compare
Still requires some chrome fiddling. |
c880aa5
to
cb6c68f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crash
Exception of type `System.IndexOutOfRangeException`: Index was outside the bounds of the array.
at OpenRA.Mods.Common.Widgets.PaintMirrorTileEditorAction.Add(CPos target) in OpenRA/OpenRA.Mods.Common/EditorBrushes/EditorMirrorLayerBrush.cs:line 138
at OpenRA.Mods.Common.Widgets.EditorMirrorLayerBrush.HandleMouseInput(MouseInput mi) in /Users/gustas/Documents/GitHub/OpenRA/OpenRA.Mods.Common/EditorBrushes/EditorMirrorLayerBrush.cs:line 76
at OpenRA.Mods.Common.Widgets.EditorViewportControllerWidget.HandleMouseInput(MouseInput mi) in /OpenRA/OpenRA.Mods.Common/Widgets/EditorViewportControllerWidget.cs:line 89
I feel like there should be an erasor brush added, perhaps add a non-colored square, or with an icon
I also recon that people would like to save and import overlays, atm mappers already do this so there is clearly a need
as for the UI, I feel like the axis guide checkbox should just be to the side of the slider instead of in a separate row. Then the overlays dropdown could be moved there as well
the guide lines could be easily scaled to go to the edges of the map
I'll do a code review later
oh, and also for functional purposes I think the overlay should be more transparent. What matters is what is behind the overlay than the overlay itself. I wonder wether we should give control over the transparency to the player 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like no mirror mode should be added for completeness. People may want to do corrections
46a2045
to
f9d2f53
Compare
related #10513 |
5dfd1ef
to
8cce1c2
Compare
I've added the ability to persist the mirror tiles layer and settings. It automatically saves to |
17dd308
to
bf9e77e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the PR is in good condition, just some polish is missing. I also want to mention some scope creep
The overlay saving definitely needs to have separate save functionality. The most common usecase is having pre-made overlays that you just import when working on a new map. It means that different map sizes should be handled, centring the overlay when it gets cutoff or is incomplete
It will still be much more polished if the symmetry line was clamped to map edges
@Porenutak , you'll need to do a |
4286cbb
to
2786b7a
Compare
2786b7a
to
73577f5
Compare
Dont know how hard is this to implement, but to speed up workflow it would be nice to switch to eraser via modifier. Like with LMB I wil add mirror tiles, but with CTRL+ LMB I will erase them. |
I dunno if that would be better. IMO we should keep the current workflow for this PR |
Its more a thought for the future. Using modifiers is always faster that clicking on tab icons. All modern editors works this way. |
We might be fresh out of room on the panel. I discovered when I tried to add controls to save and load the mirror tiles layer, that the scrollbar doesn't enable. I think |
See how the settings panels work |
OK yeah, I got that figured out. There's a fair bit of work to do on this part so it's foolproof. Needs a validation label like on the Actor ID edit. A potential concern is that the user could easily overwrite another mirror tile file, since there's no confirmation dialog. |
73577f5
to
751c737
Compare
Can u give at least one example why anyone needs to import mirror tiles from other map? |
I think making the mirror tile file work if you manually copy and rename it from another map would be a good idea. I'll get onto that. Yes, that axis line issue in TS is such a pain. I thought it was due to elevation but apparently not. |
cf4281e
to
4d26b73
Compare
|
Added a mirror tile brush to the map editor for marking out tiles. This should allow creators of mirror maps to have an easier time of things.
There's two modes:
Flip Mode
Flip mirror tiles along one or both central axes of the map.
You can supply an axis angle to flip along an angled axis. This angle is in increments of 15 degrees.
Rotate Mode
Create mirror tiles by rotating instead of flipping. Can be used for 2-8 player maps.
Mirror tiles are not persisted to the map file.
The layer is enabled by default in the editor, and is toggled with F3.
Potentially needs a clear button and an editable center offset.
Source artwork can be found here.