➟ Go back to June 2008.
➟ Proceed to August 2008.
The BVE 4 panel can now be correctly centered on screen by taking the Left, Right, Top, Bottom and Center values into account. However, without support for proper camera restriction, some out-of-the-cab parts can still be visible. Furthermore, polygons using both a daytime and a nighttime texture are now disabled lighting and instead take the lighting into account by fading more toward the night texture for low lighting conditions. This helps in preventing both applying lighting and fading into the nighttime texture as BVE does it, often resulting in darkness there.
The EB acknowledgement key has not been working in a while, which has been fixed now. Also, the AI driver was previously not able to handle the EB, which it now can.
The settings file now provides choices of which interpolation mode to choose (including mipmapping) and also whether to use anisotropic filtering, which has now been implemented for a great improvement in rendering quality.
An ATS-P bug has been fixed where the security system did not allow the emergency brakes to be applied after passing a red signal when a brake release was acquired.
Various modifications have been made to prepare the release of version 0.6, including a performance optimization in the renderer and the introduction of proper error handling in some parsers which did not have one. Overall, the current state of development seems to be stable enough and feature-complete for the version 0.6 release, so version 0.6.0.0 has been published today.
A problem related to the EB device has been solved when the device did not correctly work together with ATS-P. Additionally, the train was previously able to receive the distance to the next red signal even when crossing an ATS-P immediate stop transponder, which is presumably unrealistic and led to a series of brake applications on routes not properly equipped with ATS-P origin transponders. Thus, the immediate stop transponder now only forces the train to stop when the immediate signal is red, not adding in calculating the brake curve when the immediate signal is not red (which is left solely to the pattern origin transponders).
The brake indicator for trains using the automatic air brake or the hold brake can now be correctly shown for BVE 4 trains. Furthermore, signals are now only made visible when they are in visible range, while previously, all signals were visible to the renderer at all the times. This gives a little increase in performance.
I have started to create pole graphics for the compatibility objects as BVE uses default objects when the route does not specify its own. Additionally, I found two very serious problems with the lighting. First, the light source previously rotated along with the camera direction. Second, I incorrectly assumed that the Route.LightDirection command specified coordinates instead of angles simply because I did not read Mackoy's specification well enough. Both problems are fixed now, although BVE seems to have a bug when the Route.LightDirection is set to 180;0. The light should point to the back then, but in BVE, it comes from above. I do not intend in replicating this behavior.
Previously, the background image was affected by lighting, too, which did not occur in BVE, so lighting for the background has been disabled now. As for the compatibility poles, the single (left-sided) pole has been created using mostly photo-realistic textures.
Creation of the compatibility pole objects has been completed. It is almost sad that most BVE routes explicitly load their own pole objects, so these compatibility objects are seldom to be seen.
The compatibility poles are now used when no custom poles are specified, making the work on the poles complete.
In BVE routes, the Track.Signal command can be used to create invisible yet functional signals. Although this has been being supported in openBVE, it previously affected the ATS-P system, the interface messages, the AI, and other train-related internals. Now, it only affects the signalling, but is completely shielded from the rest of the game, increasing the compatibility on some routes, prominently those which used invisible signals as a means of controlling the transition from ATS to ATC.
The first attempts have been made to interface with the ATS DLL plugins. A proxy DLL written in C++ is being used to dynamically call an ATS DLL, as .NET cannot easily do this for native DLLs. So far, the Load, Dispose and GetPluginVersion functions work as intended.
I spent the day figuring out why the calls to the other functions did not work so far, and it seems that I have problems with the calling convention, or the way it is being used by the proxy to dynamically load the DLLs. This requires some time-expensive investigation before development can continue normally.
A slight change has been made to the route parser which will now only treat numbers inside the [railway] section as track positions for RW routes, which was not previously the case and could lead to a bunch of problems.
The fog has been reworked to provide for transitions in fog distance and color, which are now very smooth.
I finally made some progress in communicating with the ATS DLL plugins. I have only accessed the DLLs in a debugger so far, but it seems that the interaction is working normally. Work can now begin to incorporate the plugin functionality into the actual program.
BVE 4 signal glow has been improved in quality. The images are now loaded with some special algorithms applied. Apart from the transparent black region, the image is inverted, hue-shifted by 180 degrees, curve-corrected, blurred and again curve-corrected. The result is opaque in the center of the glow but fades smoothly into transparency toward the outer rim. The images are still a little disc-like due to the way they have been created, but they do not show the white corona any longer as it was previously the case.
The plugin functionality is currently being integrated into the game using direct calls from C# without a proxy as it caused memory corruption problems, but it will take a while to test if the plugins actually work correctly.
The pilot lamp on and off sounds have been added, as they were previously missing. Also, the leave sound (corresponds to the pilot lamp on sound) is thereby corrected as it only played occasionally before.
I have successfully ported the calls to GLFW into calls to SDL. This way, I can get rid of GLFW which caused problems on some systems due to the incompatibility of the glfw.dll on those systems. Additionally, as I want to incorporate joystick support in the future, SDL is the more promising framework anyway. Initially, I noticed a serious drop in frame rates, which was due to the fact that SDL by default displays a mouse cursor on top of the screen, but by disabling it, there is no visible difference in performance between SDL and GLFW. Furthermore, I have implemented a new keyboard management system which will allow for customizable keys in the future, although some keys are currently unavailable.
All keys have been reimplemented and also, the additional keys used by the security system plugins have been added.
Previously, the Cylinder command in CSV/B3D object files swapped the behavior of the R1 and R2 radii, leading to a vertically flipped cylinder if the two radii were different. This has been corrected now after having been undetected for quite some time.
The sound interaction with the ATS DLL plugin has been implemented and seems to work correctly. The SetBrake command sent to the plugin now reflects the use of the emergency brake and my assumption of how the interaction with a train using the automatic air brake would work. However I cannot currently test the latter one due to the lack of suitable trains.
Large parts of the program have been adapted to allow for a reduction of memory necessary to store object data. So far, I have noticed a save of around 15% to 20% regarding the memory requirement of openBVE on some, especially longer, routes. The precision of color data needed to be compromised in order to allow for this. Interestingly, the frame rates seem to have improved by around 5% as a consequence of this optimization.
All commands, including the SetSignal and SetBeaconData, are now passed to the plugin. It seems that my poor understanding of the largely undocumented behavior of the DLL commands results in the plugins not working correctly. The most significant problems are that first the beacon and signal data is probably completely wrong due to my lack of understanding. The other problem is that the handles the plugin should normally able to set is not set in the lifetime of the plugin, making it pretty useless currently. Also, there are certain sound-related issues when sounds are instructed to be played in a loop even when I know they should not.
I discovered that .NET cannot handle DLL calls to functions returning structures properly, so I reverted back to using a proxy DLL written in C/C++. I also solved problems with the calling convention that previously occured when communicating from the proxy to the ATS DLL. Thus, the technical problems are finally solved. Using a custom ATS DLL logging calls to it, I have managed to reverse-engineer the behavior of the SetSignal and SetBeaconData commands on suitable routes and have made the appropriate adjustments to the calls openBVE makes. As it seems, BVE does not set signals to red when passing them as this is presumably not required in BVE. However, the fact that openBVE does interferes with some Track.Beacon commands referencing the current section the player's train is in as the signal state is always reported red in this case. Therefore, I have added a compatibility mode forcing sections only to switch to red when the rear of the train passes the respective section in order to allow for those beacons to interoperate properly. Things to do are still to send the handles the plugin requests to the train and to solve the problem with looping sounds when they should not loop.
The handles the ATS DLL plugin requests are now sent to the train and thus, the plugin has control over the train, which seems to even work in most cases.
Changes have been made to the transponders (or beacons) in order to allow for the Track.Beacon typeBeacon;structureIndex;-1 command to work properly. BVE's behavior seems to contradict Mackoy's specification, which says that this kind of beacon should reference the section of the "previous train", however it does not seem to work like that. In openBVE, it is rather implemented as the next red section, which seems to work with existing routes.
I have logged the changes the plugin makes to the sound array in order to find out why certain sounds are issued to be played in a loop at the beginning of the game, but so far, I could not find the answer to this question.
The problems with unwanted looping sounds has been mostly resolved by skipping processing the sound array the ATS DLL writes to for the first frame. I don't know whether this interferes with some plugins actually wanting to play sounds in the first frame or not, because my testing material is quite limited at the moment.
The delays for the power and brake notch have not been working anymore for quite some time. The problem has been fixed though and now the delays work again as they did once upon a time.
The behavior of the additive and glow blend modes has been changed a bit. These modes do no longer use the simulated daytime/nighttime transitions, thus making them more realistic when used on train objects.
The SetBeaconData and SetSignal commands sent to the plugin have been modified to report a signal aspect of 255 when no explicit signal is available as done in BVE. I have made a preview release version 0.6.9.0 available for publicly testing the plugins.
Previously, the pretrain could trigger route sounds like set up using the Route.Announce command, which were then not played anymore for the player. This has been corrected to only trigger those sounds for the player's train.
Previously, the daytime/nighttime transition was modified by the amount of ambient and diffuse color used while lighting is deactivated. Now, only ambient lighting contributes to this bias as it seems to be more suited this way with existing BVE material.
The power, brake and emergency brake handles have been completely overhauled in order to allow better interaction with the security systems. Now, they are stored in three ways each: the driver's setting, the security system's setting and the actual setting, which accounts for the delays.
A bug with the kmphd0, kmphd1 and kmphd2 suspects in BVE 4 panels has been corrected which prevented digital speedometers from displaying correctly.
The doorl and doorr subjects for BVE 4 panels have been implemented. Furthermore, the BVE 4 needles employ an approximation of a damped oscillator, but currently not an undamped one, leading to partial support of the NaturalFreq and DampingRatio commands in the Needle sections.
Some parts in the initialization procedure of the ATS DLL plugin has been changed to better reflect the behavior of BVE, however, it still does not match exactly.
Some few bugs have been corrected concerning the previous train and the emergency brake.
I have successfully compiled openBVE against the Mono framework using SharpDevelop. The source code for the upcoming version 0.7 will be available as a Mono-compliant project. Then it is up to Linux and Mac developers to try to get it running on their platforms.
Delays have been added to the automatic air brake handle and to the emergency brake. The ATS DLL plugins can now also use the automatic air brake, which was previously unavailable to them.
The way BVE 4 glow images are loaded has been changed. Previously, increasing the contrast in the images could force yellow-golden glow to become orange-red. Now, the process is as follows: Replace pure black by pure white, invert the image, hue-shift the image by 180 degrees, multiply the image by its own lightness mask, box-blur the image with radius 2 and finally multiply the image by its own lightness mask once again. The result preserves the color while converting a disk-like corona-employing image into a smoothly rounded glow image suitable for additive blending.
The homepage creation software I have started working on a week or so ago has received a major overhaul. In the future, content creation will be possible offline in a WikiCreole- or BBCode-resemblant style useful for people willing to translate the homepage without directly editing HTML and without the need to use elaborate content management systems involving SQL databases. Also, I have started working on a CSV format specification as a prototype using this system. Furthermore, the source code of openBVE is in the process of being checked against inter-platform compatibility problems, and I am working on making all file and folder accesses platform-safe. So far, all necessary helper functions have been written but need to be incorporated whenever a file or folder is accessed.
The platform-safe code for file accesses has been fully implemented throughout the source code. Also, some remaining problems have been resolved and thus, version 0.7 has been released today.
The normals generated for the Cylinder command in CSV and B3D objects were previously always in the XZ-plane even when the lower and upper radii of the cylinder were different. This has been corrected now and as such, the radii are correctly included to compute the normals. Additionally, the normals as computed for the cylinder wall were also applied to the caps, leading to incorrect shading on the caps. While retaining BVE compatibility, this has been resolved by internally flagging the faces which represent the cylinder caps to recompute their normals automatically after finalization of the mesh builder creation process. The result is a smoothly-shaded cylinder wall with flat caps, which is considered correct behavior.
I have started to rewrite the textual X parser. While previously, it was directly used to create the object, the new parser reads into an internal representation of the file format first, which will only afterward be processed to create the object. This way, I can also write a binary parser reading into the same internal format and process the actual data in this internal format regardless of the original file format. The new parser is also easier to expand, while the previous parser was somehow hard-coded to read character-by-character for every individual template. The new parser is more general from this point of view.
An error within the train.dat parser has been corrected which caused motor and brake volumes to be incorrectly processed mostly for the higher volumes, which then became unattenuated.
A problem with the compatibility functions for Linux and Mac has been corrected which prevented files to be correctly found on those systems. As for the X parser, the Mesh command is available again with, this time in the new parsing engine, resulting in the shapes of objects to be visible again, but as previously, with pure white faces only.
The MeshMaterialList and Material templates have been added to the X parser, incorporating face color and emissive color.
The TextureFilename and MeshTextureCoords templates have been added to the X parser, thus allowing textures to be used from within the X file.
The MeshNormals template has been added, too. Additionally, a bug has been fixed which prevented normals to be correctly faced after an object had been rotated in the route parser.
Support for the binary flavor of the X format has been added, to the necessary degree that is. I think it is safe to say that the X format is one of the most complex and stupid file formats I have ever encountered. Anyway, for the first time I was able to run Mackoy's Keisei Chiba Line in openBVE, although a minor amount of objects are compressed X files and thus not supported. Additionally, some textures seem to be missing on my computer and some faces are still pure white, maybe because of that, but maybe due to parsing incompatibilities. Still, this allows a lot of more BVE 4 routes to be used in openBVE now.
Initial work has been done to automatically generate timetables. So far, the data is collected at startup, including station names, arrival times, departure times, as well as time intervals and speed restrictions between stations. The timetable will be pre-rendered as one texture and then overlayed over the screen. The style will resemble Japanese timetables. Drawing the bitmap from the data collected is yet to come.
The timetable can now be roughly rendered and displayed in-game. Some layout adjustments and a little beautification are still required.
With version 0.7.0.0, the behavior of the power and brake notches had been changed as a result of work carried out on the security systems. With that version, multiple notch changes also required multiples of the delay to apply. The behavior of the delays has been changed back to refer to the time it takes from setting the notch to its actual application as it was before version 0.7.0.0.
The default timetable has been completely implemented now. As a result, the Route.Timetable command in CSV (or RW) routes has been made available, too.
A bug in the route parser has been fixed which allowed negative numbers for rail type indices, leading to crashes on routes using them.
Custom BVE 4 timetables are now available as support for the Train.Timetable has been introduced, as well as the necessary addition to the Train.Sta command.
The Texture.Background(IdxTxType).x command has been made available in order to allow for the customization of the number the background image is repeated in a full circle.
The validation checks employed by the route parser have been checked and improved in some cases. The error messages have also been made a little more precise for some errors.
The Track.FreeObj command has been extended to employ Yaw, Pitch and Roll as parameters for rotation. The source code has been a little optimized along with this addition in order to replace all rotation functions using angles by those using solely precomputed cosines and sines. As angles are commonly shared within the route parser and train updates, recomputing those trigonometric functions for every rotation was simply unnecessary.
The timetable section for the panel2.cfg has been incorporated in order to show custom BVE 4 timetables as part of the train instead of overlaying it as part of the GUI.
The blend modes and glow attenuation have been reworked. The available blend modes are now Normal and Additive, while glow can be applied to any of them separately. A custom glow application distance can be chosen as well as the underlying attenuation function. Other functions than those currently built-in could also be added in the future if necessary. Additionally, the default distance for BVE 4 signals has been changed to fade out more quickly than before.
The specification for the B3D object file has been written almost entirely now.
The Options.BlockLength and Options.UnitOfLength commands have been added to the route parser. Furthermore, the Track.Announce command has been extended to allow for speed attenuation.
The function which calculates the forward and backward viewing distance based on the camera direction has been finally reworked into a mathematically correct implementation, while previously, only an approximation was used, which could force objects to become invisible even when they were inside the viewing frustum.
Scripted camera view points have been mostly made available via the new Track.PointOfInterest command. It is already possible to jump between adjacent points via the keyboard.
A fly-by camera has been added which focuses on the front of the train on approach and gradually shifts this focus to the rear car when the train passes by. The fly-by camera can also optionally zoom-in on the distant train.
➟ Go back to June 2008.
➟ Proceed to August 2008.
|
|