Day and Night

Patch definition has light level in it.

1 Like

I’ve tested what’s on the branch so far and it’s very cool. I think the total cycle length is maybe too short, and I think the transition periods are way too quick. Would be better if they were more gradual.

This looks like a pretty clear result to me I’m afraid @Maxonovien.

1 Like

No need to deepen the wound haha.

More seriously, I still think there are ways to get the best of both worlds, but nothing prevents going along with the majority (quasi-unanimity, even) right now and see how players react to it. I think day/night cycle is a great addition anyways.

I might perhaps try my hand at a fleshed out proposal later on so that people can judge on piece, but that’s nowhere near a priority. It will always be time to reopen these discussions when we’ll have to deal with senses (and that won’t be before some time, probably).


I do think it warrants more discussion and thought, because I agree with you that it’s kicking the senses question down the road. But right now it makes much more sense to stick with the simpler option. I’ll look forward to your expanded concept.

Played around with it for about 10 minutes and really liked the changes. I really liked seeing the visual change of lighting.

Only thing was that I felt like the transitions happened too quickly. You go from dark to light in 5-ish seconds. I would slow that down to 20-30 seconds.

Other than that one point it all looks and plays well for me.

constantly tweaking transitions and the length of different states is why a state machine is nice.

I’ll implement something tomorrow.

Did you notice how I managed to make twilight orange? I wanna make it based on the wavelength of the star in the future.

1 Like

Yes that twilight colour I really liked.

One thing that did stand out to me is that the cells and compound clouds don’t change colour based on the lighting. Before it was less noticeable, but now you notice it more during dawn and dusk since the light level is actively changing. But I think there’s nothing we can do about that in the Day/Night PR.

I can implement that, I already did actually. I just didn’t push those changes because, they are not acceptable to me right now. If you look at an old screenshot I took with the purple cell, the lighting is totally different than normal

Oooh okay yeah I would be interested in testing that when you get a chance to implement it!

What about implementing that by changing the colour of the sunlight directional light in the scene?

it doesn’t work for some reason. Probably something to do with ambient lighting that I don’t feel like fooling with.

It doesn’t help the membranes have botched UVs so the seam every cell has, especially those with cell walls, have lots of visual glitches.

1 Like

Fair enough, though I kind of hope we can solve the lighting problems in the microbe stage at some point as that would make the whole thing a lot simpler (and bioluminescense kind of requires normal lights to work).


Good idea was brought up on discord by Kasterisk, thought I’d re-post so it doesn’t get lost to the void.

“PatchMap should hold all of the day night cycle information, the current time of day, etc. It applies light intensity to every patches accordingly through their BiomeConditions. PatchManager ticks (updates) those properties in some public method, accessing GameWorld in doing so. And finally, MicrobeStage calls this method every frame. Let me know what you guys think of this approach”

1 Like

My “counter” points from discord as well:

This is the best idea presented so far, and pretty close to what I would have suggested.
The updating of the day/night system (as I said before), I’d put in the microbe stage class and make it for example so that it updates the biome data once per second, and applies the background image tint to the camera each frame. That way systems that really shouldn’t need to be made more complex don’t need to know at all.

And yeah, I really think all of the process system etc. stuff should not be updated to know about the time of day because if we change the system or add more similar systems we’ll just increase and increase the complexity there. Instead if we go the route of having a separate component just modify the biomes in patches on the fly (they were meant to be modified dynamically in the first place) we can keep the systems that read the biome data nice and clean, they won’t even know what changed the values


Following a discussion on Discord, a poll:

Should the day/night cycle be enabled or disabled in new game settings by default?
  • Enabled
  • Disabled

0 voters

This would literally be a two-line change either way (line 112 in WorldGenerationSettings.cs and a new line under line 956 in NewGameSettings.tscn to be precise). So we could wait until we have feedback from the release candidate to see what people complain about more. But I think it would be helpful to collate the devs’ opinion first.

I’ll say that it should remain disabled until balance changes are made. After that, I say enabled.

Just in case they somehow don’t make this relese.


You guys who voted enabled better be available for very serious balancing before the 26th (the planned RC). If the feature is not enabled by default in the RC I won’t allow it to be enabled for the full release as then it definitely won’t have gotten enough testing.

Also someone needs to let me know once people are no longer making major changes to the code for the feature so that I can start reviewing it, which really should happen this week to give enough time for fixes. That’s because I probably won’t notice myself when the day/night is in shape as I’ve gotten so many emails about small fixes on it.

I’m reminded about this thanks to the PU, so I’ll share the latest status here.

The situation is that the day/night cycle has a ton of corner cases that have not been thought through yet. With the code fixing taking some time still, I’m kind of starting to think that there is simply not enough time to get the day/night cycle fixed well enough that there isn’t a large risk of almost entirely breaking the game balance for a lot of different playstyles. Due to me being the person who’s everywhere on the community forums, steam forums, discord reading feedback, I don’t want to be barraged with comments about the latest update ruining the balance. So unless there’s enough time to polish the feature, I really, really don’t want it to be enabled by default.

Here’s some of the problems that are currently known / things that probably affect the balance but aren’t addressed fully:

  • “I haven’t tested this with the Multicellular Stage (both early and late) at all, so someone needs to do that.” (this one is quoted from @Oliveriver )
  • process panel freezing? Does it freeze entirely? That sounds like a pretty major regression.
  • TODO comment regarding caching
  • Editor charts no longer always working, another big regression
  • Unnecessary performance impact of applying light changes constantly (If I understood right, there’s no reason to apply the light level 360 times per second)
  • Shouldn’t cells that spawn just a bit before the night have their spawn compounds adjusted so that they survive the night?
  • Shouldn’t the AI be updated to know to stay more sessile during the night / update auto-evo to take sessility into account when determining if a species will survive or die constantly.
  • Does going to the editor reset the time of day? (this was discussed on Discord, and the conclusion was that it can be left as-is, ie. it doesn’t)
  • Does the editor properly show the player some kind of storage warning if they can’t survive the night?
  • Is there a tutorial somewhere about the day/night system?

You can read the comments and check the review progress on there:


I should mention that I did test the feature in multicellular and it seemed to work perfectly fine.

Granted, there’s been lots of changes since then I think, so it’s probably a good idea to test it again, at least when everything is closer to being finalized.

1 Like