Simple Day/Night Cycle Libgdx

Hello, this is my first post on here and sadly it has to be a question. I’ve been searching the site for an explanation on how this would be done but I have yet to find something that I could understand so I thought I would ask for a little assistance. I’m working on a side-scrolling game and I have been trying to find an effective way to implement a day/night cycle. I’m new at libgdx but I am using this project to work on it some more, so please try to go easy on my brain. If more information is needed I will be keeping an eye on this because I’m not totally sure what all I would need to post. Thanks anyone who could possibly help with this!

What exactly is wrong? Just have a time variable that is constantly increasing and then (if you have it) change your lighting depending on the time of day.

I normally keep a float in level class for time [0, 1]. 0 would be night and 1 is day. Then I calculate the current value with a sine curve (There’s probably different ways).
After that you can use this value to position the sun sprite and stuff like that. If you’re using LibGDX you can use it with sprite batch as a tint color, which would make nights dark and days bright.

i think there is a simple way.
You can create a image, like 1x1px, 1 pixel darker and i pixel lighter, and apply this texture to a prite with linear filter. in this case you create a gray like sky.
After that you can color the sky by .setColor of the sprite an so you have a different sky in different time of a day.
If you want animate it you can simple use Tween manager for animation, and set the color of the sprite to animate, so you don’t have to calculate the phase of the day, but only create a repeatyoyo loop animation that pass from day to night and viceversa.
I hope my explanation is pretty simple to understand ;D