[PROGRAM] OpenYS - Open Source YSFlight Server!
- Flake
- 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!
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.
- Flake
- 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!
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!
- Mobiyus
- 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!
- Flake
- 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!
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.
- Flake
- 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!
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.
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.
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!
- Neocon
- 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!
- Flake
- 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!
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.
- Flake
- 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!
Now to implement it. Hard hats on, we're delving into the unknown.
- Neocon
- 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!
- Flake
- 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!
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.
- iqmal_97
- 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!
Mein Imgur gallery. Feel free to use any of my screenshots (Crediting me is optional, but greatly appreciated)
- Flake
- 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!
- Flake
- 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!
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
- Neocon
- 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!
Ground objects still don't follow motion paths, though?
- Flake
- 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!
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.
- Neocon
- 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!
[PROGRAM] OpenYS - Open Source YSFlight Server!
- Neocon
- 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!
- Neocon
- 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!
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
- Flake
- 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!
Who is online
Users browsing this forum: No registered users and 3 guests