[PROGRAM] OpenYS - Open Source YSFlight Server!

Note that alterations to the YSFlight .EXE is forbidden
User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Thu Dec 10, 2015 1:14 pm

NightRaven wrote:Flake, if it is at all possible, can you fix the serverlist compatibility with OYS?
Worked on it a bit more - turns out that I don't handle any messages from the serverlist_bot at all due to the login process no longer being threaded... so I've got around this by sending the relevent packets as part of the login process. I am now force-sending the weather and the userlist to the bot - i just checked and appears to be showing userlist - weather not 100% sure on...?
u2fly wrote:@OfficerFlake, can you make github repo for OpenYS?
I tried once apon a time to use github - I don't know what I'm doing...

Honestly though this current system works fine for the purpose - not being worked on by millions of people and you can always get the source for any release version from that post.
NajmiCreative wrote:having problem on one of the .dll's......
but it really exists in the libraries file....
any idea to solve it?
No kidding! Can I ask you what country you are from? This is probably a localisation issue.

I set the path search folder to be "./Libraries" but I don't know if that works in every country...?

For you I will add verbose debugging below that error message for the next version.

---

Fixed bug in HTML log - HTML Logs are no correctly showing ALL characters and messages - needed to encode the message in as HTML friendly (All that ", & etc. stuff.)

Removed some error logging - Data Send/Receive failures due to: ObjectDisposed, SocketShutdown, ConnectionTerminated etc. are all no longer sent to the ErrorLog as it just clogs the log up. The REASON disconnect() was called is still visible in the WarningLog though. Other unexplained errors that may crash the connection SPECIFICALLY OTHER than the exceptions I just mentioned will still be sent to error logs though.

Fixed a race condition - where vehicles were de-allocated from a client, but still left in the list for a few microseconds until the thread go up to that point, the vehicle clean up check would say "lost vehicle" and fix it. Vehicle now removed from vehicle list before it is removed from the user.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Thu Dec 10, 2015 1:47 pm

Now Updated to Version 20151211(0037)

Changes:
+All sorts of little changes... See above post for details.
-Removed Nukes

Notes:
Also made a change to how the server time is loaded (Settings->Ticks). If the timing functions screw up you know who to blame - That said I did just do a test run through the full 24h spectrum.

Download: https://www.mediafire.com/?mtkgtbloeaf6nt9


I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
NajmiCreative
Modding Team
Modding Team
Posts: 782
Joined: Thu Sep 04, 2014 9:14 am
Favorite Aircraft: MiG-29N,SU-30 MKM
Location: Shah Alam,Selangor,Malaysia
OS: Windows 10 Home
Has thanked: 516 times
Been thanked: 500 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by NajmiCreative » Fri Dec 11, 2015 1:07 am

forgot to mention that the dll file which didn't load in the Server and Client version was the Development Utilities dll
and I'm from Malaysia same as iqmal and Greenhorn....
My official website
My Twitter NOTE:All my rework model are allowed for repaint and need to credit on publish..no need to PM me anymore
[align=center]for modifications on my mods,please PM me first,and credit me and original creator(if my work were rework)[/align]

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Fri Dec 11, 2015 2:13 am

Try the latest version and show me the console output would you? :)
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3846
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1615 times
Been thanked: 1729 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Fri Dec 11, 2015 7:34 am

I've had the new version of OYS running for about 17 hours and it still hasn't produced an Error Log.

I did get a couple of these (one from someone using the name "username" and one from TFan.

Code: Select all

20151210(212029): Disconnect() Reason: SocketDataReceiver Not able to get the Size of the Packet? (Received 0 Data.)
20151210(212029): EndOfIOLoop: GearedTFan
The console log shows that TFan left the plane at the same time as leaving the server. When I tested to see what would happen if I closed YS while in the air, it didn't show me leaving the plane first and didn't leave a warning message.

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Fri Dec 11, 2015 8:34 am

All intentional and working as normal.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
NajmiCreative
Modding Team
Modding Team
Posts: 782
Joined: Thu Sep 04, 2014 9:14 am
Favorite Aircraft: MiG-29N,SU-30 MKM
Location: Shah Alam,Selangor,Malaysia
OS: Windows 10 Home
Has thanked: 516 times
Been thanked: 500 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by NajmiCreative » Fri Dec 11, 2015 10:42 am

Image
yet,it happened again...
and I guess it the same error like I mentioned few pages ago (see page.25)
or my .Net Framework were outdated?
My official website
My Twitter NOTE:All my rework model are allowed for repaint and need to credit on publish..no need to PM me anymore
[align=center]for modifications on my mods,please PM me first,and credit me and original creator(if my work were rework)[/align]

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Fri Dec 11, 2015 1:55 pm

Not your fault at all.

Okay need to go to properties of all dlls and unblock them, that generally solves. I will see if I can fix this issue permanently.

Vic Viper this may also be the same issue you are having. Try it out, see if you get the same
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
Vic Viper
Staff
Staff
Posts: 515
Joined: Thu Feb 24, 2011 7:01 pm
Favorite Aircraft: F-22A Raptor
Location: -9° 59' 6.90", -138° 49' 35.51
OS: Fail10PremiumEdition
Has thanked: 323 times
Been thanked: 185 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Vic Viper » Fri Dec 11, 2015 2:54 pm

:D I'm all smiles. Confirmed working on Windows 7 and Windows 10! Thanks mate
Image
VFA-49 FORUM

"Why are we still here? Just to suffer? Every night, I can feel my leg... and my arm... even my fingers. The body I've lost... the comrades I've lost... won't stop hurting... It's like they're all still there. You feel it, too, don't you? I'm gonna make them give back our past"

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Sat Dec 12, 2015 12:21 am

Glad to hear it!

It's funny - This problem is entirely an issue with .Net 4.0. They changed the way permissions work from Net 3.5 to Net 4.0, realised it was a bad idea and change it again to something more reasonable in .Net 4.5+ :lol:

I can rapidly fix in one line using an App.Config.XML file but I don't want that crap cluttering the release folder - I think I can set this in the project configuration though so I'll try that when I get a change to have a looksie at it. I'll find a way people, I always do.

---

I have noticed a slight increase in PING lag using ConcurrentQueue packets - It is possible just my code however, I'll have a look over it. I've seen ConcurrentQueue used in fcraft source, (which is what inspired me to make OYS) and it works fine there, I'll have another look and compare my code with fragma's, hopefully I can streamline a bit more. The lag is relatively minor though.

---

I'm also trying to find a way to creatively use vanilla packets as "PING" Packets. I think if I send a "remove aircraft" packet which is just the packet code, and an ID tag, for an aircraft that never existed, YSF responds with an acknowledge code of 2, aircraft ID. I could use this for example, to send a "remove aircraft 100,001 and get the response 2, 100,001. Calculate the time it took to get the reply, divide by two (one way trip) and there's the ping. Of course these things never work so easily and I'm sure YSF will throw a hissy fit if I try this.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

NightRaven
Senior Veteran
Senior Veteran
Posts: 1848
Joined: Tue Feb 07, 2012 10:00 am
Favorite Aircraft: .
OS: windoze 10 64-bit
Has thanked: 548 times
Been thanked: 611 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by NightRaven » Sun Dec 13, 2015 1:48 am

Apparently OYS crashes if the xlsx file is already open in another program, such as Excel.
I agree with Pat on this one, why fix it if it ain't broken? :|
Associated error logs:
Attachments
20151213.zip
(15.31 KiB) Downloaded 58 times

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3846
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1615 times
Been thanked: 1729 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Sun Dec 13, 2015 2:00 am

NightRaven wrote:I agree with Pat on this one, why fix it if it ain't broken?
Actually, I've grown to like the new format now that Flake has made an editor. It's easier to modify the entries, in my opinion.

I've not had any issues with it crashing while using the settings editor...yet. ;)

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Sun Dec 13, 2015 10:28 am

Because it's too hard to manage.

---

Here's how racing works at the moment:

Each flight packet has a time stamp. What I do is I measure the position of the aircraft in each timestamp. I then compare the two: Packet A, and Packet B. Say Packet A has a timestamp of 5 seconds and received at server time of 100 seconds. Packet B has a time stamp of 10 seconds and received at a server time of 107 seconds.

Now with these two packets, the aircraft has crossed a checkpoint (The line from the positions in A->B passes through a checkpoint). So with this I could run a timer internally and wait for the user to cross the checkpoint...

With the lag there is 2 seconds added to the lap time if using a serverside stopwatch timer. So I don't use a timer, I use the following:

I measure the distance of line A->B (lets say 20 meters/yards). I then find the point on A->B that the checkpoint was passed (C) (10m). I then measure the distance from A->C and express that as a fraction of A->B: 10%, 20%... 90%... of the way along the line was the intersection.

In this case, let's say that C was 10m of the way along A and B...

The ratio of intersection is 10 (intersection) / 20 (distance from A->B) = 0.5

Finally, I apply that ratio: Time passed C = A Timestamp + (Ratio) * (B Timestamp - A Timestamp).

So Timestamp C = 5 + 0.5 * (10-5) = 5 + 0.5 * 5 = 5 + 2.5 = 7.5

So regardless of lag I know at what timestamps the user crosses the lines.

Also work noting that the initial time crossing the first checkpoint is a float timestamp: the same as the first packet, and I keep a record of that every lap. So I can tell exactly, without lag, what your laptime is when you pass the finish line.

There is no "server sees" trickery; What you see is what the server sees within 99% confidence.

With this in mind, yes, we can know who "won" the race without lag.

---

In future:

Spawn vehicles on the grid,
Countdown the lights - if there is any velocity in a flight data packet, that's a jump start and issue a penalty to that user.
when the lights are off, start measuring the lap time... initial start time will be the last flight data timestamp at the time the lights went out.
Check checkpoint intersections as normal, calculate split times etc. as above.
Increment lap counts as normal, up to the number of laps limit.
At the end of each lap, positions to be calculated on the cumulative time from start to end of lap, so even though there may be lag and can't visually see who's winning, the users with the lowest times will be at the front of the score sheets.
When race is finished, order all the races by lowest time, show results!

There is not too much work involved in fixing this. I think racing is crashing because it's using very old code - last time I updated it was many many many months ago.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
C P
Contributor
Contributor
Posts: 102
Joined: Fri May 24, 2013 12:17 pm
Favorite Aircraft: F-18E SuperHornet
Location: Syracuse, NY
OS: WIN10 8CORE/4GHZ/16G
Has thanked: 22 times
Been thanked: 25 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by C P » Sun Dec 20, 2015 9:00 pm

OfficerFlake wrote:Manually in the settings.
Dragon_Mech wrote:are you saying that i could chat with someone who is flying in an OYS server with an IRC client?
Yes, as long as the OYS server is linked to an IRC Server.
Hey, to you 14 sleeping servers and 2 other active server ops;
Can we get some more servers linked with Patrick and I, at least for a test?
...and at best for a really cool experience of mass comm!

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3846
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1615 times
Been thanked: 1729 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Sun Dec 20, 2015 11:08 pm

It is great fun when you are flying on one server on one map while talking to someone on another server in a completely different map.

Buddy: "Yeah, guy. I'm landing at Turbot."

Guy: "Woah. I'm taking off from Hilo, and I'm not your guy, buddy!"

Guy slaps Buddy around a bit with a large trout.

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Mon Dec 21, 2015 2:25 am

I'm not your guy, friend!
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
C P
Contributor
Contributor
Posts: 102
Joined: Fri May 24, 2013 12:17 pm
Favorite Aircraft: F-18E SuperHornet
Location: Syracuse, NY
OS: WIN10 8CORE/4GHZ/16G
Has thanked: 22 times
Been thanked: 25 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by C P » Mon Dec 21, 2015 4:55 am

Patrick31337 wrote:It is great fun when you are flying on one server on one map while talking to someone on another server in a completely different map.

Buddy: "Yeah, guy. I'm landing at Turbot."

Guy: "Woah. I'm taking off from Hilo, and I'm not your guy, buddy!"

Guy slaps Buddy around a bit with a large trout.
Patrick: I can't tell if you're being sarcastic. Do you want me to turn off [IRC]?

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Mon Dec 21, 2015 5:41 am

I think he's havin' a giggle.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1283
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 770 times
Been thanked: 282 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by u2fly » Mon Dec 21, 2015 5:55 am

There is an idea how make more sounds effects for YSFlight/OpenYS, using MilkyTracker (with few tricks it can use data from network protocol to control volume of sound and mix/play many sound tracks in WAV format at same time).
All you need is to convert some specific data from network protocol/log (location of aircraft or any other data) to MIDI input commands to controll MilkyTracker (reed more "MIDI over TCP", "RTP-MIDI").
--
If you interested, I imaginate how make different sounds for different aircraft, loud sound for nearest wingmans, and cross flight effect sound over head like on real airshow.
--
MilkyTracker is small open source music tracker, with very low memory usage, already ported to many different platforms.
http://milkytracker.org
--
/!\ READ YSFLIGHT HANDBOOK (online + PDF) | updated 2019/04/25

U.S. Senator John McCain wrote:
“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost - we stand w/ them in their fight against #Putin's aggression”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3846
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1615 times
Been thanked: 1729 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Mon Dec 21, 2015 6:19 am

C P wrote:Patrick: I can't tell if you're being sarcastic. Do you want me to turn off [IRC]?
I wasn't being sarcastic at all. What ever could have made you think such a thing?

^Also not being sarcastic. Absolutely serious.

No, really. I think all servers should connect to the OpenYS channel on IRC. It's great fun.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest