Jump to content

Triggered Day and Night Cycle


Recommended Posts

I've looked though the components but I'm not sure if it is possible to access the global lighting from component for use in a trigger. I think it would be neat to experiment with a day and night cycle that changed the global lighting options (sun angle, color, etc) and also increased and lowered building and unit line of sight to correspond to the time of day.

Is this possible?

  • Like 4
Link to comment
Share on other sites

On 8/1/2017 at 3:40 PM, leper said:

Not without changes to both the simulation (to enable it to set the light environment; currently it doesn't even know that there is one) and the renderer.

Do we want to keep them separate? (There might be a reason to hide rendering from the simulation.) If not, is this a difficult thing to add?

Link to comment
Share on other sites

We'd need a new simulation component to keep track of the environment variables that we want to control, equal to the CCmpWaterManager.cpp that updates the renderer. Not too hard to accomplish, limited context. Still would need someone willing to do it. We should also flesh out the use case beforehand. We could have different, fine-tuned sun angles for each map, or we could have a complete day & night cycle independent ot the chosen map.

  • Like 1
Link to comment
Share on other sites

4 hours ago, elexis said:

We'd need a new simulation component to keep track of the environment variables that we want to control, equal to the CCmpWaterManager.cpp that updates the renderer. Not too hard to accomplish, limited context. Still would need someone willing to do it. We should also flesh out the use case beforehand. We could have different, fine-tuned sun angles for each map, or we could have a complete day & night cycle independent ot the chosen map.

Agree, we should have a component for these goals. It'd be really useful.

About the day & night cycle at all: I think it's interesting and looks nice, but sometimes someone may want only night maps, sometimes only day maps and sometimes mixed maps. Won't it be unrealistic, that we have different day cycles with the same game speed? I think it's better to have the day & night change in cutscenes, between campaign missions, but in-game it may look weird.

  • Like 2
Link to comment
Share on other sites

2 hours ago, vladislavbelov said:

Agree, we should have a component for these goals. It'd be really useful.

About the day & night cycle at all: I think it's interesting and looks nice, but sometimes someone may want only night maps, sometimes only day maps and sometimes mixed maps. Won't it be unrealistic, that we have different day cycles with the same game speed? I think it's better to have the day & night change in cutscenes, between campaign missions, but in-game it may look weird.

Still if we can have a trigger to raise water height we can have one that prevents light from changing. It could change for instance in random maps, and stay the same in scenarios and skirmishes.

Would be nice to analyze how it was done in games like AOM;

Edited by stanislas69
Link to comment
Share on other sites

I assumed it would be a feature provided by a trigger script. Only certain maps would have it. (It would be easy to add since I think multiple scripts are allowed for a map.) I think it could be nice to make it a game option, but that would be more involved and take more planning. For gameplay purposes, I wanted the unit and building LoS to increase or decrease depending on the time of day. It would allow night time raids because all players viewable range would be diminished, but it wouldn't look right without changing the lighting.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...