Hives should work on fruit trees

Thoughts on the further development of Haven & Hearth? Feel free to opine!

Re: Hives should work on fruit trees

Postby sabinati » Fri Mar 19, 2010 4:09 am

loftar wrote:Maybe the beehives themselves could cause decay hits on nearby trees, though.


yeah
User avatar
sabinati
 
Posts: 15513
Joined: Mon Jul 13, 2009 4:25 am
Location: View active topics

Re: Hives should work on fruit trees

Postby ImpalerWrG » Fri Mar 19, 2010 4:13 am

loftar wrote:The real reason why trees regenerate on decay hits rather than on a timer is because it allows me to save a ton of resources on the server, so I'm not too keen about changing that. Maybe the beehives themselves could cause decay hits on nearby trees, though.


I suspected as much but it's still a poor method for controlling it, if the hives cause decay hits they would need to be special trees specific decay hits or else the hive with literally cause disintegration of walls (can you imagine breaking through a wall by putting a dozen beehives next to it), and now your code is starting to get snarled and ugly with special cases.

Perhaps you should look to improving the object-timer code. If your looping over all objects and repeatedly incrementing or decrementing values ever tick I'd suggest moving to a model in which every time an object needs to start timing something it registers itself with a central manager which sorts objects by their desired wait time and each tick calls update functions only on objects that have had reached the elapsed time. It would probably be comparable to your current implementation and would feel a lot more natural for the player.
ImpalerWrG
 
Posts: 470
Joined: Tue Feb 02, 2010 10:17 am

Re: Hives should work on fruit trees

Postby loftar » Fri Mar 19, 2010 5:06 pm

ImpalerWrG wrote:I suspected as much but it's still a poor method for controlling it, if the hives cause decay hits they would need to be special trees specific decay hits or else the hive with literally cause disintegration of walls (can you imagine breaking through a wall by putting a dozen beehives next to it), and now your code is starting to get snarled and ugly with special cases.

Obviously, I meant that they would trigger the regeneration of trees in a way similar to decay hits -- not actually cause decay around themselves. :)

And you need not worry for my sake -- it wouldn't require any special cases. :)

ImpalerWrG wrote:If your looping over all objects and repeatedly incrementing or decrementing values[...]

God no. That would, obviously, not work. It's just that a timer requires more memory if it exists than if it doesn't. And in the current implementation of trees, it doesn't exist (and the trees, because of their numbers, are implemented in such a memory-efficient way that a timer would add quite a noticeable overhead in terms of bytes allocated).
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: Hives should work on fruit trees

Postby g1real » Sat Mar 20, 2010 4:17 am

What about something that ticks every 5 minutes, checks all trees in the world for a value, and adds 1 whenever it isnt something higher then 6?
loftar: The inner chaos of the Jorbian mind is hard to conceal. :)
jorb: It's called creative license. You know, that thing you seem to want to apply to logic, grammar and coherence? :)
User avatar
g1real
 
Posts: 881
Joined: Sun Aug 09, 2009 10:30 am
Location: You are now breathing manually.

Re: Hives should work on fruit trees

Postby sabinati » Sat Mar 20, 2010 5:19 am

yeah that would totally not kill the server there's only like a billion trees
User avatar
sabinati
 
Posts: 15513
Joined: Mon Jul 13, 2009 4:25 am
Location: View active topics

Re: Hives should work on fruit trees

Postby Pacho » Sat Mar 20, 2010 6:42 am

yeah, that's a pretty terrible way to go about it. It would be more sensible to go through the beehives instead, even then, its not very efficient.
Pacho
 
Posts: 712
Joined: Wed Jun 10, 2009 2:21 am

Re: Hives should work on fruit trees

Postby sabinati » Sat Mar 20, 2010 6:58 am

shouldn't be much more load than what's already happening with every beehive and crop already
User avatar
sabinati
 
Posts: 15513
Joined: Mon Jul 13, 2009 4:25 am
Location: View active topics

Re: Hives should work on fruit trees

Postby Ferinex » Thu Mar 25, 2010 3:38 pm

it's something like 4.3 million trees if we did the math right on irc and if I'm remembering the right number
i guess they never miss huh
User avatar
Ferinex
 
Posts: 1040
Joined: Sun May 31, 2009 9:05 am
Location: Miami

Re: Hives should work on fruit trees

Postby sabinati » Thu Mar 25, 2010 4:52 pm

and how did you arrive at that figure
User avatar
sabinati
 
Posts: 15513
Joined: Mon Jul 13, 2009 4:25 am
Location: View active topics

Re: Hives should work on fruit trees

Postby UnrealJake » Thu Mar 25, 2010 7:19 pm

On IRC
Lothaudus wrote:D) Try and get out of the boat and be told YOU NEED SWIMMING TO CROSS DEEP WATER.
User avatar
UnrealJake
 
Posts: 317
Joined: Sat Feb 13, 2010 11:22 am
Location: To your left, no your OTHER left.

PreviousNext

Return to Critique & Ideas

Who is online

Users browsing this forum: Claude [Bot] and 0 guests