[PROGRAM] OpenYS - Open Source YSFlight Server!

Note that alterations to the YSFlight .EXE is forbidden
User avatar
Barr
Veteran
Veteran
Posts: 1012
Joined: Wed Mar 28, 2012 8:49 pm
Favorite Aircraft: The Boeing 757
Location: Providence, Rhode Island
OS: Windows 10/Gentoo
Has thanked: 272 times
Been thanked: 206 times

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

Post by Barr »

Just a stupid thought that popped in my head but how about making a tray app for the server owners computer instead? Or maybe making it probe the server world as a player and simply records the time between "player took off b747" and "player left the game" messages?
Image
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.
User avatar
Flake
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

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

Post by Flake »

The solution would actually be a hybrid system.

I'll change the way the authentication works to be server sided.

I'll have users just log into the service from their own computer through an internet browser to a web page - eg (not done yet) openys.ysfhq.com/login and they just authenticate with their HQ username and pass there. The php script would grab their IP Address and update the authenticated IP addresses table I'll make (would track IP address logged in from and date logged in. If date > 7 days, re-authenticate. using MANY ip's here allows flexibility of login across many platforms without having to log in over and over...)

Then, when a user connects to OYS, the server will check the database itself against the IP they have logged in as, and if the username and IP match, then they will be authenticated automatically - no client install required. This means stock YSF client connects direct to OYS Server and gets all this extended functionality of score tracking again, provided the user of the client does authenticate with OYS web service first.

I might even code a simple function to check logins periodicly on OYS servers as part of the Macro-Tick (every 10 minutes).

====

Back to work again, but on something different.

I've been told that there exists still some lag in the program. From my past inspections with performance monitoring in VS2012, I've found that the data for each packet is stored as string but frequently converted to byte arrays. This makes no sense and adds additional CPU strain. Instead, data should be in byte format at all times, and converted to strings as required. Consider most YSF packet data is byte data - positions, rotations, damage strengths etc. Using a string make it easy to READ the data on my end, but it doesn't make it easier for the computer. If I DO need to read data for debug and development, I can always incur a bit more lag by just doing .ToDataString() to convert the byte array to a readable string.

So what I've been doing is I've changed the common packet core to use a byte array to store the data structure now, instead of a string, which should reduce CPU load and increase performance! I've done one minor test so far, and there appears to be an improvement.

====

Another thing on my list of things to do is to finally address the core issues of packets and socket lag. I'm finally starting to understand how C# code interacts with sockets on a physical, low level. To get the MOST out of OYS I will NEED to swap to an async system. It's actually easier than I thought, but it uses new variables and approaches I'm not 100% on understanding the flow of yet. Thankfully, it's the sort of system that cannot work at ALL unless it is implemented perfectly, so it'll be hard to put together, but once done, the program should hopefully work better than before.

I've created a temporary "spin off" project on my local PC while I make these changes, just incase things go belly up I can revert back to the old OYS version and try a new approach.

Updates to OYS will be coming, I think, in a few months... I have a lot of uni assignments to do and they are taking a huge chunk of my time right now. I thank you all for your patience as I approach this slowly, carefully and accurately!
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
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

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

Post by Flake »

Okay finally got done with the packet storage conversion, there is a definite improvement from that alone - everything is at least twice as fast now.

I'll have to go over the packets to ensure I haven't screwed up any conversions, but we're looking sweet so far! :D
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: 3955
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1769 times
Been thanked: 1810 times
Contact:

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

Post by Neocon »

Is there any chance you can implement an IP ban?
User avatar
Flake
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

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

Post by Flake »

It was actually on my list of things to do when I implemented the user database.

I might code a simple IP blacklist and whitelist file you can add addresses too manually in the interim?
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: 1485
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 1051 times
Been thanked: 339 times

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

Post by u2fly »

Where I can get latest OpenYS build now?

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”

pic.twitter.com/vkz0gdozVV [archived]
(31 DEC 2016)
User avatar
Doomsday
Staff
Staff
Posts: 880
Joined: Mon Feb 07, 2011 2:01 am
Favorite Aircraft: PEW PEW PEW PEW
Location: PEW PEW PEW
OS: PEW PEW PEW PEW PEW
Has thanked: 1 time
Been thanked: 130 times

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

Post by Doomsday »

u2fly wrote:Where I can get latest OpenYS build now?
You can find a download link in the first post with the latest OpenYS download
Image
PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW PEW

Team Awesome# 131
User avatar
Flake
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

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

Post by Flake »

Now Updated to Version 20160422(1039)[TEST]

Changes:
+Packets are now stored using Byte Arrays instead of strings, increasing program speed and reducing lag.
+Fixed a critical flaw in the flight data packet handling that would cause some flights to just jitter about with no control (being sent own flight data packets)
+Fixed a critical flaw in the "exclude" function in client selection, which was part of the error in the flight data packet bug.
-Removed Nukes

Notes:
~Blacklist/Whitelist hopefully soon. :)
~Could be a metric shit ton of bugs due to the conversion of ALL the packet code to the new system.


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


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: 3955
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1769 times
Been thanked: 1810 times
Contact:

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

Post by Neocon »

Did you intend to only include one file?
User avatar
Flake
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

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

Post by Flake »

Yes, but I just realised that doesn't work since I changed the DLL's... derp.

I've just-reuploaded the whole thing.
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: 1485
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 1051 times
Been thanked: 339 times

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

Post by u2fly »

OfficerFlake wrote:Yes, but I just realised that doesn't work since I changed the DLL's... derp.
I've just-reuploaded the whole thing.
still hope you would make OpenYS ready for use on Linux too... Now I will test it with Mono

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”

pic.twitter.com/vkz0gdozVV [archived]
(31 DEC 2016)
User avatar
Dragon_Mech
Veteran
Veteran
Posts: 571
Joined: Wed Jul 15, 2015 12:18 pm
Favorite Aircraft: F-14, F-15D&E, SR-71, King Air 200, B737
Location: Mansfield, Mo. USA
OS: Windows 7 Ultimate
Has thanked: 94 times
Been thanked: 127 times

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

Post by Dragon_Mech »

you should make a complete manual for OYS. i have no idea how to find out the IP address of players while in the lobby screen. can't kick/ban without that.
Owner, Dragonic Machine Industries
Image
User avatar
Flake
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

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

Post by Flake »

type /Help to get started using the program.

To get IP's, do /ListUsers
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: 3955
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1769 times
Been thanked: 1810 times
Contact:

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

Post by Neocon »

"/help" says to type in "/help commands". "/help commands" doesn't help much. Just typing "/commands" helps a lot. ;)
User avatar
Dragon_Mech
Veteran
Veteran
Posts: 571
Joined: Wed Jul 15, 2015 12:18 pm
Favorite Aircraft: F-14, F-15D&E, SR-71, King Air 200, B737
Location: Mansfield, Mo. USA
OS: Windows 7 Ultimate
Has thanked: 94 times
Been thanked: 127 times

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

Post by Dragon_Mech »

thanks Pat and Flake :)
Owner, Dragonic Machine Industries
Image
User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1485
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 1051 times
Been thanked: 339 times

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

Post by u2fly »

I still think, "is it possible connect YSFlight with other simulators using OpenYS?". And here are some framework examples:
1) https://sourceforge.net/projects/virtualair/
2) https://sourceforge.net/projects/flightgearconne/
Last edited by u2fly on Tue Apr 26, 2016 12:17 am, edited 1 time in total.

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”

pic.twitter.com/vkz0gdozVV [archived]
(31 DEC 2016)
User avatar
Nodoka Hanamura
Veteran
Veteran
Posts: 947
Joined: Thu Apr 07, 2011 8:01 pm
Favorite Aircraft: Su-24, Mig-29, Su-27, F-18, F-15, ADF-01, Icon A5
OS: Windows 10 / Linux
Has thanked: 539 times
Been thanked: 276 times

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

Post by Nodoka Hanamura »

u2fly wrote:I still think, "is it possible connect YSFlight with other simulators using OpenYS?". And here is some framework example:
https://sourceforge.net/projects/virtualair/
It could be done, but the problem is that there are constraints in YSFlight that prohibit this (Mainly custom maps not being compliant with RL locations and the sort.)
Last edited by Nodoka Hanamura on Fri May 20, 2016 12:19 pm, edited 1 time in total.
█████████████████████████████████████████████████████████████████████
Member of YSCE Development Committee - I don't code, I compile.
User avatar
Dragon_Mech
Veteran
Veteran
Posts: 571
Joined: Wed Jul 15, 2015 12:18 pm
Favorite Aircraft: F-14, F-15D&E, SR-71, King Air 200, B737
Location: Mansfield, Mo. USA
OS: Windows 7 Ultimate
Has thanked: 94 times
Been thanked: 127 times

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

Post by Dragon_Mech »

hello Flake.

i have found a new flare issue with your current OYS release. all aircraft are forced to spawn with 20 flares regardless of the default amount set in the dat file.
i don't know if this affects flare pods, but i'll edit this post with the results soon.
--------------------------------------------------------------------------------------------------
EDIT: flare pods are unaffected.
Owner, Dragonic Machine Industries
Image
User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3955
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1769 times
Been thanked: 1810 times
Contact:

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

Post by Neocon »

Here's a new issue. When I run York Valley using the test version of OYS, it refuses to load the ground objects. Other maps don't have this issue. The map has ground objects offline, but online they are not there.
User avatar
kiwiflieger
Contributor
Contributor
Posts: 227
Joined: Thu Mar 27, 2014 7:09 am
Favorite Aircraft: Die Fledermaus
Has thanked: 125 times
Been thanked: 92 times

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

Post by kiwiflieger »

Could I make a suggestion regarding the OpenYS server program? As a fairly experienced game server host, I have to say a timestamp next to console entries is hugely useful in determining the time at which something happened, whether it be for confirming the real time of a chat entry or otherwise. Thanks :)
Currently dormant... playing IL2 Cliffs of Dover
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest