I'm trying to wrap my head around the "time per game loop" part of the lighting set models.
I currently have a day and night cycle on my map. But I want the day/night to go an exact speed, that is, 30 minutes night, 30 minutes day. So one cycle is 60 minutes.
However, "time per game loop" has counter intuitive logic, that is. if you set 1 hour, it goes insanely fast, if you set 1 second, it goes insanely slow.
How exactly do I time 1 hour into this headache of a field.
Well the "game loop" must be some internal game cycle related to the game speed. Let's say at "Normal" game speed, a game loop takes a second. Thus if you set that field "Time per Game Loop" to 1, you get 1 second of Day/Night Cycle per actual second. Thus it would take 24 actual hours to cycle through your game's day/night cycle. That's why it moves super slow. On the other hand if you set that field to 1 hour, you get 1 hour of Day/Night cycle per second, thus it would take 24 seconds to go through a full cycle.
Now. My default "Time per Game Loop" value is 05. While the above mentioned trigger defaults to 300 seconds. 24 hours / 05 seconds / game loop = 17,280 game loops to achieve a full 24 hours @ 05 seconds per loop. 17,280 game loops / 300 seconds = 57.6 game loops / second. That's just a guess based on potentially faulty reasoning.
But it does seem reasonable, considering some of the timing limitations that others have discovered.
So using that guess you would want 57.6*3600=207,360 game cycles for a 60 minute day/night cycle. Which equates to 0.417 seconds per game loop. As I don't think you can put a value less than 1, you're going to have to also alter the "time per day" value. At 1 second / game loop, you'll need 57.55 hours in the day to get an exactly 60 minute day/night cycle.
...in summary, either my assumption is wrong (potentially this is so) or you should probably lower the amount of time you want in your day/night cycle.
the idea is that the player has 30 minutes to repair and prepare during the day, for a massive wave of horrible nasties at midnight, where the wave continues until dawn.
This would probably be alot easier with triggers wouldn't it?
Yes. But really, a player needs THIRTY minutes of not fighting anything to prepare? That's a -ton- of time. 90% of my diamond melee games don't last over ten or fifteen minutes.
the waves are extreme :P and I have edited the units stats so the game is alot more long winded and siege like. Right now i'm preparing it based on the "vision" but once I have set up the majority of the game for playing there will be mode settings. it's a survival game
Quick match(3 minutes prepare/3 defend)-normal(5/5)-Long(10/10)-Epic(30/30)
I'm working backwards, it's easier for me to balance things from hard > easy
Thanks Xenrathe :)
Sounds good to me, especially the part about multiple lighting schemes, the issue with this one is that it's a gradient from the midnight scheme to the daylight scheme which doesn't allow for awesome lighting like dawn and twighlight.
I love lighting. Right now I'm trying to make a grainy effect with it for all of my campaign's Prequel missions; I also use red flashes and white fadeouts. There's some really sick things you can do. Black & white, for example.
I have to say that I really don't know where this "time per game loop" comes in. I've done several day/night cycles but never used this one (Gameloop https://gamehoy.com/en/)
I'm trying to wrap my head around the "time per game loop" part of the lighting set models.
I currently have a day and night cycle on my map. But I want the day/night to go an exact speed, that is, 30 minutes night, 30 minutes day. So one cycle is 60 minutes.
However, "time per game loop" has counter intuitive logic, that is. if you set 1 hour, it goes insanely fast, if you set 1 second, it goes insanely slow.
How exactly do I time 1 hour into this headache of a field.
Thanks :)
@Rorax: Go
I have to say that I really don't know where this "time per game loop" comes in. I've done several day/night cycles but never used this one.
To set a 60 minute day/night cycle, you just need a single trigger action at map init:
Environment - Set day length to 3600.0 game seconds
this is a data editor only version of a day night cycle xenrathe. I got the info for it from here
@Rorax: Go
Oh I see...
Well the "game loop" must be some internal game cycle related to the game speed. Let's say at "Normal" game speed, a game loop takes a second. Thus if you set that field "Time per Game Loop" to 1, you get 1 second of Day/Night Cycle per actual second. Thus it would take 24 actual hours to cycle through your game's day/night cycle. That's why it moves super slow. On the other hand if you set that field to 1 hour, you get 1 hour of Day/Night cycle per second, thus it would take 24 seconds to go through a full cycle.
Now. My default "Time per Game Loop" value is 05. While the above mentioned trigger defaults to 300 seconds. 24 hours / 05 seconds / game loop = 17,280 game loops to achieve a full 24 hours @ 05 seconds per loop. 17,280 game loops / 300 seconds = 57.6 game loops / second. That's just a guess based on potentially faulty reasoning.
But it does seem reasonable, considering some of the timing limitations that others have discovered.
So using that guess you would want 57.6*3600=207,360 game cycles for a 60 minute day/night cycle. Which equates to 0.417 seconds per game loop. As I don't think you can put a value less than 1, you're going to have to also alter the "time per day" value. At 1 second / game loop, you'll need 57.55 hours in the day to get an exactly 60 minute day/night cycle.
...in summary, either my assumption is wrong (potentially this is so) or you should probably lower the amount of time you want in your day/night cycle.
the idea is that the player has 30 minutes to repair and prepare during the day, for a massive wave of horrible nasties at midnight, where the wave continues until dawn.
This would probably be alot easier with triggers wouldn't it?
@Rorax: Go
Yes. But really, a player needs THIRTY minutes of not fighting anything to prepare? That's a -ton- of time. 90% of my diamond melee games don't last over ten or fifteen minutes.
the waves are extreme :P and I have edited the units stats so the game is alot more long winded and siege like. Right now i'm preparing it based on the "vision" but once I have set up the majority of the game for playing there will be mode settings. it's a survival game Quick match(3 minutes prepare/3 defend)-normal(5/5)-Long(10/10)-Epic(30/30)
I'm working backwards, it's easier for me to balance things from hard > easy
@Rorax: Go
Well then trigger your day/night. How I did my day/night cycle:
@ top of Editor -> Window -> Lighting,
then I create many separate lighting schemes for midnight, 3 am, 6 am, 9 am, noon, 3 pm, 6 pm, 9 pm
then at map init I used:
Environment - Change the light used for ToD Lighting to MY_LIGHT_SET
Environment - Set day length to 160.0 game seconds
in your case you would want to set day length to 3600 game seconds.
Thanks Xenrathe :) Sounds good to me, especially the part about multiple lighting schemes, the issue with this one is that it's a gradient from the midnight scheme to the daylight scheme which doesn't allow for awesome lighting like dawn and twighlight.
@Rorax: Go
yessir!
I love lighting. Right now I'm trying to make a grainy effect with it for all of my campaign's Prequel missions; I also use red flashes and white fadeouts. There's some really sick things you can do. Black & white, for example.
I have to say that I really don't know where this "time per game loop" comes in. I've done several day/night cycles but never used this one (Gameloop https://gamehoy.com/en/)