nomns / nparse

Nomns' Parser for Project1999
GNU General Public License v3.0
43 stars 22 forks source link

Selectively load map layers #2

Closed TVOps closed 6 years ago

TVOps commented 6 years ago

Being able to enable/disable map layers would greatly increase map readability

nomns commented 6 years ago

For layers I might have to do some math I think. I can get maybe the highest peaks of z usage and make those layers points. like 5 highest peaks. This would be for manual.

I do have it planned to fade lines based on z level relative to your z level. I could implement this system for manual view then attach +/- keys to layer movement.

Thanks for the request! Expect this to be in within the next couple releases.

From now till then, if you have any suggestions of how you would like this feature to look in action, feel free to add to this issue.

nomns commented 6 years ago

Was working on this last night. Had to re-write the entire map system for Z positions, but it's looking real good (I had yet to truly update it for Qt so this is giving me that chance). I think the EQ client just used separate files and those files were "layers," whereas some zones under the rework have upwards to 500 layers -- a little much, but running smoothly. So little is showing at one time ATM, its like walking through fog of war.

Currently I have it setup to show alpha of lines 100% for those Z lines within your z + 20 and then 50% for anything within 100 both ways, and then 10% for everything else. The problem is that ramps/stairs/slopes create their own z levels, so the confusion is still there, but this system will truly show you what is on the same Z level you are on, so I want to keep this system for 'browsing maps', but I don't think it's great for using while playing.

I think a better option for actual use when you want 'layers' to be used dynamically when you /loc and not just 'browsing' the map, would be to check for obscuring. So, if we take your current Z level and make it the master, we can set the layer alpha to 0-10% for layers that are obscuring or obscured by your current layer and the layers not obscured can be shown at 80%, and then your current level at 100% maybe also thicken lines to make it more obvious for your current Z. I think this system will be easier to use for navigation.

Either way, I am hoping to have this system done by this Sunday.

I'll close the issue once the system is implemented and released.

TVOps commented 6 years ago

The alpha system sounds good! Though I wonder if having an option just to show your current Z level would be useful. There are plenty of times I'm on a certain level and only need to see the level around me. Seeing the levels above and below me all the time, albeit at a reduced alpha, may be just as obscurific. Looking forward to seeing your changes regardless!

nomns commented 6 years ago

Well for sure this entire system will be toggleable. I am going to add buttons to the Maps 'title' area. So you can toggle the Z system on/off. I'll have to figure out how to toggle between the two Z systems. The first being dumb where it is just based on your Z only, and the second being smart where it looks for obscuring based on your z layer.

I will make the alpha levels for both systems editable within the settings window. You could create what you are talking about (current Z level only) by editing the 3 alpha values. So, you could keep the dumb system setup to show only current z level at 100% and the smart system with more showing and switch between the two as you need.

I will say that almost every step down a ramp will have it's own Z level (if the mapper mapped z levels -- see the guk file for example has no Z level other than 0 (even though that is not true)), so only showing 1 z level could be very confusing. I'll try to add some png/gif of this on here tonight to show you what I am talking about. The blackburrow map is super confusing with only 1 visible Z level at 100% (rest at 0%) -- at some levels only half a line will show. Even with the dumb z system setup with multiple alphas, it still looks a little confusing, albeit a little less confusing than showing all lines at full alpha.

TVOps commented 6 years ago

Ahh interesting, I hadn't thought of how ramps would work. With how some zones have maps separated into multiple .txt files, is it possible to isolate a single file? Assuming each file is it's own "level" of course. I'm not certain how those files are organized.

nomns commented 6 years ago

The system would need to be setup in that way (toggle files as 'layers'). Since I am not using a gl graphics engine so I have to keep in mind the amount of loops needed to accomplish things (Everytime the map is zoomed, I have to go through each individual item on the map and update the width, color, etc, so I need to have a system in mind to reduce cpu usage.). So I combine all lines in all files and then sort them by z level -> color. That gives me 1 item per color to edit for all lines on that z level.

The original eq map had horrible layer management (a layer per file but it was not always observed), and I remember not all maps having proper layering, etc. I don't want this past problem also becoming my problem. On top of this, I wouldn't be able to easily know which layer your character is on if I want to automate the process (the eq map requires you click on layers to show them). I also wanted to add the ability to insert your own lines which wouldn't be the best to work with when having a layer per file.

You should be able to dump map files in the map_files directory and let my system do the rest. If I move to the per file layer, I would have to rely on users to curate their own maps or curate maps for them to ensure proper layering, etc. This would be too time consuming.

If I can get the smart system setup as I described, I really think its all you will need.

nomns commented 6 years ago

Just as an example, look at Ak`Anon. There is only 1 akanon file and it has all z layers within it. It was not setup properly to use the layer per file in the original eq map system. so in EQ map, you would never be able to separate floors, but in mine, you can look at each individual z level.

edit: just checked and there are two ak`anon files and both have multiple z levels in them.

nomns commented 6 years ago

Hey, this is a little hard to see -- I didn't want the gif to be too big. Here is the overthere from top to bottom. This is alpha : 100%: current z level, 80% -100/+100, then like 10% for everything else. As I said I would update with a gif. This is the dumb one that doesn't take into account obscuring.

oot_layers

TVOps commented 6 years ago

Wow this looks way more readable than I expected! Very nice!

nomns commented 6 years ago

To give maybe a little better example how it can be a little confusing. Here is Blackburrow.

bb_layers

Im gonna finish up this system and add the better obscuring checking and then play the game a bit hopefully this Friday so I can get a real feel for it so I can tweek it.

I am hoping by v 1.0 I will have curated a better set of maps. I know there are super nice map packs out there, so I might talk to or try to talk to those individuals to allow me to release with their information (proper z levels etc.). Obviously this isn't stopping people from just using the map packs on their own.

nomns commented 6 years ago

Oh my, I finally finished the majority of the re-write. I think the smart system is so much better.
bb_layers_smart2

It might need some tweaks.

I may have to push back the next release until next week because I now I have to pull back in all the other map systems (user, directional, poi, spawns) into the new z system.

nomns commented 6 years ago

This feature is (somewhat) in the new v0.4 release. It's usable for sure if you are having problems looking at different floors.

TVOps commented 6 years ago

Testing it out, it works really well! Great improvement