Example: Simple Day & Night System

Post your own tutorials, guides and demos.

Post » Tue Jul 15, 2008 2:43 am

Simple Fade tricks can make quite the magical day/night implementations :D



Features:
- A day/night cycle of 1 minute 20 seconds!
- Lamp that turns on and off with the cycle!
- Some buildings around to showcase the effect! [size=60:80z03rbj](please do not use these sprites in own projects)[/size:80z03rbj]
- Particle smokestack for no apparent reason!

Protip: Combine with weather effects like rain and grey backgrounds to make neat thunderstorm effects!

[attachment=0:80z03rbj]daynight.cap[/attachment:80z03rbj]
B
4
S
2
G
6
Posts: 50
Reputation: 1,690

Post » Tue Jul 15, 2008 3:01 am

Nicely done! Thanks for sharing :)
B
2
G
4
Posts: 57
Reputation: 1,164

Post » Tue Jul 15, 2008 8:57 am

Would be awesome if you added an orange glow and stars!
B
6
S
1
G
4
Posts: 66
Reputation: 1,532

Post » Tue Jul 15, 2008 3:22 pm

Nice use of Fade :)
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528

Post » Tue Jul 15, 2008 3:49 pm

Looks great! Although I only get 17 FPS out of it :(
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Tue Jul 15, 2008 5:22 pm

Thanks for all the replies! Here's the second version of the example, with stars and an unimplemented dawn sky (if you implement it, be sure to post here for all us others to see) - updated the building sprites up a notch (again, don't use in other projects please :) ). Stars have a glow effect. Building glow removed due to it almost halving FPS on older computers!

Edit: Argh, Glow sure is FPS heavy! Here's a hotfix which makes the stars use additive blend instead:
[attachment=0:3id1rq5j]daynight.cap[/attachment:3id1rq5j]
B
4
S
2
G
6
Posts: 50
Reputation: 1,690

Post » Tue Jul 15, 2008 5:44 pm

Much less lag! (70-80 FPS) Thanks for the fix
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest