Logo About  Screenshots  Using  Developing  Blog  Forum  Download
January 2009 

Go back to December 2008.
Proceed to February 2009.

In these blog entries, you will find information on the things that I am currently working on. Whatever you read in recent entries does not necessarily describe things that are available for public download. The sole purpose of this blog is to inform you about the progress on development which will eventually - that is, in the future - result in an actual release of those features. Do not mistake this blog for a changelog.

 2009-01-02 (Friday) 
For compatibility reasons, I added the Japanese names of the sections and key-value pairs for the panel.cfg parser along with some other spelling variations that I discovered recently in existing material.

Function scripts as used internally by the panel.cfg and panel2.cfg parser, as well as by animated objects, have been given some optimizations. The postfix notation is now analyzed and some common arithmetic and logical simplifications are automatically made to reduce the time spent on later execution of the functions.

 2009-01-03 (Saturday) 
Background images previously preserved their aspect ratio, which did not work well with some existing routes. As such, the background image has now a fixed height, but I added the Texture.Background(BackgroundIndex).Aspect command to let the developer decide whether to use a fixed height or a fixed aspect ratio. The code for rendering the background image has been rewritten entirely, and both top and bottom caps for the background cylinder have been added. The caps sample from around 10% height at the vertical ends of the texture, which works quite well for most background images, except in the case that there are small structural details extending to the edges of the texture (e.g. mountain, moon, etc.), which might then be repeated on the cap. Nonetheless, this is much better than the black void that was previously there.

The Options.UnitOfSpeed command has been added and complements the Options.UnitOfLength command to customize the units in use in a route file. Options.UnitOfSpeed also affects the visual representation of the speed on the speed post created by Track.Limit.

 2009-01-04 (Sunday) 
The detection of parentheses around arguments in route files was previously unreliable and did not work in many cases if there were spaces in the expressions. Missing closing parentheses can now be partially recovered from.

 2009-01-07 (Wednesday) 
I was about to implement a new algorithm for propagating brake pipe pressure as with the previous implementation, the brake pipe pressure propagation did not converge as intended. However, any new idea I tried to implement turned out to be just as compromised, with a varying amount of different problems.

As I worked on the documentation for the panel.cfg and the panel2.cfg in the last days, I have incorporated the new terminology used by the documentation for all error messages generated by the respective parsers.

 2009-01-08 (Thursday) 
Besides some miscellaneous fixes, I made the design choice to suppress warning messages in openBVE while they will still show in RouteViewer. As a consequence, I have tried to better discriminate what should be an error and what a warning and made some adjustments to the existing messages. From now on, unsupported commands and redundant arguments in supported commands raise warnings, as well as ambiguous situations do that can be meaningfully resolved.

 2009-01-09 (Friday) 
The fog behavior has been slightly adjusted for better compatibility. Any Track.Fog command will now only take fully effect starting with the next block, while from the point of insertion, it will start blending from the old state into the new state. Track.Fog is now limited to the use at the beginning of the block, which was not previously the case.

Additionally, as I did not like the way the Track.Fog command and the transitions work, I have introduced the Options.FogBehavior command to switch to another interpretation. The new behavior basically mimics the Track.Brightness command in that the fog blends linearly from one command to the next one. While you can achieve the same effects with the old behavior, I think that the new one is easier to work with.

 2009-01-11 (Sunday) 
The behavior of departure signals that are instructed to stay at red has been changed. Previously, these signals only stayed red until the departure time, while now, they keep staying at red until the train has reached the area of the stop position (if a stop position is present).

 2009-01-12 (Monday) 
In order to fully supersede the panel.cfg by the panel2.cfg, I have added an atc subject to the list of subjects available in the panel2.cfg. This allows to even use the panel2.cfg when intending to make use of the built-in ATC security system and to display its status, which was previously limited to the panel.cfg.

 2009-01-15 (Thursday) 
When trying to use a speed-approach-control signal in the form of an animated object, I noticed a problem with the function script optimizer, which has been fixed now. Additionally, I have added the trackdistance, speedometer, leftdoors[i] and rightdoors[i] variables.

The source code has been reworked to get rid of all platform-specific conditional compilation. Platform-specific differences are now handled at run-time, which makes openBVE's executable cross-platform. Of course this does not solve the need for external dependencies. Another potential issue for Mono users was that the Start new game (and so on) radio buttons were misrendered with Mono. I could resolve this by designing the radio buttons for use with Mono and only change the style for MS.NET at run-time instead.

 2009-01-20 (Tuesday) 
The behavior of the trackdistance variable for function scripts has been slightly changed in that it now returns signed values. The per-car variables distance[carindex]] and trackdistance[carindex] have been added to retain the possibility to measure the distances about one point of a particular car.

 2009-01-23 (Friday) 
I have started to redesign all of the signal graphics used for compatibility with older routes. The previous graphics in use were mainly too bright for Japanese signals and also, I was not satisfied with the quality of the template texture used to sample the graphics from. The new graphics are much better suited ( see comparison ). The glow has also been redesigned and now employs some star-shaped highlights and small lens flares.

 2009-01-24 (Saturday) 
Animated objects can now be used as train exterior objects. For animated objects, the pluginstate[index] variable has been introduced which returns a value of the train plugin corresponding to atsindex in the panel2.cfg, allowing for custom exterior effects by plugin developers, e.g. headlight, wipers, etc. I have tested the system with moving doors and spinning wheels, and everything seems to work fine.

For clocks created using the panel2.cfg, the hour, min and sec subjects are now handled specially when occuring inside a Needle section in order to prevent the needle to jump back from 59 to 0 in a counter-clockwise direction. Previously, damping was disabled for these subjects as a compromise in order to conceal this effect, but is now enabled again.

 2009-01-25 (Sunday) 
I have reworked parts of the new signal graphics, including adding a frame between the back plate and the lamps. There are now two layers of glow of different size and effective radius, creating a smoother blend upon approach.

 2009-01-26 (Monday) 
Finally, I have resumed writing on the documentation on which I had not been working for a few weeks. As a result, the panel2.cfg and train.dat descriptions are complete now, along with the panel.cfg that was already. I made minor modifications to some of the default values in the panel2.cfg and train.dat, removed the ModelOfAcceleration from the train.dat and renamed the AtsP entry in the train.dat to simply Ats, with the consequence that the new value of -1 can now be used to disable the availability of ATS altogether. Also added is the rev subject for the panel2.cfg in order to display the state of the reverser. The new signal graphics are also complete now. Some modifications were made to the way the volume values are interpreted in the train.dat, and a bug was fixed that basically prevented the volume setting from being applied altogether.

 Links 
Go back to December 2008.
Proceed to February 2009.