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

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake »

I've looked at the stock YSF Map packet again and compared to Soji's specifications. Sojis email to me said the packet size is 60 INCLUDING the type ID, so the data would be 56 long, but in actuallity it is 60.

Which means the last 4 bytes were undefined causing erratic behaviour as he said it would.

Actually, I think he missed something. Because from bytes 32 forwards, the data is all 0. Anything between 0-32 appears to be just random garbage, which makes sense because in c++ if you don't zero the memory when defining a variable that is what you get - garbage, random left over memory.

So it looks like there was 4 bytes on the end missing and that is what was causing problems.

I've changed the packet size from 56 to 60, but I don't know if this has solved the problem. I tested several times and I couldn't make the glitch happen again, and I also wound back to previous map data packet and I STILL couldn't get it to glitch... Weird.
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 »

Added Motion Path Support - Hoping to now add racing to the servers (would detect when you are near a checkpoint, and when you cycle through the checkpoint list, it will give you a lap time!

Here's a shot I did: Loads the motion path and then places IFF4 ILS's to show it loaded the field correctly. All those crosses on the hud are representations of Motion Path Points! :)

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
Mobiyus
Contributor
Contributor
Posts: 257
Joined: Mon Mar 10, 2014 9:05 pm
Favorite Aircraft: F-18 Hornet
Location: Qc
OS: Win 7 pro
Has thanked: 98 times
Been thanked: 55 times

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Mobiyus »

Oh yea, thank you for this latest development, this speaks to me a lot. Now even more looking forward to the completion of OYS :) Keep up the good work!
[VT-171]Mobiyus
YSRS YS Time Trial YSRSC
imgur YS Flight Album
Dorm room 2254
PSN
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 »

Racking my brain on how to approach implementing racing.

I want to make it in-exploitable if I can.

Thinking of using point distance calculation and running a check-list of "reached point A, reached point B..." based on vehicle position per tick update. (1/10th of a second).

So I say "need to reach point A. Get the vehicles position - It's within xxxx meters of point A. okay, now need to reach point B... not within distance, wait till next step and check.

This stops users from bypassing the circuit and taking shortcuts.

I've been debating using point-line-distance equations and line segment intersections to have EXACT split timing but I think I will pass on that...

This is one of those things that is very simple to do but there are a million different ways of doing it and only one real RIGHT way of doing it.

I'll edit the post in a sec and throw up some pictures.
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 so split timing detection:

Image

Basically I'm checking if the vehicle crosses a line from the previous measurement and now. If so, determine the exact time the line was crossed.

THIS is what will make the program work!

Now of course, it will have to be calculated as a line crossing a perpendicular plane for 3d calculation... And only if the position is within the width of the detectors (so can't cross anywhere else in the plane...)

---

And here is checkpoint timing.

Image

Checkpoint timing is flawed in that it's very hard to measure the exact point the checkpoint was passed so you only get approximate times. Also if there is lag, and the points are close together, then perhaps it won't trigger. The solution is to get the distance between this and last position update, say it's 20 meters, and use 20m then as the means test for passing the checkpoints. if the checkpoint STILL isn't touched with that margin, you can be sure it wasn't touched! That said, it would need to be gradiented and etc. so it's pretty useless.

So checkpoint method will be used for things like specific courses you have to follow (and spaced well apart) - it's otherwise crap.

---

passing a split in 3D.

Image

So the idea would be to have the user fly a plane on the server, mark the split lines, and that is saved to a race track file in the "./Scenery/<SCENERYNAME>/" folder. Then OYS loads that, and when the user crosses the start line, and then crosses the first split (in the same vehicle in the same flight! it would register a time, then onto split 2... then 3... so on, until there are no more splits and then the user has to come back to the start line.

It's clean, it's anti-hax, it's fast. It's good. In fact, if I tie this with the checkpoint method, users could "crash" and respawn on the track/air near where they messed up.

So as I said, lots of planning involved in this! complex stuff!
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 »

That looks great. Will the detection only be horizontal, or will altitude in relation to the point be measured as well?
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 »

3d space. The measured plane will the perpendicular to the ray passing through it. So that covers all 3 axis, including vertical so yes, possible to do courses that run through the air.

Think of a ray passing through or relative near a point. make a 2d plane passing through that point, that when the ray hit it, it is 90 degrees. Then measure the distance from the impact point to the origin and that's how I will be testing. Because the initial point is 3D, as is the ray vector, it works.

Sorry, I know this is way other most peoples heads - this is mostly for me to understand as it is the next big step for the program. And it is VERY important I take time to look at and consider all flaws to make it the most efficient and free it from possible complications later.

By the way - haven't forgotton about PvE (ground combat) either - I had a look at the ground object dat files for AAA/SAM's the other day and I think I shall be able to implement in the future with somewhat ease.
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 so I slept on it - It's just a simple point line distance formula but in 3 dimensions for the plane intercept - remember from high school how a point line intercept is always 90 degrees? geometrically speaking, it's same for 3 dimensions too! That gives me the equivilent of intercepting a perpendicular plane, then measuring the distance between the two. Easy, right?

Now to implement it. Hard hats on, we're delving into the unknown.
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 »

Unknown? This is Stargate-level science babble. This sounds like a conversation between Samantha Carter and Rodney McKay! Please continue. I miss Stargate.
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 »

Done... And it is amazing! :)

Tolerance of speed in meters per second divided by the difference in timespans, with a minimum of 5 * HTRadius. Works a treat.

In fact I've done up a little video of a demo race around HonolluluPath on stock Hawaii - waiting for it to render and upload. Just need to clean up and make functional now.
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
iqmal_97
Senior Veteran
Senior Veteran
Posts: 1778
Joined: Fri Mar 11, 2011 8:47 am
Favorite Aircraft: Sukhoi Su-30MKM
Location: Somewhere in Asia
OS: Windows 10
Has thanked: 856 times
Been thanked: 194 times
Contact:

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by iqmal_97 »

Image
Image
[N007HA]Nynaiqmal_97 <= My usual online callsign
Mein Imgur gallery. Feel free to use any of my screenshots (Crediting me is optional, but greatly appreciated)
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 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 20150514(2303)

Changes:
+
Racing Support for YSF - supports 3 Dimensions. More features to be added later.
~~~~ Use Motion Paths with ID number of 15
~~~~ Your Motion Paths MUST have a Name (Tag)
So many other little things - see @OpenYSProject on twitter for details.

Notes:
~First "Stable" release since restructuring - Racing may be buggy but program should be okay again.

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


Last edited by Flake on Tue Sep 01, 2015 1:06 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
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've got it running. All the older things seem to work, at least. :)

Ground objects still don't follow motion paths, though?
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 »

No that's not implemented yet - I've only loaded paths for racing at this stage.

I need to do the leg work on ground object "flight" data yet. I don't know how to move gorund objects, or to remove them. That's important and entirely needed for moving objects.

It's like this:

1) I need to sniff ground packets.
2) I need to work out what everything is.
3) I need to make my own (probably implement AAA/SAM at this point)
4) add grounds to motion path.
5) ???
6) profit.

PvE was next on the list anyway.
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 »

Oops. I missed the /sequencer.restart command to make a sequencers repeat. :oops:
Deleted User 2433

[PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Deleted User 2433 »

just curious, does this server have mid air refueling like the WW3 server?
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've not tested it on the newer versions, but before the restructure, refueling worked.
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've been playing with OYS and my day/night sequencer. The sky will turn orange in the evenings, then black for night with a very dim fog line. In the morning the fog line gets brighter, then it's back to daylight.

But then I noticed that OYS doesn't read /skycolor and /fogcolor from the sequencer. :(

EDIT: I also found that using the /skycolor or /fogcolor commands only works for clients that are logged in when the commands are sent. Even though I was logged in when I changed the color, when I logged off and back into the server, the sky color returned to default. I suggest having OYS remember the most recent fog or sky color and send it to clients when they join the server.

Code: Select all

/Say The server is about to be refreshed.  The server will remain online!
/sleep 2500
/say You will not be kicked from the server.  Ground objects will respawn.
/sleep 2500
/say DON'T PANIC!!!
/sleep 5000
/say 3
/sleep 1000
/say 2
/sleep 1000
/say 1
/sleep 1000
/say ...
/Day
/skycolor 100 100 250
/fogcolor 110 110 120
/wind 12004kts
/fog 7500
/revivegrounds
/vw on
/say The server has been refreshed.  Ground objects have been revived.  Carry on.
/sleep 10740000
/skycolor 200 150 100
/fogcolor 110 110 120
/say The day nears its end.  Night will soon begin.
/sleep 60000
/night
/skycolor 0 0 0
/fogcolor 20 20 30
/vw off
/wind 00000kts
/fog 20000
/revivegrounds
/say The night is calm and clear.  Ground Objects have been revived.  Carry on.
/sleep 3527000
/say Every night has its dawn.  Day will soon begin.
/fogcolor 30 30 60
/sleep 60000
/sequencer.restart

REM Time with day: 10800000 - 210 minutes - 3.5 hours
REM Time with night: 3600000 - 30 minutes - .5 hours
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 - I've actually done all this but it's in very early beta trials - let me look at it some more as OYS progresses.
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 3 guests