nicymike / serflings

Serflings Remake Project
https://serflings.simpleguide.net/
29 stars 0 forks source link

Woddcutter ignores tree #14

Open Spikeone opened 4 years ago

Spikeone commented 4 years ago

Looks like a woodcutter sometimes ignores trees - not really sure what the problem is there.

EDIT: It possibly only took very long until those trees were considered.

image

nicymike commented 4 years ago

Not sure if this is a bug. Sometimes it takes some time for the woodcutter to realize that there are more trees available. I could check this when I am rewriting the logic for the woodcutter.

Maybe someone else can confirm this?

Spikeone commented 4 years ago

I can confirm, that another woodcutter I built later (for the same tree) found it after some time.

So as my edit above says, I'm pretty sure it just took long so it's not ignored but ignored for some time^^

nicymike commented 4 years ago

There could be a bug. Thats why I am rewriting the logic and verifying it with the original game.

Wakeboardtiger commented 4 years ago

From the original game i remember that granite blocks, which are at the same position ( like on your picture upper left side to the lumber jack house ) to any small house are not being touched by the workers. Thats a bug from the original game. image So here the small Fort is magically blocking the worker. The granite lies on the upper left corner, untouched. image The house removed, the guy comes straight to work. This is tested on the original game. Here i got the situation saved for you: SAVE9.DS.Zip again, its not a zip, just rename it back.

nicymike commented 4 years ago

Yeah, I know about the stone thing. The stonecutter may only enter a stone from the bottom right. My plan is to block these positions for creating buildings while there is still stone left.

Please don't mix different issues in one entry because this does make it harder for me to plan issues for different game versions. Better create a new entry for every new issue. Or do you think the two issues are connected?

Wakeboardtiger commented 4 years ago

Ahh I thought it might be the same issue, since the tree was at the same position, but since it was found later...

But if you block creating any house at that position, space for building houses or especially granite workers to remove the granite can be very limited in some situations.

nicymike commented 4 years ago

I checked the original code, compared it to Serflings and did some tests. Serflings does exactly what the original game does.

The woodcutter chooses some random locations and checks for trees at that locations. If no trees are found the woodcutter will do a break until the search starts again. So if you have really bad luck it can last forever until all trees are cut down. Also the woodcutter is searching four times slower than the stonecutter.

I already have an idea to improve the search. I need to do it anyway to implement a message if no more trees are found.