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
S
1
G
4
Posts: 57
Reputation: 1,314

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
402
S
238
G
89
Posts: 24,630
Reputation: 196,027

Post » Tue Jul 15, 2008 3:49 pm

Looks great! Although I only get 17 FPS out of it :(
Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
127
S
43
G
18
Posts: 2,240
Reputation: 20,592

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 Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
127
S
43
G
18
Posts: 2,240
Reputation: 20,592


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests