Page 3 of 4

Re: Orchard alts?

PostPosted: Thu Mar 23, 2017 3:09 pm
by Chrumps
Oops, what a ***** I have triggered. ¦]

Re: Orchard alts?

PostPosted: Thu Mar 23, 2017 4:17 pm
by Taipion
TotalyMeow wrote:Your idea is actually really close to what is happening


TotalyMeow wrote:I suspect you have no idea what is happening and therefore no idea what is required to make it work.


:lol: :lol: :lol:

Ofc I have no idea how the details of your implementation look like, as I can't see your servers code, and I can only make a guess from what I see through the client, so yes I have no idea, but I am quite familiar with coding, just saying.

Re: Orchard alts?

PostPosted: Thu Mar 23, 2017 5:04 pm
by TotalyMeow
Yes... and I'm pointing out that your idea to fix it is pretty close to what is already happening. So, it's not a fix and you clearly don't know what's happening in there. You might know a little something about code but Salem's code is very much customized right down to the very basic parts of the engine running it. And some of it is not what we'd like it to be, but we have to be very careful in making changes to it. It's like if we could manipulate the physical constants of the universe and we decided to lower G a tiny bit so the Earth's gravity would be a little lighter and we could launch rockets more easily, and then suddenly the sun balloons into a giant and the Earth is hurtled out to the orbit of Saturn. Oops.

Re: Orchard alts?

PostPosted: Thu Mar 23, 2017 5:14 pm
by Bleuwulf
TotalyMeow wrote:Yes... and I'm pointing out that your idea to fix it is pretty close to what is already happening. So, it's not a fix and you clearly don't know what's happening in there. You might know a little something about code but Salem's code is very much customized right down to the very basic parts of the engine running it. And some of it is not what we'd like it to be, but we have to be very careful in making changes to it. It's like if we could manipulate the physical constants of the universe and we decided to lower G a tiny bit so the Earth's gravity would be a little lighter and we could launch rockets more easily, and then suddenly the sun balloons into a giant and the Earth is hurtled out to the orbit of Saturn. Oops.



lolwut? ¦]

Re: Orchard alts?

PostPosted: Thu Mar 23, 2017 5:27 pm
by Taipion
TotalyMeow wrote:Yes... and I'm pointing out that your idea to fix it is pretty close to what is already happening. So, it's not a fix and you clearly don't know what's happening in there. You might know a little something about code but Salem's code is very much customized right down to the very basic parts of the engine running it. And some of it is not what we'd like it to be, but we have to be very careful in making changes to it. It's like if we could manipulate the physical constants of the universe and we decided to lower G a tiny bit so the Earth's gravity would be a little lighter and we could launch rockets more easily, and then suddenly the sun balloons into a giant and the Earth is hurtled out to the orbit of Saturn. Oops.

Yes, I know by personal experience how nice it is to work on code that is not only complex, but has been written by someone else long time ago, it's always "fun" to do that, and little things might have absolutely unforseen implications.

I just did not think it would be that complex in this case.
So it is not like other things, like determining when a wall old enough to do splash, or when a berry bush replenishs it's berries?

Re: Orchard alts?

PostPosted: Thu Mar 23, 2017 6:05 pm
by TotalyMeow
Taipion wrote:I just did not think it would be that complex in this case.
So it is not like other things, like determining when a wall old enough to do splash, or when a berry bush replenishs it's berries?


A wall is a simple timer which ends and isn't random. Berry bushes won't replenish if they get picked and then the tile never loads again. It all relies on 'decay' ticks, which only happen while a tile is loaded. Putting actual random event ticks on the trees themselves is something John wanted to do, but from what he told me, combining that with the season check, the bee check, and everything else it would have had to check for every fruit tree, and the added complications of tracking that while the tile is unloaded and having it update correctly even if the tile didn't load until After these things happened, would have created bullet-time levels of lag across the server.

Right now the 'tree' object doesn't even know what time it is. As far as I know, when it gets a decay tick it checks its species for the right behavior, checks the season if it's a fruit species, checks if it's already bloomed, blooms if it needs to, checks for bees, sets the necessary tags in preparation for the next tick, switches on or off the textures, and then waits for the next tick to go to the next step. It doesn't do any of that unless it's randomly selected for 'decay' so most of the time it's just sitting there dormant. Minimal lag.

And if the tile isn't loaded, no ticks happen in that tile at all. Unclaimed buildings don't decay, trees don't update, bushes don't update, stumps and logs don't update. Things on solid timers that don't need to check surrounding conditions, like maturing crops, maturing walls, board piles, DO update on loading of the tile, but that's it. I'm actually not even sure if maybe a dry board pile won't mold if it never loads from the time it's built to the time it completes because initial mold infection, I think, relies on decay ticks and then the ratio depends on when the infection occurred.

Re: Orchard alts?

PostPosted: Thu Mar 23, 2017 6:14 pm
by Bleuwulf
A clear and Informative explanation of the situation and the complications involved. Thank you for that,and this also explains some interesting hitherto anomalous behavior I and my wife have observed in exploration,for example coming upon a long abandoned base where somehow structures are still intact,but quickly disappear afterwards. Now understood that the reasoning is that the things essentially lay "dormant" due to noone loading the tile,and once we did,it checked and applied the decay ticks which in total subsequently borked the structures.

+1

Re: Orchard alts?

PostPosted: Thu Mar 23, 2017 6:42 pm
by Yes
nosfirebird wrote:if you dont want clutter but want fruit trees make 10 alts and cycle them out with teddybears

Or we could just have used milk. If people actually tried doing something to bring it from Popham faster.

Re: Orchard alts?

PostPosted: Sat Apr 15, 2017 10:06 pm
by rustles
TotalyMeow wrote:
Taipion wrote:I just did not think it would be that complex in this case.
So it is not like other things, like determining when a wall old enough to do splash, or when a berry bush replenishs it's berries?


A wall is a simple timer which ends and isn't random. Berry bushes won't replenish if they get picked and then the tile never loads again. It all relies on 'decay' ticks, which only happen while a tile is loaded. Putting actual random event ticks on the trees themselves is something John wanted to do, but from what he told me, combining that with the season check, the bee check, and everything else it would have had to check for every fruit tree, and the added complications of tracking that while the tile is unloaded and having it update correctly even if the tile didn't load until After these things happened, would have created bullet-time levels of lag across the server.

Right now the 'tree' object doesn't even know what time it is. As far as I know, when it gets a decay tick it checks its species for the right behavior, checks the season if it's a fruit species, checks if it's already bloomed, blooms if it needs to, checks for bees, sets the necessary tags in preparation for the next tick, switches on or off the textures, and then waits for the next tick to go to the next step. It doesn't do any of that unless it's randomly selected for 'decay' so most of the time it's just sitting there dormant. Minimal lag.

And if the tile isn't loaded, no ticks happen in that tile at all. Unclaimed buildings don't decay, trees don't update, bushes don't update, stumps and logs don't update. Things on solid timers that don't need to check surrounding conditions, like maturing crops, maturing walls, board piles, DO update on loading of the tile, but that's it. I'm actually not even sure if maybe a dry board pile won't mold if it never loads from the time it's built to the time it completes because initial mold infection, I think, relies on decay ticks and then the ratio depends on when the infection occurred.


As an amateur programmer, I have some suggestions. Simply have a variable for each object that tracks the last time it was loaded. When the object is loaded again, simply roll the dice X number of times (based on how many decay ticks would have passed within that period) and you would get the same result. Finally update the time variable to the current time.

That way the checks would only happen on area reload, and thus no lag.

Re: Orchard alts?

PostPosted: Sat Apr 15, 2017 10:24 pm
by Chrumps
I think the issue here is with a number of extra variables / timers.
In another thread I have suggested similar solution but with one timer for the entire minimap.