[PROGRAM] OpenYS - Open Source YSFlight Server!

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

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

Post by Flake » Wed Nov 23, 2016 9:04 am

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.

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

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

Post by Flake » Wed Nov 23, 2016 9:23 am

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

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

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

Post by Flake » Wed Nov 23, 2016 10:05 am

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



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

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

Post by Flake » Wed Nov 23, 2016 10:15 am

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



User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3769
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1557 times
Been thanked: 1670 times
Contact:

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

Post by Neocon » Wed Nov 23, 2016 12:55 pm

I just switched to the alt version. We'll see how it goes. :)

User avatar
Vic Viper
Staff
Staff
Posts: 500
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: 303 times
Been thanked: 184 times
Contact:

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

Post by Vic Viper » Wed Nov 23, 2016 1:37 pm

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 gonna make them give back our past"

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

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

Post by Flake » Wed Nov 23, 2016 8:20 pm

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.

User avatar
Zack
Contributor
Contributor
Posts: 396
Joined: Wed Mar 21, 2012 10:34 pm
Favorite Aircraft: F-16C Fighting Falcon
Location: Northern California/Bay Area
OS: Windows 10
Has thanked: 43 times
Been thanked: 155 times

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

Post by Zack » Wed Nov 23, 2016 8:24 pm

haha flake
Image

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3769
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1557 times
Been thanked: 1670 times
Contact:

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

Post by Neocon » Thu Nov 24, 2016 3:19 pm

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: 93 times
Been thanked: 127 times

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

Post by Dragon_Mech » Thu Nov 24, 2016 4:46 pm

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
Core Staff
Core Staff
Posts: 4280
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 820 times
Been thanked: 1171 times
Contact:

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

Post by Flake » Fri Nov 25, 2016 4:50 am

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.

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

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

Post by Flake » Fri Nov 25, 2016 4:55 am

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?

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3769
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1557 times
Been thanked: 1670 times
Contact:

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

Post by Neocon » Fri Nov 25, 2016 5:02 am

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
Core Staff
Core Staff
Posts: 4280
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 820 times
Been thanked: 1171 times
Contact:

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

Post by Flake » Fri Nov 25, 2016 5:29 am

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.

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

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

Post by Flake » Fri Nov 25, 2016 5:32 am

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

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3769
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1557 times
Been thanked: 1670 times
Contact:

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

Post by Neocon » Fri Nov 25, 2016 6:10 am

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: 1203
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 687 times
Been thanked: 269 times
Contact:

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

Post by u2fly » Mon Dec 26, 2016 9:44 am

Look like this page https://openys.ysfhq.com/ not updated
Download Latest Version
Version 20150227(1339)
/!\ READ YSFLIGHT HANDBOOK (.PDF) | updated 2017/05/03

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: 3769
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1557 times
Been thanked: 1670 times
Contact:

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

Post by Neocon » Sun Feb 19, 2017 2:37 am

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
Core Staff
Core Staff
Posts: 4280
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 820 times
Been thanked: 1171 times
Contact:

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

Post by Flake » Mon Feb 20, 2017 11:56 am

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. :/

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 » Thu Mar 16, 2017 2:52 am

Any ideas on getting clouds to work in OpenYS?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest