Day/Night Cycle

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

User avatar
betawave
Engineer
Engineer
Posts: 11
Joined: 21 Dec 2010 09:41

Day/Night Cycle

Post by betawave »

I am aware of the fact, that there is a .grf, which converts all graphics into night mode. Still, in my opinion, is quite limited, can not be used along-side with other .grf files.

So, I was wondering that, is there a possibility to make it even more realistic, have the days pass a bit slower, than before, therefor could be a cycle of days and nights as well. Of course this means a lot of graphical and programming work, but i think, not only me would there be volunteering to help in.

Cheers.
bw-chx, 87:6 psalm
Arie-
Director
Director
Posts: 593
Joined: 20 Jan 2009 16:07

Re: Day/Night Cycle

Post by Arie- »

Take a look in the development forum, a date/time adjustment patch is difficult enough, not even considered adding day night cycles. Furthermore also all graphics have to be drawn twice.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Day/Night Cycle

Post by Zuu »

Regarding the night cycle, isn't it possible to just darken the 8bit palette in the night?
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
Lordmwa
President
President
Posts: 899
Joined: 20 May 2006 19:30
Location: West Sussex, England

Re: Day/Night Cycle

Post by Lordmwa »

Also you would need to lighten lights and get them to cast a glow
The TT forums trivia tournament! Come along and join in the fun
http://www.funtrivia.com/private/main.cfm?tid=90722
User avatar
Rigil
Engineer
Engineer
Posts: 19
Joined: 10 Oct 2008 16:09
Location: FRANCE

Re: Day/Night Cycle

Post by Rigil »

Inspiration could come from modified screenshots.
Just found this one in Isa's thread :

Image
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5705
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: Day/Night Cycle

Post by andythenorth »

Sounds simple, but wouldn't be.

Dark is easy enough - shift the palette. "Just" needs someone to write a transform for all the colours that runs in an optimised way but doesn't also darken the GUI.

The lights would be difficult. Original and newgrf sprites don't use consistent colours for windows, and vehicle lights (and many sets don't have any pixels for vehicle lights).

So lights would only work if there was a consistent standard across sprites. And that horse has probably already bolted :P
User avatar
Simons Mith
Transport Coordinator
Transport Coordinator
Posts: 326
Joined: 14 Jan 2010 23:45

Re: Day/Night Cycle

Post by Simons Mith »

Given OTTD's timescale, I'd rather have seasons and weather first anyway. And I suspect that horse too is already halfway over the horizon by now...
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: Day/Night Cycle

Post by SirkoZ »

Beautiful screenshot though, all those little lights.
User avatar
prissi
Chief Executive
Chief Executive
Posts: 648
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Re: Day/Night Cycle

Post by prissi »

A simple darkeing, based on palette is easily done (and was done before): http://www.tt-forums.net/viewtopic.php?f=33&t=15487

Should be even easier now with 32 blitter excluding GUI areas.
I like to look at great maps and see how things flow. A little like a finished model railway, but it is evolving and actually never finished. http://www.simutrans.com
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Day/Night Cycle

Post by Eddi »

the key element of a night view is not making the objects darker, but making the lights shine. which is quite a bit harder than just a palette change.
User avatar
Muzzly
Traffic Manager
Traffic Manager
Posts: 227
Joined: 09 Jun 2010 20:54
Location: Vilnius, LT

Re: Day/Night Cycle

Post by Muzzly »

Would it be not simple to add new specification to newgrf where each sprite should have 4 levels:
1. day ( default )
2. evening ( sun light from west )
3. night ( dark , street light spots )
4. morning ( sun light from east )
User avatar
Chris
Tycoon
Tycoon
Posts: 1985
Joined: 05 Oct 2009 16:36
Location: Leeds, UK

Re: Day/Night Cycle

Post by Chris »

Muzzly wrote:Would it be not simple to add new specification to newgrf where each sprite should have 4 levels:
1. day ( default )
2. evening ( sun light from west )
3. night ( dark , street light spots )
4. morning ( sun light from east )
In which case you would have to draw an extra 3 sprites, and code these into the set so that they are compatible with a patch which would provide day/nights, as well as adding lights, which as discussed previously in the thread would be very difficult. So basically vastly increasing the amount of work that people would have to do on a grf. Little gain in the game for a lot more work.
Screenshots

Formerly Class 165
User avatar
Muzzly
Traffic Manager
Traffic Manager
Posts: 227
Joined: 09 Jun 2010 20:54
Location: Vilnius, LT

Re: Day/Night Cycle

Post by Muzzly »

Class 165 wrote:In which case you would have to draw an extra 3 sprites
No. The simplest, but not the best way would be just to recolor existing sprites. IMO it's not so much work as redrawing them from scratch.[/quote]
Class 165 wrote:and code these into the set so that they are compatible with a patch which would provide day/nights, as well as adding lights, which as discussed previously in the thread would be very difficult.
Maybe, but I am do not think so.
User avatar
Chris
Tycoon
Tycoon
Posts: 1985
Joined: 05 Oct 2009 16:36
Location: Leeds, UK

Re: Day/Night Cycle

Post by Chris »

Muzzly wrote:No. The simplest, but not the best way would be just to recolor existing sprites. IMO it's not so much work as redrawing them from scratch.
Obviously a whole new sprite would not have to be drawn, but it would still be a lot of effort to recolour all of the sprites in a set, such as the 2cc set, and you don't gain much from having a night instead of a permanent day apart from the look (as the passenger numbers would be the same etc.).
Screenshots

Formerly Class 165
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Day/Night Cycle

Post by Eddi »

Muzzly wrote:
Class 165 wrote:In which case you would have to draw an extra 3 sprites
No. The simplest, but not the best way would be just to recolor existing sprites. IMO it's not so much work as redrawing them from scratch.
the flaw in that logic is that you cannot modify existing sprites, you are not licensed to do so. and even if you can do it for yourself, you may not distribute the results.
User avatar
supermop
Tycoon
Tycoon
Posts: 1104
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: Day/Night Cycle

Post by supermop »

Although, anyone with enough ambition and dedication could modify OGFX to create a complete set of day and night sprites to use with a patched game and no additional NewGRFs.

Anyone who felt strongly enough to write a working patch to accomplish this would probably feel up to at least trying to draw the sprites, whether or not it turned out to be a practical endeavor.

Trying to convince other people to modify their grfs, or do the drawing for you (or the coding) will likely be less successful.

I am perfectly happy playing in permanent daylight - I would rather have fluctuating passenger numbers than fluctuating light levels. That said, if someone wrote a good working patch, and provided the requisite graphics, I would make a good faith effort to redraw some of my sprites.
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Day/Night Cycle

Post by Eddi »

i love your reasoning. "everyone who is even attempting $BIG_TASK clearly must also be willing/able to do $EVEN_BIGGER_TASK"
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Day/Night Cycle

Post by Rubidium »

Given 32bpp graphics are asked for almost continuously, maybe you start with creating those. OpenTTD even supports 32bpp graphics out of the box, yet no-one has even come close to a complete set of 32bpp graphics.

Even with the zoom patch creating a 32bpp set would be less work as you can simply reduce the sprite size to get smaller sprites. You don't need to fiddle with the pixels 4 times per image to get the orientation of the light right; actually, the light already comes from one side so that at least has some trouble. Undoubtedly they also want lights to go (randomly-ish) off and one again, so you need 4 extra sets of graphics in vastly different colourings.

So unless you (= someone/anyone really interested in this feature) dedicate many months drawing the required sprites, my feeling is that such a feature is going nowhere. Basically staying with the chicken-egg problem for eternity; nobody draws as nothing is coded and nobody codes as nothing is drawn.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4766
Joined: 09 Sep 2007 05:03
Location: home

Re: Day/Night Cycle

Post by Alberth »

How fast do you want the day/night cycle to be?
A day takes 2.something seconds, so 1 second light, and 1 second dark?

Imo that would make the game completely unplayable.
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: Yahoo [Bot] and 52 guests