Demo

Move your mouse left-to-right and back along the scene to see how the color changes for each hour.

About

DayTime is a useful helper for your GameMaker projects that gives you access to dynamic Day/Night cycles! It smoothly blends from one hour to the next, giving you gentle sunrise transitions, warm sunsets, cool moonlit nights, and everything in between.

DayTime also drives handy gameplay hooks so you can react to:

  • Hour changes

  • Time-of-day period changes (day / dusk / night / dawn)

  • Day changes

It uses GameMaker's native Effect Layers with separate strengths for foreground and background elements, making your gameplay elements focused while your world still stays atmospheric.

If you don't want real-time day/night cycles, you can also freeze the cycle at any time you want, easily making your levels take place at night, during the day, or at sunset!

How to Use

DayTime is super easy to put into your game. In an object...

// CREATE Event:

daytime = new DayTime(-100, 100);

// STEP Event:

daytime.update();

That's it! Your game now has a living day/night cycle.

You can set any time you want using

daytime.set_time(23, 45);

You can also adjust the colors, tint, and saturation strengths the day and nighttime!

Documentation

Read about how to use DayTime here.

What's Inside

Included is a .yymp that's easily imported into GameMaker. It's got a couple of assets and that's all you need. It's well commented, too!

Requirements

  • GameMaker 2.3+ (It uses structs/constructors)

How to Install

First, open your GameMaker project and go to Tools > Import Local Package and find the DayTime.yymp file. Then, add the folder to your project!

To get started immediately, drag the obj_daytime object from the Example asset into any room. By default, your foreground will be anything at depths -5000 to 1, and everything at depth 1 and deeper will be the background.


Purchase

Buy Now$5.00 USD or more

In order to download this asset pack you must purchase it at or above the minimum price of $5 USD. You will get access to the following files:

DayTime.yymps 13 kB

Leave a comment

Log in with itch.io to leave a comment.