Skip to content
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

Visible wandering hordes #7086

Merged
merged 1 commit into from Apr 9, 2014

Conversation

Projects
None yet
4 participants
@ghost
Copy link

commented Apr 7, 2014

Make wandering hordes visible on overmap. (Code pulled from Reaper42's abandoned PR #6827)

@bug-sniper

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2014

Are the hordes visible from a greater distance with binoculars?

@ghost

This comment has been minimized.

Copy link
Author

commented Apr 8, 2014

@bug-sniper Yeah, hord sight range is calculated using overmap_sight_range(), which takes into account binoculars, rifle scopes, as well as the eagleeyed and bird_eye traits

@KA101

This comment has been minimized.

Copy link
Contributor

commented Apr 8, 2014

Sounds good.

@KA101 KA101 self-assigned this Apr 8, 2014

@KA101

This comment has been minimized.

Copy link
Contributor

commented Apr 9, 2014

Tested, works, merging.

KA101 added a commit that referenced this pull request Apr 9, 2014

@KA101 KA101 merged commit 3a0c5e3 into CleverRaven:master Apr 9, 2014

1 check passed

default
Details

@ghost ghost deleted the visible_hordes branch Apr 9, 2014

@ghost

This comment has been minimized.

Copy link
Author

commented Apr 9, 2014

Thanks, KA101

@KA101

This comment has been minimized.

Copy link
Contributor

commented Apr 9, 2014

No problem.

@Nandorianen

This comment has been minimized.

Copy link
Contributor

commented Apr 9, 2014

Midnight: everything's fine.
Morning: zombie horde is closing on my house and can be seen on the map. And map is lagging heavily. Pretty sure these two are connected.
Build 1317, SDL, windows.

Also some kind of hint is in order, I think. Right now it shows Z on map, but doesn't explain what it is anywhere close.

@ghost

This comment has been minimized.

Copy link
Author

commented Apr 9, 2014

@Nandorianen, thanks for the feedback. Are you sure the lag is not resulting from the horde itself being nearby (i.e. a crap-ton of baddies spawning nearby)? I haven't experienced any lag resulting from this PR, and from going over the code, I don't see any way it can cause lag from nearby hordes. The cost of displaying a horde on the overmap should be the same regardless of how close the horde is to the player.

@ghost

This comment has been minimized.

Copy link
Author

commented Apr 9, 2014

@Nandorianen, also regarding the map symbol, I think it's fairly intuitive as-is. (At least in the context of the rest of the game ;) ) Though, I guess it couldn't hurt to add a line of text on the right side of the overmap screen - probably a trivial change for someone more familar with the code than me.

@Nandorianen

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2014

Are you sure the lag is not resulting from the horde itself being nearby (i.e. a crap-ton of baddies spawning nearby)?

I can't be sure since I have no effective methods to thoroughly scientifically test it, but my limited experience suggests that this is the case. No lag anywhere except overmap. And now that the horde is gone / killed, no lag on overmap again.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2014

Yeah, I think the map moves a little slower now. Can't say it's the horde display BUT it does move at a similar (maybe slower? possible confirmation bias) rate when I hit horde-debug.

So I'd believe that the large amount of flashing characters might be a culprit. Can't prove it though.

@Nandorianen

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2014

To clarify: by map lag I mean slow scrolling if you hold down direction button.

Don't know what it is now. No hordes around, all map levels lagging when I am on ground level. Rain was a suspect, but turned out innocent.

When I am in the basement, everything is quick and smooth. Any levels of overmap. But going upstairs introduces lag back.

Should I make a separate issue then?

@KA101

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2014

Feel free, but I think that may have been mentioned already.

@ghost

This comment has been minimized.

Copy link
Author

commented Apr 10, 2014

I've confirmed there is definitely a significant slow-down to overmap scrolling caused by this PR, but it doesn't seem related to how close hordes are to the player or even if there are any hordes at all. It looks like the problem is that Reaper42's code is checking for player line-of-sight to every square of the overmap, with every draw.

I'll look into it further and open a new PR with a solution.

@kevingranade

This comment has been minimized.

Copy link
Member

commented Apr 10, 2014

Please be careful, there's a reason his stuff wasn't getting merged, it had
large flaws like this. Unless a very immediate solution presents itself
the fix is reverting the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.