I get all of my ducks in a row…

·

·

,

…and then someone goes and shoots one of them. So I’m not quite ready to put out a build yet, but I nearly am. Nearly, nearly, almost! This coming week, I’m pretty certain. Watch this space!

I’m sorry it’s taking so long. It’s not like I’ve been waiting until I ‘finish’ everything, because it’s all still very experimental and rough, yet, and will be for years. It’s just that this will be the first new build I’ve done for a very long time, in a completely new world, running under a completely new rendering technology, in a completely new major version of Unity, with creatures that have seen a lot of changes but still need a lot more work. So I just needed to get to a point where there was at least some hope of things more or less working on a random, moderate quality games machine, along with with all the user validation stuff functioning, so that long-time backers are automatically able to run the game, and newbies are able to sign up. Making a working build is harder than it sounds – there are so many moving parts, and so much stuff that works just fine in the Unity editor but then falls over when it’s compiled into a standalone executable.

Anyway, while you wait, I’ve been doing some work on the date and time system, today. There’s a bit more to that than you might imagine, so I thought I’d tell you a little about the way I’ve designed it to work.

Time in simulation games is always a thorny topic. I’m a big flight simulator fan, and when I get a chance to play at all, I usually play in real time, since then I get live weather and share the skies with other people who are experiencing the same thing as me. But I like to fly in Europe, which is kind of awkward, since nowadays I live in the US, and it’s usually dark in Europe by the time I have some free time here. Of course, because weather and daylight are such a big deal in aviation, I do have the opportunity to change to any time of day and any weather. But then it means I’m flying in different conditions from everyone else, even if we’re all trying to land at the same airport, in winds coming from opposite directions. You see the problem? Time waits for no man, but it doesn’t always flow at the speed we’d like it to!

In a game like this one, things would get pretty boring if the seasons changed at the same rate and at the same time as those outside the window. Not to mention the problem that when it’s Summer in England (assuming England has a Summer), it’s Winter in Sydney. And if clock time elapsed at the normal rate, then it would be dark every other time you play the game, on average. Potentially every time, if you regularly tend to play games during the evenings.

So we clearly need some form of accelerated time. But I think it would also be really cool if it’s basically deterministic, so that everyone experiences the same weather and seasons at approximately the same time. That way, people can ask their friends how their creatures got on in yesterday’s snowstorm. And we can have Christmas decorations in the village, or summer fetes, at the same time, even if it’s not actually Christmas or Summer in real life.

So anyway, here’s the way I’ve set it up to work. Let me know what you think:

I’ve set game time to run at a rate of one game-hour per minute of real time, during the day, and somewhat faster than that between sunset and sunrise, so that nobody has to sit there and watch their creatures sleep for ages. This feels okay-ish, to me, but it may be too fast – I only tend to play for a few minutes at a time in order to test my code, so I don’t have a feel for it yet. It’s easy to change.

Either way, this is asynchronous time. The very first time you enter the world, it will be late morning, and then time will run along at an hour per minute. But if you quit the game when your creatures are fast asleep, they’ll still be asleep, and still in the dark, next time you come back. Time just stops while we’re not there. This is actually quite important, because obviously the creatures’ brains and biochemistry can’t run when the game isn’t loaded, so if the time of day changed while the game isn’t running, the poor things would get confused. They’d be hungry in the middle of the night, and sleepy in the middle of the day (just like me, come to think of it).

The date, on the other hand, I’ve made deterministic. It may be a somewhat different time of day in my world than it is in yours, but the actual date will be the same for both of us (give or take a day), and hence, so will the weather and the season.

I’ve currently accelerated time by a factor of 12x, such that roughly one month of real time amounts to one year inside the game world. Unlike the time of day, if we play once and see that it’s Winter in Frampton Gurney, but then we don’t play again for another week or two, the seasons will have moved on while we weren’t looking. However, they’ll have moved on in just the same way for everybody. If it’s Summer inside my copy of the game, it will be Summer where you are too.

The exception to this would be if you run the game for a long period without quitting. Now, the day will simply change every time the clock on the church tower strikes midnight, as you would expect. And the seasons will move on accordingly, even if this means it turns to winter inside your game, while everybody else thinks it’s still Summer. This makes sense, for example, if someone wants to do a wolfling run for a whole week without shutting anything down. Day will follow night, and the seasons will still change with the days. 30 days hath September, and all that. But it also makes sense if you just play for a few minutes and then come back a week or more later – time will appear to have passed while the game was shut down, and your seasons will still match everybody else’s. You might have left during the late Winter, but now it’s starting to be Spring and the flowers are coming out. Meanwhile, the time of day will have remained frozen, so creatures who were getting ready for bed last time you played, will still find that it’s getting dark the next time.

The time of day controls the Sun, obviously, and the time of year controls the seasons. But the latter also determines the weather. I’ve built a moderately realistic weather model into the system (which I’ll talk about another time), so that we will all get the same weather at roughly the same time. If there’s a thunderstorm in my world, you will have a thunderstorm too, even if mine occurred at dawn, while yours happened while it was still dark.

This all sounds a bit complicated, now that I try to write it down, but I think it’s the approach that makes the most sense for the most people, in the most places, and for the most play styles. It also makes the most sense for the creatures, which is important in a simulation like this.

Assuming I get a build out by the end of next week, you’ll find that it’s currently mid to late Summer in Frampton Gurney! Specifically, Friday 17th of January here, will be the 28th of July in Frampton. If you don’t run the game until a week later, though, the village will be heading into winter, the trees will be losing their leaves, and the mushrooms will be dying back. So in that case, Merry Christmas!

I don’t actually know what the weather will be like, because I haven’t run the forecast to see what’s coming, but hopefully it will work out okay.


4.7 3 votes
Article Rating
Subscribe
Notify of
24 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Mabus
Mabus
5 days ago

Yeah I know that feeling, some will always stray away. When you got them lined up, some split off. One likes to sit outside of the stream, luckily she was inside today.

And once you try to make a photo, they see that you got something in the hand and try to move very fast, in case it is delicious….

I only get them in a row in the morning, when they run into the stream… Maybe once a month, by coincidence

comment image

Oh and about day and night, are they the same in summer and winter? Because it is a hassle to get my ducks out of the stream in the winter. They want to stay beyond sundown….

Last edited 5 days ago by Mabus
Wraith_of_time
Wraith_of_time
3 days ago

So cool! Can’t wait. Will there be creatures that are active during night?

Midnight
Midnight
2 days ago

Regarding the cable car model, unfortunately I ended up losing the inspiration I had at the time, and then promptly got waylaid by an unrelated hyperfixation. If you think it would be helpful, I can send you the .blend file for what I have (mostly just the low-poly model). Though, I suspect you’ve probably made something of your own at this point, given it’s been like… a month, I think?

Zach the Cat Guy
Zach the Cat Guy
1 day ago

Don’t let one duck of your row spill onto my property next time, then. The sign clearly says, “TREPASSERS WILL BE SHOT”.

Robowaifu Technician
Robowaifu Technician
20 hours ago

I recently played through the game Digimon World, which I had as a kid, but never beat before. It was a really weird game (for a lot of reasons) based on a toy that’s basically the same thing as a Tamagotchi, which have a real-time clock. But in the Playstation game time also normally passed at a rate of 1 game-hour per minute of real time, while some things, like talking to a character or bringing up the inventory stops time, & things like sleeping causes time to skip ahead. There were 30 days in a year, no seasons, part of the island is in perpetual winter, a place with constant fog, a place where time runs twice as fast as normal, & a place right next to it where time runs half as fast. Very early the game acknowledges that the passage of time is weird & it’s actually a plot point, but the game was also something of an RPG with a final boss. A more cozy, leisurely game benefits from a slower pace. I don’t know what lore you’re planning for Frampton Gurney, but like a zoo I wouldn’t mind if there were restricted open hours. I also wouldn’t be opposed to leaning into weirdness, but you’ve really got to commit to it.

“This world is not a dream nor is it real. It’s our world.”

Chat Icon Close Icon
24
0
Would love your thoughts, please comment.x
()
x