[PROGRAM] OpenYS - Open Source YSFlight Server!

Note that alterations to the YSFlight .EXE is forbidden
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: 1770 times
Been thanked: 1810 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon »

I used OYS for CFN. For the first 45 minutes, with three of us online, everything went fine. Then it started using up memory. That caused some major lag. I got clearance to land, and about the time I touched down Speky asked if I needed to change runways. Long story short, What they were seeing of me was delayed by about 3 minutes, so they didn't see me land until 3 minutes after I was on the ground! It was great fun until OYS finally kicked us all out.

There's probably a memory leak somewhere.
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:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake »

I was working with VNAF on the project earlier this month actually and noticed that Asynchronous Sending is worse then Synchronous sending - the more people you have online, the worse Asynch gets.

So I reverted the code to Synchronous sending and it works better. There's much to be done though.

Thanks for your feedback! I hope you guys all had fun with the Civ night. Thanks for supporting the project!

I may restructure the threading mechanism to have "time to live" attached to the threads lists... Is the thread goes over say, 30 seconds, the thread will be killed immediately (unless it's meant to do that.)
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:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake »

Exciting history was made today - I've mapped the "ordinance spawned" packet - the one that tells YS a missile, bomb, agm, or even flare is created.

I can now launch bombs from the gun cannon for example (in fact I've already done so, it was HILARIOUS!).

I also want to make flare "fireworks" - spawns one flare, once it reaches it's peak hight, it creates a star of other flares from the "fizzle out" point.

I surprisingly have a decent amount of control of the ordinance! Neat!

And for my next trick, I will aim to fix the networking stability fundamentals that is causing OYS to force clients to DC. I'll need peoples help on this one though! so I'll first start proper logging and analysis of all DC's made and WHY they were made, then I'll run a public server to check all 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!
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: 1770 times
Been thanked: 1810 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon »

The two biggest problems I've seen are the disconnection problems where it will kick most or all of the clients, and the memory problem. I think the memory usage might be related to old and new versions of YSF being connected at the same time, but I really have no idea. I left OYS running overnight with Guam to SoCal and the memory stayed low and nobody logged in. Whatever is using the memory has to involve clients being connected, I guess.
User avatar
Dragon029
Veteran
Veteran
Posts: 601
Joined: Sun Feb 06, 2011 6:09 am
Favorite Aircraft: F-35A
Location: Australia
Has thanked: 42 times
Been thanked: 85 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Dragon029 »

OfficerFlake wrote:Exciting history was made today - I've mapped the "ordinance spawned" packet - the one that tells YS a missile, bomb, agm, or even flare is created.

I can now launch bombs from the gun cannon for example (in fact I've already done so, it was HILARIOUS!).
We need vidyas ASAP

Is it possible for you to modify the airspeed or other properties of ordinance?
Per Ardua Ad Astra
>>> Dragon Addon Pack <<<
(PAK-FA, F/A-52, F/A-36, MQ-21)
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:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake »

Yep. I can change spawn speed, max velocity. Position and orientation, ordinance type, durationse sender Id...
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
Dragon029
Veteran
Veteran
Posts: 601
Joined: Sun Feb 06, 2011 6:09 am
Favorite Aircraft: F-35A
Location: Australia
Has thanked: 42 times
Been thanked: 85 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Dragon029 »

I know you're working on a fair bit (and this would probably come under your existing WIP), but any chance of having a trainer / plugin that reads extra / custom weapon data from an aircraft's .dat (stored within some commented-out section)? :mrgreen:

But yeah, this obviously opens up a ton of opportunity for things like realistic missiles, guided bombs (if you can get rid of the smoke effect of the AGM), laser weapons, etc.
Per Ardua Ad Astra
>>> Dragon Addon Pack <<<
(PAK-FA, F/A-52, F/A-36, MQ-21)
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 »

Dragon029 wrote:I know you're working on a fair bit (and this would probably come under your existing WIP), but any chance of having a trainer / plugin that reads extra / custom weapon data from an aircraft's .dat (stored within some commented-out section)? :mrgreen:
This is part of the plan! Once I stablise OpenYS and complete the mapping of the YS Protocal, I'll extend server functions! - so aircraft can be modded to have special permissions, for example. Full details when I finally get around to that.

By the way, I have mapped like, 80% of the YSFlight online protocol now. Soon, I'll do the damage packets, and ground object data packet (like flight data packet, but for a ground object). Then the other stuff is really just not even needed. (score reporting, for example)

OYS has been without ground combat for too long (which is what makes YSF fun when alone/with a team)
Last edited by Flake on Sun Sep 06, 2015 3:49 pm, edited 1 time in total.
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:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake »

Hi all - an update on this.

Their are two major issues with OYS at current stopping further advancement.

1 - The socket structure causing the program to lag behind and use massive ammounts of memory.
2 - The threading structure causing the program to use too many threads and lag to a halt.

These are solvable without destorying the project and restarting it thanks to my recent upgrades to the source code - I only have to re-write the sending/receiving and processing allocators.

However, the flaws are a design flaw. I DO need to use Async sending but not in the method I tried - I can't create my own managed threads and send that way, I need the operating system to do it for me by using callbacks - something I've never used before, so I will have to learn that.

The thread allocation should be tied with that solution.

I'll be doing some research on the asynch sockets with callbacks to make this work - I am told by stack over flow that these socket structures work fine with MMO's with little lag - up to 5000 players! (YSF will never have that many!)

Leave it with me! I haven't forgotton about OYS, but yes, now you know why nothing has happened for a while.
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: 1770 times
Been thanked: 1810 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon »

OfficerFlake wrote:[post]88579[/post] I haven't forgotton about OYS, but yes, now you know why nothing has happened for a while.
Thanks for the update!
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:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake »

Finally implemented the advanced sun-fading I wanted to do, as well as a standardised timing system for the server.

Merging threads into the core thread now to take the load off system resources - less threads, less locks, less lag!

Please enjoy this delicious beverage!

[youtube]https://www.youtube.com/watch?v=sZEtCxBv-Ao[/youtube]
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
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

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Barr »

Aww yeah

Now the time it takes to change from sunset,night, sunrise, day etc adjustable or is it fixed for now?
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:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake »

The day length can be adjusted - the amount of time it takes for sunrise etc. to happen during the day is not - Sunrise/sunset takes 2 in game hours.
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:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake »

Okay I've re-done how the sockets work - now there is only one thread for all the incoming data to be processed on - this should stop lockups.

Tested okay on local host but I'm wanting people to check over the network - I have seen socket errors in the console so perhaps I'll need to work that out more gracefully later!
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 »

Now Updated to Version 20150726(1630)

Changes:
+MASSIVE Update to many components of OYS
+Server time uses a tick based system - the environment can now be any time of a 24hr day.
+Environment changes color based on time of day. (2015 YSF+)
+Socket structure massively revamped, hopefully less lag. appears very stable so far. maybe a few more issues to solve.
+Bombs from gun novelty.
-Removed Nukes

Notes:
~Very major updates to code - minor bugs but server stability should be increased. Threads reduced dramatically.
~Pretty please test this version - let me know how your server experience goes!

Download: https://www.mediafire.com/?22tyn9d5f7p8tt5


Last edited by Flake on Tue Sep 01, 2015 1:09 pm, edited 1 time in total.
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!
Deleted User 1872

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Deleted User 1872 »

OfficerFlake wrote: MASSIVE Update to many components of OYS

Socket structure massively revamped, hopefully less lag. appears very stable so far.

minor bugs but server stability should be increased. Threads reduced dramatically.
One big yes to you, my friend. :D

Image
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:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by C P »

OfficerFlake wrote:[post]88871[/post] let me know how your server experience goes!
Won't start server for me here. Says need to enable LoadFromRemoteSourcesSwitch in .NET?
Old version starts fine 201550227(1339).
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: 1770 times
Been thanked: 1810 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon »

I have it running on my end. It caused a buffer overrun the first time I started it up, but I think that was a PC problem. OYS seems to be running fine on a 48 minute day/night cycle. I was able to connect from the 2013 version of YSF, without the color changes, of course. The 2015 version of YSF has the color changes, and they look amazing! Nice work. I will monitor memory use through the day.
User avatar
Bombcat
Staff
Staff
Posts: 935
Joined: Thu Feb 03, 2011 3:08 am
Favorite Aircraft: F-14D Tomcat
Location: Virginia
OS: Windows 7
Has thanked: 139 times
Been thanked: 139 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Bombcat »

Flake, I received the following error when trying to run the latest update of OYS on a server running Windows Server 2012 R2. I was using the latest official 2015 release of YSFlight.

Image
[CAG171]Bombcat, Commander, Air Wing 171
Team Awesome # 23
YSFHQ administrator.
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:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake »

Hi Bombat! Looks like it's struggling to find the dll libraries. I'll try simulating your setup to see what I find.

The resource switch thing... U wot m8? Try reinstalling .Net

Thanks for the feedback pat! I hope it serves you well!
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!
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests