FEATURE: Draw Explorer - BETA

Developer discussion regarding MapTool 1.4

Moderators: dorpond, trevor, Azhrei

Forum rules
Posting now open to all registered forum users.
User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

FEATURE: Draw Explorer - BETA

Post by Jagged »

I think I am slightly unusual in my use of Maptool in that I use it very extensively for map creation as well as play. Perhaps because I play exclusively online, I have always been concerned about performance, so I would rather build a map in Maptool that downloads quickly, than import something fancy off the Cartographers Guild ;)

So because of that, I often run into issues with the tool's limited drawing capabilities. I frequently get annoyed that I've drawn something on the wrong layer! Then recently I got very frustrated with a map I had built, where I decided I wanted to change the background from "endless texture" to textured rectangle. So frustrated that in the end I "hacked" the map by manually editing the rpmap file!

What adds to the frustration, is that these annoyances are not problems with the drawing tools as such, but limitations of the UI. If we had the equivalent of the "Map Explorer" for drawings, then I might be able to move a drawing from the TOKEN layer to the BACKGROUND, and I might be able to change the draw order as well.

With this in mind, I have started tinkering with a "Draw Explorer". I am posting here for the usual feedback and because if I go "public" I am more likely to stick with it ;) My intention is provide the GM with some basic layer and ordering tools, while players would only be able to see drawings made by the template tools (Burst Templates etc) that have been placed on the token layer.
drawExplorer.jpg
drawExplorer.jpg (117.17 KiB) Viewed 3262 times

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: FEATURE: Draw Explorer - BETA

Post by JamzTheMan »

Interesting idea. I cant think of any improvements other than allowing a right-click "Rename" option? Maybe related macro functions to access said objects?

I assume so you could draw, say, a "Flooded room" and hide/show said drawing to represent the water level (or what ever neat tricks you could use it for).

Interface seems simple/good enough. Does it work for older maps? (could load some older maps and see how it lays out). I tend to draw over areas with blending some times so not sure how many objects that creates...

Can you combine the drawings? Hrrm, would this translate to a "VBL" viewer too? :)
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: FEATURE: Draw Explorer - BETA

Post by Jagged »

My intention is not to make any "under the hood" changes, which will limit what can be done but means there will be no compatibility issues. I've tested with my current campaign, which is 1.3b91, so it certainly works with older maps.

However with the current interface you are soon swamped under a flood of shapes and there is no way you can identify individual drawing elements! So what's there at the moment is only a "work in progress". At the very least it needs to be a closer match to the Map Explorer, the text needs to be more descriptive and the icons need to indicate the shape and possibly colour/texture.

I liked the ideas you suggested and they will definitely be worth exploring once I've finished the basics. I also have one idea about grouping drawing elements, but I haven't tested whether or not that's feasible yet.

The basic menu would cover the following functions:
  • Change Layer
  • Bring to Front
  • Bring to Back
  • Delete
Then possibly:
  • Edit Palette
  • Properties

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: FEATURE: Draw Explorer - BETA

Post by JamzTheMan »

That's a nice set of options to start with.

For the edit palette/properties, maybe you can leverage the dialog for editing maps? I know you can go and change the background color/texture for maps.

And ya, I'd stick with compatibility and not dig deep into the classes if you don't need to. I'm looking forward to my vacation soon and hope to get back into some coding to :)
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: FEATURE: Draw Explorer - BETA

Post by Jagged »

It turns out that its quite interesting to look at maps you have played on. I am seeing blast templates littering the token layer, even though they are not visible. I think this is because (for whatever reason) the undo often won't remove a template, so you end up either clearing the token layer of drawings (often risky) or performing a cut.

I am also encountering the issue where the zone doesn't refresh, unless you zoom in and out a bit. This only happens when moving a drawing within a layer. If I move the drawing from one layer to another, it works as expected. Curiously it also works for the connected clients. Only the poor GM has to wiggle his mouse wheel :(

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: FEATURE: Draw Explorer - BETA

Post by Jagged »

I have got the basics done now.
drawExplorer3.jpg
drawExplorer3.jpg (46.93 KiB) Viewed 3203 times
The icons aren't great, but they are workable for the moment, and the functions all work.

Is anyone interested in what I have so far? Should I submit it?

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: FEATURE: Draw Explorer - BETA

Post by JamzTheMan »

Interesting re the hidden templates. I suppose they take up very little room but shouldn't they be deleted and flushed?

Re the icons, cant you use the same icons used for the buttons? Or do they look just as bad? Or is that what you used?

My only question/concern is, when you select the object in the Draw Explorer, do you highlight it somehow in the map view? How do you know which one you are moving/changing? Can you throw a bounding box around it on selection?
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: FEATURE: Draw Explorer - BETA

Post by Jagged »

JamzTheMan wrote: Re the icons, cant you use the same icons used for the buttons? Or do they look just as bad? Or is that what you used?
Unfortunately when it comes to the drawings that make up a map, you cannot always back-track to the drawing tool that made it. The difference between a line and a polygon is simply that there was no fill colour. So that's not particularly helpful. Then there is the difference between drawing and erasing, I wanted that to be obvious, so I created a kind of inverse icon.

I used the template tool icons though, although I did reduce their size down to 16 pixels.
JamzTheMan wrote: My only question/concern is, when you select the object in the Draw Explorer, do you highlight it somehow in the map view? How do you know which one you are moving/changing? Can you throw a bounding box around it on selection?
Yeah, that's a problem. Not sure the best way to deal with that. Although I am hoping that if I add a properties dialogue, I can perhaps show a scaled down drawing.

[EDIT] It occurred to me that a better way might be to copy the resource library, and display a rendering of the selected drawing underneath the list.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: FEATURE: Draw Explorer - BETA

Post by JamzTheMan »

Showing the drawing may not be that helpful...

Lets say you have 16 square columns in a room, you need to move one, they all look identical. The best option IMO would be onSelection in the explorer panel, highlight/draw bounding box around the drawing.

I believe there is static code to help draw the red/white border around objects. I remember accessing it for the Resize Map/Object dialog function a while back. Although, being a "drawing" may be a hindrance.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
JML
Dragon
Posts: 515
Joined: Mon May 31, 2010 7:03 am
Location: Blagnac, France

Re: FEATURE: Draw Explorer - BETA

Post by JML »

Nice idea Jagged. This would be a welcome addition.

+1

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: FEATURE: Draw Explorer - BETA

Post by Jagged »

JamzTheMan wrote: Lets say you have 16 square columns in a room, you need to move one, they all look identical. The best option IMO would be onSelection in the explorer panel, highlight/draw bounding box around the drawing.
Selecting an object in the list will centre the screen on the object as well.

My problem with highlighting the drawing is that I am not sure how the event handling would work. I will look into it though.

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: FEATURE: Draw Explorer - BETA

Post by Jagged »

The other idea I am working on as part of this is a "Group" function. So you can select a number of drawing elements and group them into a single component. This makes no difference to the appearance of your map unless your group includes a cut or erase. If your group does includes a cut or erase, then it behaves like a mini-layer. So effects you could otherwise only achieve by spreading your drawings over multiple layers, you can now accomplish on a single layer. Which means it becomes possible to produce more complex maps, or to more easily make complex maps.

Grouping Example:
Here I have drawn a rectangle of grass and a circle of stone brick.
group0.jpg
group0.jpg (105.18 KiB) Viewed 3160 times
Then I cut another circle within the brick circle and then cut a line 50 pixels wide, diagonally from the centre out to the south west.
group1.jpg
group1.jpg (102.29 KiB) Viewed 3160 times
Then lastly I group the stone circle and the two cuts.
group2.jpg
group2.jpg (107.86 KiB) Viewed 3160 times
Obviously that's only a simple example and you could achieve the same thing by drawing the circle on the object layer, but this increases your options, and I have certainly had occasion where I have wanted this facility.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: FEATURE: Draw Explorer - BETA

Post by JamzTheMan »

Nice.

Does it mess with the Undo functionality or doe undo mess with the grouping?
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: FEATURE: Draw Explorer - BETA

Post by Jagged »

Undo is on my list ;)

I haven't tested it yet, but until I work on it I expect that grouping things will effectively remove them from the "undo" list.

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: FEATURE: Draw Explorer - BETA

Post by Jagged »

I've done a little work on this over the holidays and I believe I am not far from submitting the branch.

With regard to the Undo question, I am using the existing Undo mechanism so deleting a drawing will allow you to "undo" the deletion. However the "undo" will always redraw at the top and I don't think I can do anything about that without delving into shared libraries and doing tons of work I don't feel would be worth the effort.

I also decided to split the Drawing Explorer window in a similar manner to the Library, and show a representation of the selected drawings below the tree (I'll add some pictures later). The nice thing about this is that it allows you to see the effect of grouping elements together, before you turn them into a group. By which I mean, if you select three elements, they are drawn on top of each other. This seems to work well. Double-clicking on an element in the tree causes the screen to centre on where the element is placed in the zone and with these two features combined, I've found it very easy to locate elements within even very complex maps.

Post Reply

Return to “MapTool 1.4”