Darwinbots Forum
Code center => Suggestions => Topic started by: spork22 on July 12, 2014, 02:55:55 PM
-
Perhaps there could be an option that when activated makes the sun turn on and off randomly in no predetermined order. Because of the random times of darkness, plants wouldn't get their energy as much. This would discourage zerobots to evolve chloroplasts, as they aren't a constant source of energy anymore.
-
I will add an option to randomize the 'sun on' time.
-
That's a good idea. Rather than just on or off, do you think an intensity modifier would be good?
-
Here is what I was thinking.
Put a very simple boolean in, call it "sunonrnd"
The code mod is as follows:
If SimOpts.DayNight And Not OverrideDayNight Then
'Well, we are neither above nor below the thresholds or we arn't using thresholds so lets see if it's time to rise and shine
SimOpts.DayNightCycleCounter = SimOpts.DayNightCycleCounter + 1
If SimOpts.DayNightCycleCounter > SimOpts.CycleLength Then
SimOpts.Daytime = Not SimOpts.Daytime
SimOpts.DayNightCycleCounter = IIF(sunonrnd, SimOpts.CycleLength * rnd, 0)
End If
If SimOpts.Daytime Then
FeedThisCycle = True
Else
FeedThisCycle = False
End If
End If
And that is the least pain in the a** way to implement this thing.
edit: I am thinking just mod it further to randomize only the 'on' cycles while leaving the 'off' cycles at 0.
-
I'm glad you guys like my idea. :D