Code center > Suggestions

Weather

(1/1)

spork22:
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.

Botsareus:
I will add an option to randomize the 'sun on' time.

Panda:
That's a good idea. Rather than just on or off, do you think an intensity modifier would be good?

Botsareus:
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.

spork22:
I'm glad you guys like my idea.  :D

Navigation

[0] Message Index

Go to full version