raduprv / Eternal-Lands

http://www.eternal-lands.com
Other
157 stars 57 forks source link

Mapmarks - possible enhancements #128

Closed feeltheburn closed 2 years ago

feeltheburn commented 3 years ago

1) The filter function should work on 3D map marks as well, so only the marks that pass the filter show on the map itself.

2) (less important) a key command to quickly hide/show map marks, both on tab map and 3D. A filter of jumbled letters hides them on the tab map, and if (1) is implemented that would essentially do the same thing. (I'm aware of the option to turn on/off 3D marks in the Options, but that's very annoying to try and find when you want to take a random quick screenshot without them, for example.

pjbroad commented 3 years ago

There's an option on the right-click menu for the "map view" icon to toggle the 3D map marks.

feeltheburn commented 3 years ago

Gah... took me a while to find that, I didn't even know the bottom buttons had any right-click options, heh.

Okay, that handles #2. But is #1 doable, only show the 3D marks that show with the filter like on the tab map?

(I tend to overdo the marks, so there's times I'd like to see just specific ones.)

pjbroad commented 3 years ago

Yes, #1 is doable. Do you think it should be yet another option? I've been chasing a couple of bug in the 3d mark code so could look at this filter too. Bugs

  1. 3d marks extend, progressively further below the ground level (seen inside particularly)
  2. 3d marks have zero height in some cases.
pjbroad commented 3 years ago

I've added an option (under the existing 3d mark toggle) to apply the current map mark filter to 3d marks. I've fixed "3d marks extend, progressively further below the ground level". I can't see a way to fix the hight issue. It looks like the map has changed where the mark was placed. Here's an example:

grep -i swamp ~/.elc/test/maps/startmap.elm.txt
94 64|0,255,0| swampcandles
gvissers commented 3 years ago

I can't see a way to fix the hight issue. It looks like the map has changed where the mark was placed. Here's an example:

I will admit I haven't looked into this at all, but it seems strange that a change in the map would affect a mapmark at all. What is the issue you are seeing, exactly?

pjbroad commented 3 years ago

I can't see a way to fix the hight issue. It looks like the map has changed where the mark was placed. Here's an example:

I will admit I haven't looked into this at all, but it seems strange that a change in the map would affect a mapmark at all. What is the issue you are seeing, exactly?

The 3d mark height, starts from the height of the tile its on. This means it works fine for high, low or medium map regions. I think the mark I listed above is on a tile that has now been lowered below the surrounding area and is also no longer walkable. Hence it does not show properly.

gvissers commented 3 years ago

Ok, I can see how that might happen, unwalkable tile have a height of -2.2 so could easily disappear below the floor.

Doing some digging reveals that get_tile_height() already returns the average height of the surrounding walkable tiles, if a tile is unwalkable. That would mean that this can only happen if all tiles surrounding the disappeared marker are also unwalkable. Is this indeed the case?

An option could be to automatically move map markers on unwalkabe tiles to the nearest walkable tile. Which will have its own set of problems. Or simply draw the at height 0. Or just leave it as is, I suppose this will be a niche problem and people can move the markers themselves.

pjbroad commented 3 years ago

Looks like all the surrounding tiles are non-walkable. I guess we just have to live with it.

feeltheburn commented 3 years ago

Does it really need to be an option, whether the filter affects 3d marks? It feels more like a "it should just work this way" thing. I'm having a hard time picturing a circumstance where I'd filter the marks on the tab map but not on the main (as it works now).

(Not a problem for it to be an option, just wondering how many options is too many, heh. I don't care either way, just question if it's necessary.)

pjbroad commented 3 years ago

I agree, we have way too many options but I couldn't decide. This way at least there will be no complaints that it breaks certain gameplay. You know what's coming.

feeltheburn commented 3 years ago

LOL, well, your call. ;)

feeltheburn commented 2 years ago

Seems good, thanks :)