Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upHordes improve #6659
Conversation
added some commits
Mar 14, 2014
This comment has been minimized.
This comment has been minimized.
|
Pretty cool, looking forward to this. |
kevingranade
reviewed
Mar 16, 2014
| HSIG_NOICE, | ||
| HSIG_LIGHT, | ||
| HSIG_SMOKE, | ||
| HSIG_SMELL |
This comment has been minimized.
This comment has been minimized.
kevingranade
Mar 16, 2014
Member
Before you get started on working with smell, I don't think signalling hordes is going to be a good match for smell. For that I think a map would be the most appropriate.
Here's how it would work:
Every turn, every player (player or NPC) writes the current turn and maybe a scent strength to the overmap tile they're in, possibly with some exceptions (in a car prevents it, no writing scents to water type tiles, fields might store scent more strongly than roads, etc), it might also use the player's current scent attribute, which can be manipulated by a few things.
Every horde turn, each horde checks the scent of the 9 tiles around them and compares it to whatever else they're doing. At this point the code can compare the timestamp of the scent in that map tile to the current time to decide how fresh the scent is. Possibly we'd have a separate scent strength value that would make it easier to pick up, but wouldn't prevent them from following the trail in the direction of newer scents.
If they're hot on the trail of a noise or recently saw something, they'd ignore the scent, but if they're just wandering around they'd be eager to follow it. If they decide they want to follow the trail they'll move in the direction of the freshest scent.
kevingranade
reviewed
Mar 16, 2014
|
|
||
| } | ||
|
|
||
| /*int overmap::signal_hordes_smoke(int x, int y, int sig_power, mongroup zg) |
This comment has been minimized.
This comment has been minimized.
kevingranade
Mar 16, 2014
Member
I'm having trouble imagining zombies seeing a smoke cloud and deciding to move toward it, it's a bit too abstract a signal, you know?
This comment has been minimized.
This comment has been minimized.
kevingranade
reviewed
Mar 16, 2014
| @@ -4429,6 +4429,37 @@ float map::light_transparency(const int x, const int y) const | |||
| return transparency_cache[x][y]; | |||
| } | |||
|
|
|||
This comment has been minimized.
This comment has been minimized.
kevingranade
Mar 16, 2014
Member
Rather than limiting light signalling to a semi-random light source once every 10 turns, how about getting the strongest light source in the active map and using that? As we process the lightmap, store the intensity and location of each light source as we go, sorting them in order of strength.
Once we're done, go through the light sources from strongest to weakest until we find one that's outside, then use that one to signal the hordes.
This comment has been minimized.
This comment has been minimized.
|
"how about getting the strongest light source in the active map and using that?" |
This comment has been minimized.
This comment has been minimized.
|
I don't think there's a sensible way to combine intensity of light sources together, not if we want to reward players for enclosing lit areas so they don't let light leak out. |
This comment has been minimized.
This comment has been minimized.
|
Max light signal distance determined from ambient light now. |
This comment has been minimized.
This comment has been minimized.
|
And i can't use full list of light sources. Light from lava or light from zombie shoker may be cause of wrong singals. |
This comment has been minimized.
This comment has been minimized.
|
The simplest solution to your "wrong signals" problem would be to just use light as one of the weaker signals that the zombies process. AFAIK, accordingly to the lore zombies don't see well at all, preferring to hunt by smell and sound. If a horde mistakenly follows and falls into lava because absolutely nothing else is going on around them... well, that seems just fine to me. |
This comment has been minimized.
This comment has been minimized.
Plus it means they'd move around due to stimuli other than the player, which would mean more dynamic wandering overall. |
This comment has been minimized.
This comment has been minimized.
|
In practice this means that the player can accidentally attract zombies will be walking around if their asylum and stumble on the source of lava. Zombies will not jump into the lava, they just appear around this place on 10-20 overmap tiles. It is frustrating for the player, which is why he did not commit such errors to attract zombies. |
This comment has been minimized.
This comment has been minimized.
|
"one of the weaker signals" may be signal from console (I can't send it to zombie. Cause such as situation with lava), sombie shoker, portal..may be something else. |
This comment has been minimized.
This comment has been minimized.
|
Finally i don't see logic of solution with "one of the weaker signals". TO burn house and turn on oil lamp. Signal go to horde from oil lamp? |
This comment has been minimized.
This comment has been minimized.
|
Direction of light signal - it's not problem now. Code already checks edges of map. Problem - more accurate calculation of him visibility for horde. |
This comment has been minimized.
This comment has been minimized.
This makes me think of range, distractions, etc. Example: I set a bonfire 3 map tiles away and sneak around to get past the horde. While sneaking, I light a glowstick to scope out a room I thought was windowless, but OOPS there's a window. If b), I'm being chased, I throw the glowstick one way and run the other. How effective might that be? |
This comment has been minimized.
This comment has been minimized.
|
By "weaker signal" he means that light shouldn't be as important as sight or smell. |
This comment has been minimized.
This comment has been minimized.
|
Reasoning on the zed-based stimuli: since the Blob upgrades zeds (and is likely responsible for the Smoker at least), I was thinking that it's somewhat logical to conclude that it wouldn't make zeds that undermine its troops' ability to function. So a horde would be able to (learn to) ignore its own Smokers, Shockers, etc as target-stimuli. Other such zeds not part of a given horde might not be recognizable to that horde and cause distractions, yeah. |
This comment has been minimized.
This comment has been minimized.
|
"What happens?" |
This comment has been minimized.
This comment has been minimized.
|
Hey guys! It's not fully functionally horde. It just moving spawn point. For good horde need active map on all game world. |
This comment has been minimized.
This comment has been minimized.
|
We can't make the whole game world active, but for purposes of this kind of |
This comment has been minimized.
This comment has been minimized.
|
Are you sure you can increase the active map 100 times? I am sure that my computer will make a one turn in a minute. May be you have supercomputer, or you have plan for cool code optimization, but i not have all it. |
This comment has been minimized.
This comment has been minimized.
|
Don't need an active map, really, if we make hordes single-overmap-tile and make it store which zombie types are in it, we can just process everything on an overmap scale. Only issue might be pathfinding, but at this point that seems optional. |
This comment has been minimized.
This comment has been minimized.
|
To be clear and focus on one issue, the current implementation picks |
This comment has been minimized.
This comment has been minimized.
|
"Also please clean up all the debug clutter." |
Reaper42 commentedMar 15, 2014
Add horde reaction by light. Check light indoor/outdoor.
Show hordes on overmap (in visible range of player)