Seasons (changing snowline, trees, fields)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
Villem
Tycoon
Tycoon
Posts: 3310
Joined: 28 Aug 2003 09:38

Post by Villem »

Doesn't look like night to me..
User avatar
LKRaider
Transport Coordinator
Transport Coordinator
Posts: 360
Joined: 23 Mar 2005 04:05
Location: Brasil
Contact:

Post by LKRaider »

This is an animation of the cycle. The times are approximate. I measured about 1,5 seconds for each intermediate cycle, and compressed the long cycles (full day/night times) to 5 seconds, just to have an idea.

EDIT: I don't know how to make an attachement show as link instead of the image. If it is too big, I'll remove it.
Attachments
Day-Night Screenshot Animation
Day-Night Screenshot Animation
OpenTTD-Day-Night-Animation.gif (425.75 KiB) Viewed 6780 times
ConductorBob
Director
Director
Posts: 560
Joined: 21 Jun 2004 16:17
Location: Train station 1

Post by ConductorBob »

Does that happen each... day...?
Or like over the course of a month.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

prissi wrote:Ok, here i a diff -u which also corrected the initial color problem. I am not quite sure what you mean by forward, but I swapped both input files.
Diff files have a direction; the one you posted first would create the unpatched version from the patched version. Fortunately, all diff files I've ever seen are easily reversable.
prissi wrote:The if(memcpy()) was always executed, since c*3!=0. The settings are now made in the upper block, where decision about day/night is made.

At a more close analysis the memcpy old_val is useless, since old_val is a write only variable.
Um? What? What's this about a memcpy? The line I asked about is a memcmp.
Hazelrah wrote:Sorry, but it still doesn't have the Index: filename.c that TortoiseSVN needs. DaleStan, any more hints? I used your diff file with no problems.
Probably because I did the diffing with TortiseSVN. Get cygwin, and use its patch utility to apply diffs that TortiseMerge doesn't like.

Here's a TortiseDiff file that matches prissi's latest diff. It appears that Tortise uses a slightly nonstandard patchfile format: the lines

Code: Select all

Index: <filename>
===================================================================
apparently need to appear before each pair of --- and +++ lines.
Attachments
daynight.patch
(3.38 KiB) Downloaded 210 times
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
jvassie
Tycoon
Tycoon
Posts: 3421
Joined: 18 Dec 2002 18:00
Location: High Wycombe, England
Contact:

Post by jvassie »

Yeah,

you could have artic from october-february
and temperate from march-september.

OT/ What is the irc channel for openttd that GoneWacko was talking about?
(British) Modular Stations Set - Thread: | Website:
Swiss Set - Thread: | Website:
Route Map Creator
My Screenshot Thread
Hazelrah
Traffic Manager
Traffic Manager
Posts: 196
Joined: 13 Apr 2005 05:41

Post by Hazelrah »

OT/ What is the irc channel for openttd that GoneWacko was talking about?
#OpenTTD

;)

-Hazelrah
Hazelrah
Traffic Manager
Traffic Manager
Posts: 196
Joined: 13 Apr 2005 05:41

Post by Hazelrah »

DaleStan wrote:Get cygwin, and use its patch utility to apply diffs that TortiseMerge doesn't like.
It appears that Tortise uses a slightly nonstandard patchfile format: the lines

Code: Select all

Index: <filename>
===================================================================
apparently need to appear before each pair of --- and +++ lines.
Hmm, I think it'd be easier to add in the extra couple of lines than install Cygwin for a single patch program. Thanks for the info!

-Hazelrah
User avatar
LKRaider
Transport Coordinator
Transport Coordinator
Posts: 360
Joined: 23 Mar 2005 04:05
Location: Brasil
Contact:

Post by LKRaider »

ConductorBob wrote:Does that happen each... day...?
Or like over the course of a month.
The full day/night periods encompasses several in-game days (as was mentioned on a previous post). I just made them last 5 seconds so you could see it all faster.

The intermediate changes are aproximately as fast as they are shown there (~1.5 secs).
User avatar
lucaspiller
Tycoon
Tycoon
Posts: 1228
Joined: 18 Apr 2004 20:27

Post by lucaspiller »

I have tried the latest patch to see if it works, this time it is better, but still not perfect. The working stuff, is that it is dark (after deleting the config), but now it is eternally dark. Also the water is still pink / purple. :x

Any ideas?
No longer active here, but you can still reach me via email: luca[at]stackednotion[dot]com
User avatar
prissi
Chief Executive
Chief Executive
Posts: 648
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Post by prissi »

Maybe this is some error which DOS graphics? I tested with windows and it did work.

@DaleStan
I think I understood the meaning of the initial memcmp. It was there to increase performance to avoid unneccessary screen updates. I put it in again, but did not note any difference.
Attachments
main_gui.diff
main_gui.c diff
(861 Bytes) Downloaded 208 times
gfx.diff
diff for gfx
(3.68 KiB) Downloaded 220 times
openttd.zip
Windows built
(470.76 KiB) Downloaded 222 times
User avatar
lucaspiller
Tycoon
Tycoon
Posts: 1228
Joined: 18 Apr 2004 20:27

Post by lucaspiller »

Hmmm could be, seems like nobody caters for me and my DOS graphics. :cry:

I will get some Windows ones tommorow and give it a go....
No longer active here, but you can still reach me via email: luca[at]stackednotion[dot]com
User avatar
prissi
Chief Executive
Chief Executive
Posts: 648
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Post by prissi »

It should also work with DOS graphics. If not, I broke something. Well, I will get some DOS graphics.
User avatar
prissi
Chief Executive
Chief Executive
Posts: 648
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Post by prissi »

New version containing seasons for temperate.
No full support for trees (please ask a guru for that.)
Switch on and off with "Full animation" entry (like before).
Diff and Windows built is attached.
Attachments
seasons.diff
Diff
(9.17 KiB) Downloaded 203 times
Last edited by prissi on 19 Jun 2005 13:41, edited 1 time in total.
User avatar
Aegir
Tycoon
Tycoon
Posts: 2884
Joined: 09 Feb 2004 10:02
Contact:

Post by Aegir »

Thankyou! Thankyou very much! Im so glad that my pallette shift idea for seasons/day/night got implemented!

Now the only thing OTTD needs for me to start considering actually playing it is newgrf support for stations :D.

Excellent work.
Currently working under the name 'reldred' on Github, and Discord.
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.

14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
User avatar
Dextro
Chief Executive
Chief Executive
Posts: 701
Joined: 12 Jan 2005 21:56
Location: Lisboa, Portugal
Contact:

Post by Dextro »

(dejá vú) OMFG THIS IS SO F***ING GREAT!!! :mrgreen:

But I'ts almost impossible to use :(

My sugestions are simple (to understand, not to code :mrgreen: ):
  1. make an option in the configure patches window to disable the day/night cicle and another to disable the seasons cicle.
  2. Prevent the GUI from becoming dark aswell! It's just plain impossible to use the GUI during the night :(
Of course that I have other sugestions like making the snow line option valid with this patch, add lights to the vehicles, and so on but I know there are hard and the other 2 are much more important...

But the patch shows great potential :D
Uncle Dex Says: Follow the KISS Principle!
User avatar
bobingabout
Tycoon
Tycoon
Posts: 1850
Joined: 21 May 2005 15:10
Location: Hull, England

Post by bobingabout »

imo, day/night cycles would be so fast it'd drive you into a fit. but imo, this would best be used in the new game speeds that were talkied about, where a games year takes about a real time hour/day. in these cases day/night cycles and seasons would be great.

in any case, day/night cycles should be optional.
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.

[/url]
User avatar
Zahl
Engineer
Engineer
Posts: 27
Joined: 23 May 2004 13:19
Location: Germany
Contact:

Post by Zahl »

Dextro wrote:My sugestions are simple (to understand, not to code :mrgreen: ):
  1. make an option in the configure patches window to disable the day/night cicle and another to disable the seasons cicle.
  2. Prevent the GUI from becoming dark aswell! It's just plain impossible to use the GUI during the night :(
If you had read the whole thread you'd have noticed that he doesn't want to mess up with the gui (he even didn't look at the code yet)
The GUI colors fade too as the game uses only 256 colors.
Image
User avatar
Dextro
Chief Executive
Chief Executive
Posts: 701
Joined: 12 Jan 2005 21:56
Location: Lisboa, Portugal
Contact:

Post by Dextro »

Zahl wrote:
Dextro wrote:My sugestions are simple (to understand, not to code :mrgreen: ):
  1. make an option in the configure patches window to disable the day/night cicle and another to disable the seasons cicle.
  2. Prevent the GUI from becoming dark aswell! It's just plain impossible to use the GUI during the night :(
If you had read the whole thread you'd have noticed that he doesn't want to mess up with the gui (he even didn't look at the code yet)
The GUI colors fade too as the game uses only 256 colors.
If you had read the post instead of just telling me to you would have read that I had already replied to this topic and am aware of those things still I sugested them because they are needed to make the patch usefull/playable...

And he doesn't need to do it, someone else can. This is opensource in case you haven't noticed it...
Uncle Dex Says: Follow the KISS Principle!
User avatar
prissi
Chief Executive
Chief Executive
Posts: 648
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Post by prissi »

Nearly final version with UI and snowy trees. Some trees types a changing rather randomly to the bright "Pappel" like ones.

A non-darkening UI is something best done when the 16/32-Bitmap code is there.
Attachments
seasons-ottd.zip
Windows version with the required new language files.
(1.02 MiB) Downloaded 302 times
season-ui.diff
Diff to 17.6.
(14.44 KiB) Downloaded 262 times
Getting winter with snowy trees and japanese ricefields
Getting winter with snowy trees and japanese ricefields
November.png (115.04 KiB) Viewed 7211 times
User avatar
lucaspiller
Tycoon
Tycoon
Posts: 1228
Joined: 18 Apr 2004 20:27

Post by lucaspiller »

I am afraid I just can't get this working. I have tried both Windows and DOS graphics but it just doesn't work. With Windows graphics I get purple water, with DOS graphics I get grey / brown water... but no day / night change...
No longer active here, but you can still reach me via email: luca[at]stackednotion[dot]com
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 3 guests