:::: MENU ::::

Life Sim Devblog #2: Seasons, Weather and Climate

Weather

It’s been forever since I worked with particles. But, here it is! So far I have rain and snow. I am still working on storms, hail, wind and any other weather events I can think of πŸ™‚

Rain

The rain and sound effects slow to a stop.
Download this on Marketplace

Snow

The snow will accumulate on the ground, and then slowly melt over time. I still need to link this up with the climate so that it only melts when the temperate is above 32F.
Download this on Marketplace

Climate

A lot went into that little temperature number! Basically, every day at 8:00AM a script is ran that considers the month and season, and then comes up with the high and low temperature of that day. It also has a chance of rain. There’s also a chance of RARE weather which causes extreme temperatures. For example, in the month of March there’s a 4% chance that on any given day that the temperatures will drop to an extreme low. Then, there’s a random chance that it may snow on that same day.

Actually, there’s a chance it may snow ANY time the temperatures fall below 32F.

Also, the temperature drops after 11PM at night. Still working on the system, but I’m getting pretty happy with it.

What I’ll need to work on next is making the game recognize enclosed spaces like the players home, and then have a way to affect the temperature of the different rooms so the player doesn’t freeze to death πŸ™‚

Seasons

I worked on this Monday at Panera Bread! Plant life will cycle through its life cycle based on when it was planted, and what season it is. The ground also changes based on the time of year.

Ground Changing: Layer Transparency

So, GameMaker Studio 2 does not have a way to set the alpha of an entire layer (What gives, YYG?). So, this can only be accomplished through shaders. Thankfully, it’s one of the easiest shaders to make. However, when you’ve NEVER worked with shaders, it’s a pretty annoying obstacle. So basically I made a shader that allows you to set the transparency of an entire layer.

I then have TWO layers “layer_ground” and “layer_ground_next”. So the month before a new season, every day the variable that sets the transparency lowers. So layer_ground slowly becomes invisible, so you can see layer_ground_next. Once that variable reaches 0, layer_ground becomes the same value as layer_ground_next, and layer_ground_next becomes the ground for the NEXT season. Then I reset the transparency variable. πŸ™‚

If you want this shader, I did the work for and you can grab it on the marketplace. However, as I said, it’s actually an easy thing to make yourself if you want to challenge yourself to learn. But, I totally would have bought this to save me the 2 hours!
Download this on Marketplace

Room Detection

This was a big one. If you’ve been following me on Twitter, you’ve seen lots of post about this. In fact, I even made a Youtube Video about it. Though the video does a good job explaining what’s going on, I rewrote most of the code after making that video.

Basically, what room detection allows me to do is store a unique ID for each room. With that, I can name rooms, set the temperature/climate of each room, detect what items are in each room, know if a room is ‘messy’ or ‘clean’. And lots more!

Here’s what it looks like so far in game (the bottom right tells you what room your mouse is over):

From here, I need to add the ability to change the temperature of rooms, then add heating and air, then make players react to extreme temperatures.

Download this on Marketplace

Room Temperatures

I went ahead and separated room temperatures from outside temperatures. Next is to program air conditioning and heating.

Marketplace and Patreon

Marketplace

To fund the odds and ends of this project, I’m throwing things I’ve made on the game on the Marketplace. I’ve mainly been buying other things in the marketplace, or sound effects and sprite sets. I also would like to hire some artists later on to help with some graphic work. Any support is HIGHLY appreciated!
Check out my Marketplace

Patreon

For those who support me on Patreon, you get access to everything I’m putting on the marketplace for free as a thank you for your support!
Check out my Patreon

Special Thanks

Thank you KaiSch for becoming one of my Patrons!


So, what do you think ?