[PROGRAM] OpenYS - Open Source YSFlight Server!

Note that alterations to the YSFlight .EXE is forbidden
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 »

You're right. In fact I've installed ReSharper into my build of Visual Studio and it's stopping me from making mistakes I'd otherwise not see - for example, ToString() is culture sensitive. I have to catch that. Thankfully, ReSharper warns me when I do something silly like forget to de-localise. I never knew ToString was locale sensitive - this would explain some bugs.

Lots of coding done today, at least 10 hours worth.

First, I finished up the unit conversion library. Then...

Built my .DAT file management library. It's easy to work with and expand if I need, or edit...

Current code test and example using so far:

Code: Select all

var file = new File(@"./TESTING.DAT");
var hasAfterBurner = new AFTBURNR(true);
file.Properties.Add(hasAfterBurner);
//TODO: Need to add save/load code for DAT Files!
//file.Save();
So now the framework is done just need to get in there and manually add each .DAT definition, which is much easier on the eyes now:

Code: Select all

public class AFTBURNR : DAT_Bool
{
    public AFTBURNR(bool value) : base("AFTBURNR", value)
    {
    }
}
Yep, that's all the code I need to write to define how the AFTBURNR dat line works, neat huh?

Another one that's a bit more complex:

Code: Select all

public class EXCAMERA : DAT_DescriptiveOrientation3
{
    public EXCAMERA(string name, Length x, Length y, Length z, Angle h, Angle p, Angle b) : base("EXCAMERA", name,x,y,z,h,p,b)
    {
    }
}
So once I've added all the DAT variables, I'll add .DAT loading/saving code and then run a few test on random dat files to confirm data all loading okay.

More work to come, but we're steaming ahead while producing a fully featured and extendable/reusable library. For example, DATFiles implement the CommandFile class which defines how commands and their parameters are laid out in the file - I can re-use CommandFile for DNM's, SRF's... etc.
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 »

I love me. Going back to work out old code (to fix a few bugs for the CivAv Server ;)) and this. I would have scratched my eyes out trying to work this out otherwise...

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

Bug Fix Version 20161123(2054)

NOTE: DOES NOT EXTEND CURRENT PROJECT THREAD, BUG FIXES FOR 20160302(1613).
(So don't download if you are using the current OYS Versions!)

Changes:
+Try/Catch exception handling around the entire IRC class - it may still break but at least it won't crash the program? I should add that if the error is further down the chain than IRC class, ie in the main program, then the program may still crash...
+Re-Initialised the MetaData objects with blank strings to hopefully overcome the null reference exception errors. Can't make things any worse...

Notes:
Still heaps a bugs, but it should be an improvement.

Download: https://drive.google.com/uc?export=down ... XJMb3h3MEU


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 »

Bug Fix Version 20161123(2054)

NOTE: DOES NOT EXTEND CURRENT PROJECT THREAD, BUG FIXES FOR 20160302(1613).
(So don't download if you are using the current OYS Versions!)

Changes:
+Alternate version of above - this includes a lock around the sender object which without i think may be causing cross-talk of data, causing weird effects including random DC's and server crashes. Hard to tell.

Notes:
Still heaps a bugs, but it should be an improvement.

Download: https://drive.google.com/uc?export=down ... klwOGFaaDg


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 »

I just switched to the alt version. We'll see how it goes. :)
User avatar
Vic Viper
Staff
Staff
Posts: 541
Joined: Thu Feb 24, 2011 7:01 pm
Favorite Aircraft: de Havilland Mosquito
Location: -9° 59' 6.90", -138° 49' 35.51
OS: Windows 2001
Has thanked: 392 times
Been thanked: 199 times
Contact:

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

Post by Vic Viper »

xX_SuperSic58_Xx wrote:Lots of coding done today, at least 10 hours worth.
.....................
Grab yourself a tall pint, or whatever suits your fancy. You deserve it!
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 going to make them give back our past"
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 »

Vic Viper wrote:or whatever suits your fancy.
Well It's not alcohol but I have something in mind. :lol:

Might just take it easy today coding wise, we'll see.
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
Zack
Contributor
Contributor
Posts: 401
Joined: Wed Mar 21, 2012 10:34 pm
Favorite Aircraft: F-16C Fighting Falcon
Location: Northern California/Bay Area
OS: Windows 10
Has thanked: 47 times
Been thanked: 158 times

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

Post by Zack »

haha flake
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 »

A new issue popped up last night. When landing on my giant Elite Carrier, frame rates for everybody on the server take a sudden drop. It goes to 1 fps on my computer as soon as I get inside the hit radius defined by the .dat.That did not happen on the Brazil map last week, though, and it does not happen offline. I thought it could be the updated version of OYS, but when I tried with the March version it still happened. Some details about the carrier: It is a typical aircraft carrier ground object in every way except that it is 3,000m long and formerly had a 1,500m hit radius.

I changed the hit radius to 1m and the problems no longer occur, but there is also no collision if you crash into the carrier now. I consider this an acceptable compromise for now.
xX_SuperSic58_Xx wrote:Lots of coding done today, at least 10 hours worth.
Woah, I just read that. That's a long time. We all appreciate your work on this project. Thanks for what you do. :)
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 »

could you also impliment a way for YSF cllient side admins (whom are loged in as such) to see the IP addresses of the other pilots. client side admins can not perform our duties of kicking offending players with out this critical piece of information.
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 »

I'll make a change tonight to the /listusers command to have that option for all logged in admins. I think the test is if you are using the admin console at the moment.
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 »

Patrick31337 wrote:frame rates for everybody on the server take a sudden drop. It goes to 1 fps on my computer as soon as I get inside the hit radius defined by the .dat.
Hard to tell if this is a OYS issue or YS issue as I've had this issue before. I've read about your HTRADIUS fix though. I think this is because it's a carrier object and they are a bit buggy in the latest YS versions. What is the complexity of the carriers collision file?
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 »

I made the deck one big face without the lines and markings and the "jetway" blocks at the terminal. No radar dishes or swimming pools. I guess I could do away with the roofs on the buildings, too, but it isn't a very complex model. The .dnm is 82 kb, the .srf for the collision model is 37 kb.
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 »

I might have to investigate that one further. But I recall you said there was 666 grounds loaded which is probably not right. Then again it probably is.
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 »

Had another long term idea - Selective packs on login.

When I eventually get a user database working with MySQL (I already gave it a go, it can be done...) I'll let users chose which aircraft lists they want to use on servers. Probably some trickery involving wildcards and aircraft names. Example: DISABLE *; ENABLE B747; would allow the 747 only, ENABLE B747; DISABLE * would disable everything. It's an idea only at this stage - don't hold your breath...
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 »

xX_SuperSic58_Xx wrote:But I recall you said there was 666 grounds loaded which is probably not right. Then again it probably is.
I added one more ground object and now it says it loaded 667 from the map, so I tend to think it was right. :lol:
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 »

Look like this page https://openys.ysfhq.com/ not updated
Download Latest Version
Version 20150227(1339)

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
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 »

I'm still using 20161123(2054)_ALT. I just started getting this message, twice in about 18 hours since I changed maps to the UK map. It closes OYS.
OYS Console Log wrote:20170218(185029): OpenYS Has been terminated with error:
20170218(185029):
20170218(185029): MESSAGE: Object reference not set to an instance of an object. METHOD: Boolean SendPacket(GenericPacket) LINENUMBER: 0 COLUMNNUMBER: 0 STACKTRACE: OpenYS.Client.Connection.SendPacket(GenericPacket OutPacket) OpenYS.Clients.SendPacket(List`1 Clients, GenericPacket InPacket) OpenYS.OpenYS.MicroTick() OpenYS.OpenYS_Server.Program.Run(String[] args)
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 »

I've had a look but honestly that's really hard to narrow down due to my previously poor coding habits. I can tell it's a null exception error but I don't know where, because the PDB thingo isn't working. :/
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
BreekiBoots
Newbie
Newbie
Posts: 28
Joined: Tue Mar 07, 2017 1:16 am
Favorite Aircraft: X-15 / Su-47 / SpaceShipOne
OS: Windows/Linux
Been thanked: 1 time

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

Post by BreekiBoots »

Any ideas on getting clouds to work in OpenYS?
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests