New OpenBVE Build- Testers Please

Page 4 of 17 Previous  1, 2, 3, 4, 5 ... 10 ... 17  Next

View previous topic View next topic Go down

Re: New OpenBVE Build- Testers Please

Post by Dexter on Tue Nov 03, 2015 3:29 pm

Well, I have that at the end of my route and I was wondering why the fps goes down to 20... but the 970 GTX keeps it without major stuttering. There is a lot of vegetation, so I will probably need to narrow it down a bit. Anyways, my hat goes off to you for actually doing something with the sim, improvements are much welcome and needed!

Dexter

Posts : 1780
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by LabRatAndy on Tue Nov 03, 2015 10:34 pm

I've just tried with the latest version, and the sound is still missing at the start. I tried jumping to the next station and this always seemed to bring the sound back even when jumping back. Exiting to main menu seems to make no difference although occasionanally it does work. I did notice that the sound comes back at the same point in the route at about 1800 m regardless of time taken to get to that point.
Hope this helps.

LabRatAndy

Posts : 95
Join date : 2011-08-29

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by MattD6R on Wed Nov 04, 2015 10:38 am

I tried it again with the same route and twice the sound worked from the start. I then tried it for a third time and it didn't work but it did work when the train reached 1800 metres. I tried it again and the sound didn't work. I jumped to the second station with sound working and then back to the first station where the sound worked. I tried the route again and the sound worked from the start.

MattD6R

Posts : 214
Join date : 2013-06-16
Location : Brisbane, Australia

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by leezer3 on Sat Nov 07, 2015 1:20 pm

OK, I think I've got it whacked now Smile
http://www.bvecornwall.co.uk/downloads/beta/OpenBVE_1440m.7z

Interesting Changes:

  • Initialize sounds much later in the loading process, after the gamewindow has been instantiated fully (Hopefully fixes NWM)
  • Fullscreen switch now works correctly.


Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 750
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by MattD6R on Sat Nov 07, 2015 10:45 pm

With 1.4.4.0.m the sound does work correctly from the start using the same NWM route that I was having trouble with before. I also drove that route and it ran quite well without any problems.

MattD6R

Posts : 214
Join date : 2013-06-16
Location : Brisbane, Australia

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by leezer3 on Sun Nov 08, 2015 1:30 am

Good Smile

Now, for something *much* more interesting:
http://www.bvecornwall.co.uk/downloads/beta/OpenBVE_1440n.7z

Perhaps the biggest problem with animation in OpenBVE at the moment is the lack of a reasonable scripting language, allowing us to store variables etc. etc.
With this in mind, I've spent a lump of time this evening implementing the CS#Script library for use in animated objects.

Whilst incomplete, this build represents a working preview, which I'd love feedback on Smile

Usage:
In your animated file, replace TranslateXFunction, TranslateYFunction or TranslateFunction with TranslateXScript, TranslateYScript or TranslateZSCript.
This should represent a relative path to a .cs script file.

These must implement a class of OpenBVEScript, and implement the ExecuteScript method with the return type of double as defined in this sample:
Code:
using OpenBve;
using OpenBveApi.Math;

/*
 * This is a sample script for use with the OpenBVE CS Script scripting engine
 *
 * ExecuteScript is called once a frame by the object manager, and has a return
 * type of a double-precision floating point number.
 *
 * Variables created within the OpenBVEScript class are stored per-script, and
 * are retained between frames.
 *
 * This sample script simply moves the selected object by 1 meter every 5 seconds
 * The world is now your oyster
 */


public class OpenBVEScript
{
    private double time = 0.0;
    private int Return = 0;
    /// <summary> Call to execute this script </summary>
    /// <param name="Train">A reference to the nearest train</param>
    /// <param name="Position">The object's absolute in world position</param>
    /// <param name="TrackPosition">The object's track position</param>
    /// <param name="SectionIndex"></param>
    /// <param name="IsPartOfTrain">Whether this object forms part of a train</param>
    /// <param name="TimeElapsed">The time elapsed since the previous call to this function</param>
    /// <returns></returns>
    public double ExecuteScript(OpenBve.TrainManager.Train Train, Vector3 Position, double TrackPosition, int SectionIndex, bool IsPartOfTrain, double TimeElapsed)
    {
        time += TimeElapsed;
        if (time > 5)
        {
            Return++;
            time = 0.0;
        }
        return (double)Return;
    }
}

I'd strongly recommend using the CS-Script NotePad++ plugin & enabling it's intellisense functionality to see the properties exposed within Train:
http://csscript.net/npp/default.html

I'll cook up some more complicated examples, either tomorrow night or Monday.
I'm also thinking about allowing cross-script variable access, but this is more complex than it looks (I suspect that the solution to this is going to be a 256 length array of doubles accessible from any script TBQH)

I'll also extend this to rotation and texture shifting once I've had some feedback Smile

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 750
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by MattD6R on Sun Nov 08, 2015 5:01 am

This is interesting progress, I might find this useful for myself Smile .

I tested this with my (yours!) signal/crossing animation file and as I have not used the translate command I added it but as I not fully conversant regarding the animation format if I have done this wrong please correct me. However OpenBve crashed whilst loading.

The code added to the animation file was:

Code:


[Object]
Position = 19.6,1.85,-0.9
States = Script.cs,
TranslateXScript = 1

I have Script.cs file in the same folder as the animation file and I get this error: "File1 is an empty string - did you mean something else? - in States at line 9 in file C:\openbve\openbve Route and Train Content\Railway\Object\BRN\Signals\QldSigs_open\3AspectLed_FeatherL.animated" . But I probably using the translate function incorrectly.


And a sample of the error logs that windows gave was this:
Code:
Dump Summary
------------
Dump File: WERE8A4.tmp.mdmp : C:\Users\*********\AppData\Local\Temp\WERE8A4.tmp.mdmp
Last Write Time: 8/11/2015 2:57:16 PM
Process Name: OpenBve.exe : C:\openbve\openbve_1.4.4.0\OpenBve.exe
Process Architecture: x86
Exception Code: 0xE0434352
Exception Information: 
Heap Information: Not Present
System Information
------------------
OS Version: 6.1.7601
CLR Version(s): 4.0.30319.34209
Modules
-------
Module Name Module Path Module Version
----------- ----------- --------------
OpenBve.exe C:\openbve\openbve_1.4.4.0\OpenBve.exe 1.4.4.0
ntdll.dll C:\Windows\SysWOW64\ntdll.dll 6.1.7601.19018
mscoree.dll C:\Windows\System32\mscoree.dll 4.0.40305.0
kernel32.dll C:\Windows\SysWOW64\kernel32.dll 6.1.7601.19018
KERNELBASE.dll C:\Windows\SysWOW64\KERNELBASE.dll 6.1.7601.19018
advapi32.dll C:\Windows\SysWOW64\advapi32.dll 6.1.7601.18939
msvcrt.dll C:\Windows\SysWOW64\msvcrt.dll 7.0.7601.17744
sechost.dll C:\Windows\SysWOW64\sechost.dll 6.1.7601.18869
rpcrt4.dll C:\Windows\SysWOW64\rpcrt4.dll 6.1.7601.19018
sspicli.dll C:\Windows\SysWOW64\sspicli.dll 6.1.7601.19007
CRYPTBASE.dll C:\Windows\SysWOW64\CRYPTBASE.dll 6.1.7601.19018
mscoreei.dll C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscoreei.dll 4.0.30319.34209
shlwapi.dll C:\Windows\SysWOW64\shlwapi.dll 6.1.7601.17514
gdi32.dll C:\Windows\SysWOW64\gdi32.dll 6.1.7601.18898
user32.dll C:\Windows\SysWOW64\user32.dll 6.1.7601.17514
lpk.dll C:\Windows\SysWOW64\lpk.dll 6.1.7601.18985
usp10.dll C:\Windows\SysWOW64\usp10.dll 1.626.7601.18454
imm32.dll C:\Windows\System32\imm32.dll 6.1.7601.17514
msctf.dll C:\Windows\SysWOW64\msctf.dll 6.1.7601.18731
clr.dll C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll 4.0.30319.34209
MSVCR120_CLR0400.dll C:\Windows\System32\MSVCR120_CLR0400.dll 12.0.51689.34249
mscorlib.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_32\mscorlib\d1265d6159ea876f9d63ea4c1361b587\mscorlib.ni.dll 4.0.30319.34209
ole32.dll C:\Windows\SysWOW64\ole32.dll 6.1.7601.18915
uxtheme.dll C:\Windows\System32\uxtheme.dll 6.1.7600.16385
clrjit.dll C:\Windows\Microsoft.NET\Framework\v4.0.30319\clrjit.dll 4.0.30319.34209
oleaut32.dll C:\Windows\SysWOW64\oleaut32.dll 6.1.7601.18679
cryptsp.dll C:\Windows\System32\cryptsp.dll 6.1.7601.18741
rsaenh.dll C:\Windows\System32\rsaenh.dll 6.1.7600.16385
RpcRtRemote.dll C:\Windows\System32\RpcRtRemote.dll 6.1.7601.17514
version.dll C:\Windows\System32\version.dll 6.1.7600.16385
System.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_32\System\d18e2115a3270f89663fce831547f534\System.ni.dll 4.0.30319.34238
System.Drawing.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Drawing\fe41e3eae34ac29f3c1f03a03d8aa1af\System.Drawing.ni.dll 4.0.30319.34270
System.Windows.Forms.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Windows.Forms\0e5c6ed744d8e5894eec0b910e4fc7b0\System.Windows.Forms.ni.dll 4.0.30319.34251
opengl32.dll C:\Windows\System32\opengl32.dll 6.1.7600.16385
glu32.dll C:\Windows\System32\glu32.dll 6.1.7600.16385
ddraw.dll C:\Windows\System32\ddraw.dll 6.1.7600.16385
dciman32.dll C:\Windows\System32\dciman32.dll 6.1.7601.18985
setupapi.dll C:\Windows\SysWOW64\setupapi.dll 6.1.7601.17514
cfgmgr32.dll C:\Windows\SysWOW64\cfgmgr32.dll 6.1.7601.17621
devobj.dll C:\Windows\SysWOW64\devobj.dll 6.1.7601.17621
dwmapi.dll C:\Windows\System32\dwmapi.dll 6.1.7601.18917
nlssorting.dll C:\Windows\Microsoft.NET\Framework\v4.0.30319\nlssorting.dll 4.0.30319.34209
shell32.dll C:\Windows\SysWOW64\shell32.dll 6.1.7601.18952
profapi.dll C:\Windows\SysWOW64\profapi.dll 6.1.7600.16385
XINPUT1_3.DLL C:\Windows\System32\XINPUT1_3.DLL 9.18.944.0
comctl32.dll C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18837_none_ec86b8d6858ec0bc\comctl32.dll 5.82.7601.18837
comctl32.dll C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_41e855142bd5705d\comctl32.dll 6.10.7601.18837
GdiPlus.dll C:\Windows\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.7601.18946_none_72d45ee78666ea32\GdiPlus.dll 6.1.7601.18946
System.Configuration.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Configuration\908075c4922acdf834c67ac802814c9d\System.Configuration.ni.dll 4.0.30319.34209
System.Xml.ni.dll C:\Windows\assembly\NativeImages_v4.0.30319_32\System.Xml\3d6ee4ffbd9a86ac1e7b01800b6fe9c7\System.Xml.ni.dll 4.0.30319.34234
clbcatq.dll C:\Windows\SysWOW64\clbcatq.dll 2001.12.8530.16385
WindowsCodecs.dll C:\Windows\System32\WindowsCodecs.dll 6.2.9200.17251
atiglpxx.dll C:\Windows\System32\atiglpxx.dll 8.14.1.6099
atioglxx.dll C:\Windows\System32\atioglxx.dll 6.14.10.9704
ws2_32.dll C:\Windows\SysWOW64\ws2_32.dll 6.1.7601.17514
nsi.dll C:\Windows\SysWOW64\nsi.dll 6.1.7600.16385
atigktxx.dll C:\Windows\System32\atigktxx.dll 8.14.1.6099
atiadlxy.dll C:\Windows\System32\atiadlxy.dll 6.14.10.1054
wintrust.dll C:\Windows\SysWOW64\wintrust.dll 6.1.7601.18839
crypt32.dll C:\Windows\SysWOW64\crypt32.dll 6.1.7601.18839
msasn1.dll C:\Windows\SysWOW64\msasn1.dll 6.1.7601.17514
AtsPluginProxy.dll C:\openbve\openbve_1.4.4.0\AtsPluginProxy.dll 0.0.0.0
UKMUt.dll C:\openbve\openbve Route and Train Content\Train\Test EMU 6 car\UKMUt.dll 0.0.0.0
OpenAL32.dll C:\Windows\System32\OpenAL32.dll 6.14.357.24
winmm.dll C:\Windows\System32\winmm.dll 6.1.7601.17514
MMDevAPI.dll C:\Windows\System32\MMDevAPI.dll 6.1.7601.17514
propsys.dll C:\Windows\System32\propsys.dll 7.0.7601.17514
wdmaud.drv C:\Windows\System32\wdmaud.drv 6.1.7601.17514
ksuser.dll C:\Windows\System32\ksuser.dll 6.1.7600.16385
avrt.dll C:\Windows\System32\avrt.dll 6.1.7600.16385
AudioSes.dll C:\Windows\System32\AudioSes.dll 6.1.7601.18741
msacm32.drv C:\Windows\System32\msacm32.drv 6.1.7600.16385
msacm32.dll C:\Windows\System32\msacm32.dll 6.1.7600.16385
midimap.dll C:\Windows\System32\midimap.dll 6.1.7600.16385
dsound.dll C:\Windows\System32\dsound.dll 6.1.7600.16385
powrprof.dll C:\Windows\System32\powrprof.dll 6.1.7600.16385
wrap_oal.dll C:\Windows\System32\wrap_oal.dll 2.2.0.5
diasymreader.dll C:\Windows\Microsoft.NET\Framework\v4.0.30319\diasymreader.dll 12.0.51209.34209


Last edited by MattD6R on Sun Nov 08, 2015 9:03 am; edited 1 time in total

MattD6R

Posts : 214
Join date : 2013-06-16
Location : Brisbane, Australia

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by leezer3 on Sun Nov 08, 2015 8:36 am

No, you want:
Code:
[object]
States = object.b3d
Position = 0,0,0
TranslateXScript = script.cs

It shouldn't crash though, although an empty object & corrupt script reference isn't clever...

I'm at work, so can't investigate until this evening, but please try the above as a first step.

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 750
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by MattD6R on Sun Nov 08, 2015 9:59 am

I see, that makes sense. Changing that, the object moves to the right a small distance to the right every 5 seconds. This is doing the same thing as mentioned in a comment in the script file. So it seems working as it should.

MattD6R

Posts : 214
Join date : 2013-06-16
Location : Brisbane, Australia

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by leezer3 on Sun Nov 08, 2015 7:24 pm

Hmm, I can't reproduce the crash here.

OpenBVE 1.4.3 crashes, but not my most recent build- Are you sure you didn't load that by mistake?
Would also like to know if it popped up an error message (1.4.3 will say 'Object not set to an instance of an object'), or just vanished.


Will keep testing and see if I can come up with something, but still Smile

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 750
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by MattD6R on Sun Nov 08, 2015 8:48 pm

It did not come up with an error message, it just froze and windows gave a message that the program is not working. This happened when it was said "loading, please wait" and after the route and train reached 100 % in the bar at the bottom with the program window. I tried this again but changing the animation code back to what I had, re extracted the latest version over the program installation and exactly the same thing happened. I also tried this version by deleting all the files in the installation and extracting into an empty folder but it still freezes.

MattD6R

Posts : 214
Join date : 2013-06-16
Location : Brisbane, Australia

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by _sando_ on Sun Nov 08, 2015 9:08 pm

I have now tested the "n" build. Switching from/to full screen is now working so far, but there is a little problem when resolutions are different. Example:
-- Window mode is 1024x768
-- Full screen mode is 1280x1024 (which is the maximum resolution of my screen and what I am using under normal circumstances)
-- Starting in window. Switching to full screen mode works as expected.
-- But switching back to the window ends up with the correct screen resolution of 1280x1024, but now OpenBVE is displayed inside a window of 1280x1024 partially outside the desktop with a game resolution of 1024x768.

Moreover, the game freezes or crashes while "Loading train ... 30.8%" on Linux with and without SDL2 installed. (However, this was not the case while I was using your "l" build.) The only exception seems to be the C69/77 ("C Stock v3"). This train loads perfectly on Linux with _any_ route tested. confused

_sando_

Posts : 11
Join date : 2015-10-31
Location : near Munich, Germany

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by leezer3 on Mon Nov 09, 2015 12:49 am

Hmm, this is obviously going to be a headache Razz

http://www.bvecornwall.co.uk/downloads/beta/OpenBVE_1440o.7z

Fixed the windowing problem (Update the state before the size, else it overwrites with the old fullscreen size, but the wrong OpenGL viewport.....), but I can't reproduce your loading crashes/ freezing-
I've tried with both X-City South (From the repos), NWM and the Plymouth route, together with a reasonable selection of trains from my collection, both cross-platform plugins and Windows only.

Two changes which *may* help in this build-
I've modified the sounds fix, which *may* help, as it makes a couple of other cases I discovered this evening function correctly on Windows.
The required .Net version has been bumped to version 4.0, non-client profile on all included items.

Otherwise, please try a completely clean extracted folder.
If something isn't closing cleanly, a reboot may also help.

At the moment though, I'm shooting in the dark a little, as I can't reproduce with either the N or O builds.
Some other thoughts-
Try leaving it for 5 mins or so, and seeing if it unsticks.
If there's anything logged in the terminal, it may shed a little light.
Other than that, if I can have some specific routefile/ train combinations you can make reliably freeze, I can test at this end and see what happens Smile

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 750
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by MattD6R on Mon Nov 09, 2015 3:28 am

Using 1.4.4.0.o I don't get the crash I had with the previous version when I used the wrong code for the script.cs in the animation file. And Openbve does come up with errors of: File1 is an empty string - did you mean something else? - in States at line 9 in file C:\openbve\openbve Route and Train Content\Railway\Object\BRN\Signals\QldSigs_open\3AspectLed_FeatherL.animated
The file extension is not supported: C:\openbve\openbve Route and Train Content\Railway\Object\BRN\Signals\QldSigs_open\Script.cs

Using the correct code in the animation file the script works correctly just like the previous version.

MattD6R

Posts : 214
Join date : 2013-06-16
Location : Brisbane, Australia

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by phontanka on Tue Nov 10, 2015 10:35 pm

Chris, I took your o build for a quick test on Ubuntu 15.04 32 bit and it ran perfectly well. I was able to run the same route again and again, there were no crashes, sound was working correctly as well. Good job!

phontanka

Posts : 215
Join date : 2012-05-08
Location : Hungary

http://phontanka.wordpress.com

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by phontanka on Tue Nov 10, 2015 10:37 pm

Chris, just wondering, are your builds actually based on the large address aware OpenBVE version from the US developer? (I feel ashamed of not remembering his name right now.)

phontanka

Posts : 215
Join date : 2012-05-08
Location : Hungary

http://phontanka.wordpress.com

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by leezer3 on Wed Nov 11, 2015 7:09 pm

No Smile
The chap you're thinking of is Shadow93 (Site was at shadow93.info , but that appears to have fallen over)

The only significant technical difference I could find between the his build and the last 1.4.3.0 from Odakyufan was that he'd ripped out a lot of the cross-platform path resolution API, and compiled with a later VS version.
(His supplied source was identical to 1.4.3.0, but I did do some digging with a decompiler)

The LBA flag made absolutely no difference, as OpenBVE never comes close to using that much RAM.
The path resolution changes shouldn't have mattered either (Other than breaking Linux compatibility when the case on the filesystem differed), so I can only speculate that the reported FPS gains were probably due to the newer VS version, *although* that shouldn't really have made any difference either.

Having said that though, as I noted earlier in the thread, the 1.4.3 OpenBVE FPS counter is basically junk Razz
Whilst it's mildly useful as a ballpark figure, that's about all. 
The one in my builds is a little better, but it's still got the same root techincal problem-
The render and update loops aren't separated.

Edit:
I will try and get this packaged for Ubuntu at some stage, and try to get it into the repos, but it's not stable enough at the minute.
I did try sending Sladen (The Ubuntu package maintainer) some messages a few months back with regards to sticking up a version with re-encoded PNGs, but he appears MIA at the minute....

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 750
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by phontanka on Wed Nov 11, 2015 7:35 pm

I sent Paul Sladen an email a few months ago but I didn't get a reply from him. Your build is shaping up nicely and seems to be able to replace the old one in the repo before feature freeze (or whichever freeze applies here).

(Thinking of the distant future and not important at this moment, it might be a good idea to put it in the Debian repos too as that's where Ubuntu imports from.)

phontanka

Posts : 215
Join date : 2012-05-08
Location : Hungary

http://phontanka.wordpress.com

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by phontanka on Wed Nov 11, 2015 8:14 pm

Chris I ran your o build on my Windows boxes and it will not start. I tested on two computers:

#1:
- i3 quad core CPU
- 8 GB RAM
- Windows 10 64 bit Hungarian language, fully up to date

#2:
- AMD quad core CPU
- 2 GB RAM
- Windows 7 32 bit Hungarian language, fully up to date

On #1 the o build seems to do nothing. If I start it from the Windows command line all I get is a blinking cursor. On #2 the mouse cursor keeps circulating (that green circle, I mean) and nothing else happens. Maybe because of the language difference?

Previously I tested the o build on machine #2 on Ubuntu and as I said it worked flawlessly.

phontanka

Posts : 215
Join date : 2012-05-08
Location : Hungary

http://phontanka.wordpress.com

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by leezer3 on Wed Nov 11, 2015 10:20 pm

Hmm, the first thing that comes to mind off the top of my head is your .Net version.
I've specifically bumped the required version to 4.0 *Non-client profile* with this build- This is for both better Mono compatibility, and because Microsoft deprecated Client Profile with 4.5

Depending on what you've installed when, it's possible that you've only got the Client Profile version of .Net 4.

Try installing this:
https://www.microsoft.com/en-gb/download/details.aspx?id=17851

I'll try seeing if I can get a Hungarian Windows 7 box rolled too and see what that gives me.
(Manually starting under Hungarian locale, Windows 8 works just fine)

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 750
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by leezer3 on Thu Nov 12, 2015 1:14 am

This build is another step, and fully implements the scripting with access to all standard OpenBVE variables.

http://www.bvecornwall.co.uk/downloads/beta/OpenBVE_1440p.7z

First off, refer to this example script:
Code:
using OpenBve;
using OpenBveApi.Math;

public class OpenBVEScript
{
    private double time = 0.0;
    private int Aspect = 0;
    private bool ApproachTriggered = false;
    private double DelayTime;
    /// <summary> Call to execute this script </summary>
    /// <param name="Train">A reference to the nearest train</param>
    /// <param name="Position">The object's absolute in world position</param>
    /// <param name="TrackPosition">The object's track position</param>
    /// <param name="SectionIndex"></param>
    /// <param name="IsPartOfTrain">Whether this object forms part of a train</param>
    /// <param name="TimeElapsed">The time elapsed since the previous call to this function</param>
    /// <returns></returns>
    public double ExecuteScript(OpenBve.TrainManager.Train Train, Vector3 Position, double TrackPosition, int SectionIndex, bool IsPartOfTrain, double TimeElapsed)
    {
       
       
        //Elapse the timer
        time += TimeElapsed;
        //Get the aspect of the section
        int SectionAspect = Scripting.Signal.CurrentAspect(Train, SectionIndex, IsPartOfTrain);
        //First, check the aspect of the section
        if(SectionAspect == 0)
        {
            //The section is red, therefore we should return red & reset the timer
            Aspect = 0;
            time = 0.0;
        }
        else
        {
            //The section is not red, so first perform a distance check
            if(ApproachTriggered == false)
            {
                //Get the front axle position of car 0
                double trackDistance = Scripting.Train.trackDistance(Train, TrackPosition);
                if(trackDistance > -200)
                {
                    //We've triggered the approach option
                    //Changing a bool means that if the driver rolls back on getaway, it won't confuse the animation
                    ApproachTriggered = true;
                    //Set the delay time to an appropriate value in seconds, for example 30
                    DelayTime = 5;
                }
                //Reset the timer
                time = 0.0;
                //The aspect should remain red
                Aspect = 0;
            }
            else
            {
                //A simple check- Have we passed the delay time?
                if(time > DelayTime)
                {
                    //Yes- Set the aspect to be returned to the section aspect
                    Aspect = SectionAspect;
                }
                else
                {
                    //The aspect should remain red
                    Aspect = 0;
                }
            }
        }
        return (double)Aspect;
    }
}

A brief explanation of how this works:
What I've done here is to implement a proxy class- OpenBve.Scripting
This holds three further containers-
Signal
Train
Simulation

These containers hold the same essential variables as you can call in a .animated file Smile
What's a little different is that this I've deliberately structured this so that in a future version, a single script instance can be called from multiple places. (At the moment, each script is instanced individually, with no access to others)

Let's take a couple of examples:
Code:
double trackDistance = Scripting.Train.trackDistance(Train, TrackPosition);
This should be relatively obvious Cool
We call the trackDistance function from the Scripting class, and pass it two paramaters; The Train which represents a reference to the train to check, and the TrackPosition of our object.
Both of these are passed in when the script was called from the .animated file, and we just pass them on untouched in this simple example.

Code:
int SectionAspect = Scripting.Signal.CurrentAspect(Train, SectionIndex, IsPartOfTrain);
A little more complex Smile
This method takes three parameters- A reference to a Train, the SectionIndex to get the value for, and a final boolean (True/ false) IsPartOfTrain value as to whether it is part of a train.
Let's break it down a little:
Train and IsPartOfTrain are used when we want to get a signal state relative to a train.
If this is a signal placed using the .SigF command, IsPartOfTrain will be false, and so it gets the value for the absolute section.
On the other hand, if we use this in a train file (For example as part of a panel.animated), it'll give back the signal relative to the train's current section.

**Note**:
The behaviour of SectionAspect described above will be changed imminently, this is just a direct port from the .animated code at present-
It'll change it to a method with two overloads, one taking an absolute section reference, and one taking a train and section reference Smile
Need to think about some logic checking first though, hence why I haven't got quite this far.

For more details, please read the comments in the scripting class for the moment, although it should largely be self-explanatory:
https://github.com/leezer3/OpenBVE/blob/master/openBVE/OpenBve/System/Scripting.cs

Phontanka-
I've got a Hungarian copy of Windows 7 downloaded now, will try and roll a VM tomorrow and have a test. I think the full vs. Client Profile .Net version is likely to be the issue though.

Cheers

Chris Lees

http://www.bvecornwall.co.uk

leezer3

Posts : 750
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by MattD6R on Thu Nov 12, 2015 4:37 am

Interesting work with this, I gave your script a test and using TranslateXScript my object shifted across to the right when the signal section cleared (using my signal/crossing animation file). Using StateFunctionScript or RotateXScript nothing happens if I am doing this right. I get an error of "The attribute RotateXScript is not supported at line 10 in file C:\openbve\openbve Route and Train Content\Railway\Object\BRN\Signals\QldSigs_open\3AspectLed_FeatherL.animated"

I appreciated the work you are doing, with the program working well for me. There are two issues to sort out but they are only minor, that has been mentioned with this being the F10 camera radius, cant and pitch when using F3 not working and it takes input when you switch programs.

MattD6R

Posts : 214
Join date : 2013-06-16
Location : Brisbane, Australia

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by jsiren on Thu Nov 12, 2015 6:09 am

I tried the o build. If I try to reuse my old controls.cfg, with the joystick assignments, I get the following errors upon loading the route:

Unhandled Exception:
System.ArgumentOutOfRangeException: Argument is out of range.
  at OpenTK.Input.KeyboardState.ReadBit (Int32 offset) [0x00000] in :0 
  at OpenTK.Input.KeyboardState.IsKeyDown (Key key) [0x00000] in :0 
  at OpenTK.Input.KeyboardState.get_Item (Key key) [0x00000] in :0 
  at OpenBve.MainLoop.ProcessKeyboard () [0x00000] in :0 
  at OpenBve.OpenBVEGame.OnRenderFrame (OpenTK.FrameEventArgs e) [0x00000] in :0 
  at OpenTK.GameWindow.OnRenderFrameInternal (OpenTK.FrameEventArgs e) [0x00000] in :0 
  at OpenTK.GameWindow.RaiseRenderFrame (Double elapsed, System.Double& timestamp) [0x00000] in :0 
  at OpenTK.GameWindow.DispatchUpdateAndRenderFrame (System.Object sender, System.EventArgs e) [0x00000] in :0 
  at OpenTK.GameWindow.Run (Double updates_per_second, Double frames_per_second) [0x00000] in :0 
  at OpenTK.GameWindow.Run () [0x00000] in :0 
  at OpenBve.MainLoop.StartLoopEx (MainDialogResult result) [0x00000] in :0 
  at OpenBve.Program.Main (System.String[] args) [0x00000] in :0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException: Argument is out of range.
  at OpenTK.Input.KeyboardState.ReadBit (Int32 offset) [0x00000] in :0 
  at OpenTK.Input.KeyboardState.IsKeyDown (Key key) [0x00000] in :0 
  at OpenTK.Input.KeyboardState.get_Item (Key key) [0x00000] in :0 
  at OpenBve.MainLoop.ProcessKeyboard () [0x00000] in :0 
  at OpenBve.OpenBVEGame.OnRenderFrame (OpenTK.FrameEventArgs e) [0x00000] in :0 
  at OpenTK.GameWindow.OnRenderFrameInternal (OpenTK.FrameEventArgs e) [0x00000] in :0 
  at OpenTK.GameWindow.RaiseRenderFrame (Double elapsed, System.Double& timestamp) [0x00000] in :0 
  at OpenTK.GameWindow.DispatchUpdateAndRenderFrame (System.Object sender, System.EventArgs e) [0x00000] in :0 
  at OpenTK.GameWindow.Run (Double updates_per_second, Double frames_per_second) [0x00000] in :0 
  at OpenTK.GameWindow.Run () [0x00000] in :0 
  at OpenBve.MainLoop.StartLoopEx (MainDialogResult result) [0x00000] in :0 
  at OpenBve.Program.Main (System.String[] args) [0x00000] in :0 

Additionally, this comes up every time when exiting:

AL lib: ReleaseALC: 1 device not closed

jsiren

Posts : 106
Join date : 2012-09-16

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by jsiren on Thu Nov 12, 2015 9:44 am

A further test with build p, also unpacked into a new folder.

* The joystick doesn't always get reported in the "customize controls" screen, i.e. the "Attached joysticks" area is empty. It still works as a controller, though.
* If I import the settings file from version 1.4.3, where it works perfectly, most key assignments get messed up. Letter and function keys without modifiers become integers between 200 and 256. When these are either reassigned or removed, the program stops crashing.
* Once the controls have been reassigned, the joystick works in mysterious ways. For example, it becomes impossible to set the reverser to neutral.

jsiren

Posts : 106
Join date : 2012-09-16

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by jsiren on Thu Nov 12, 2015 10:45 am

Some additional testing later...

* The joystick doesn't always get reported in the "customize controls" screen, i.e. the "Attached joysticks" area is empty. It still works as a controller, though. In 1.4.3 it works as expected, and I've been using it as the main controller.
* The reason for not being able to set the reverser to neutral is this: Any toggle controls, when bound to a joystick, repeat very rapidly. This is bad. For example, the SECURITY_S control is used for the DRA in the UK cab, and I have it mapped to a joystick button. It's a toggle control, and if it repeats, it's impossible to turn DRA on or off. As it is, having reverser, door, light, or DRA buttons on a joystick does no good, as trying to control any of these is a game of lottery. All of these work flawlessly with 1.4.3. The plugin is UkTrainSys.dll.
* As far as I can tell, any stock with a 2D cab seems to crash the program. (Same route, same plugin.) Everything I tested works in 1.4.3.

Routes tested:  Birmingham-X-City South (323 2002 0625 Clear) and NWM (12.00 HST Maybank-Hammerwich XP). Stock tested: railsimroutes.net 323 with 3D cab, trainsimcentral HST, Class 60 (these with UkTrainSys.dll), Dexter's CD 163 (with BVEC_ATS.dll).

jsiren

Posts : 106
Join date : 2012-09-16

Back to top Go down

Re: New OpenBVE Build- Testers Please

Post by Sponsored content Today at 10:27 pm


Sponsored content


Back to top Go down

Page 4 of 17 Previous  1, 2, 3, 4, 5 ... 10 ... 17  Next

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum