Grun Communications Public Release - Communications with Dr. Soji Yamakawa

YSFlight general discussion & everything in between
Post Reply
User avatar
Nodoka Hanamura
Veteran
Veteran
Posts: 923
Joined: Thu Apr 07, 2011 8:01 pm
Favorite Aircraft: Su-24, Mig-29, Su-27, F-18, F-15, ADF-01, Icon A5
Has thanked: 513 times
Been thanked: 266 times

Grun Communications Public Release - Communications with Dr. Soji Yamakawa

Post by Nodoka Hanamura » Thu Jun 23, 2016 6:21 am

For the sake of transparency and assisting in the resolution of the YSFlight Floating Point Bug, I have decided to make public my Email to Soji Yamakawa.

The Email Contents are as Follows:
from: Nodoka Hanamura <redacted>
to: [email protected][obfuscated for spam reasons]
date: Wed, Jun 22, 2016 at 10:45 AM
subject: YSFlight - Floating Point Scenery Issue
mailed-by: gmail.com

Dr. Yamakawa,

Hello, I don't believe i've introduced myself - I'm commonly known by my online Alias of Nodoka Hanamura. I am a long time user of YSFlight and member of it's community. For years i've seen nothing but potential from this program - and aspire to, through the projects of the YSFlight Organization "Grun Solutions", a Multi-prospect group based out of the YSFlight Community Forum "YSFHQ".

Recently - a question was posed by members of the site - namely how YSFlight Scenery is technically limited by the way it's programmed. You can read the thread if you wish:

viewtopic.php?f=285&t=8625

This didn't take looking into the source code - Which as you should be aware - we respect your wishes to not involve ourselves with the source code until you officially release it - but those of us who have experience with Coding and CompSci (OfficerFlake (Who made OpenYS), mrmofumofu, waspe, and to a extreme, me - who has a basic understanding of Computer Science.) were able to decipher the issue.

YSFlight Scenery begins to have adverse effects on aircraft beyond a certain distance, with the effects worsening as aircraft deviate farther from the Point of Origin. This effect is seen as jitter of the aircraft, with faces and parts of aircraft moving out of place on more advanced aircraft.

This is of concern to the Grun, in regards to our newest project to expand Patrick31337's Japan Map to contain the entirity of Japan (save for the southern Island south of Kumamoto and Miyazaki Prefectures, but this is a current hard limit due to this bug, at least - it was. It is also of concern to the YSFlight Community as a whole.

The way we see it - and the community sees it, YSFlight's aircraft positioning system relies on a single value floating point system. A way that this could be rectified is through a floating cell system - something similar to how Bethesda Softworks (Creators of Fallout, The Elder Scrolls) utilize Cells in their games - which "cut up" a larger, massive open world into smaller, more reasonable parts, with each surrounding cell utilizing a seperate floating point value for these sells, and loading each "cell" of a scenery as it's own "scenery within scenery", allowing for this floating point problem to be mitigated.

I'm sorry if my explanation for this idea is a little.. confusing, I don't have a degree in CompSci or programming ( I don't even know a line of C# to save my life), but my knowledge of computing so far brought me to this conclusion.

Let me try and explain it in practical terms. Say for instance - an aircraft is in CELL A, and CELL A has dimensions of 100mi by 100mi,and around it are cells B, C, D, and E, with the same dimensions. The player leaves the boundaries of Cell A into Cell B. The game loads Cell B, and converts the old floating point value to the new value for where the player would end up.

Mr.Yamakawa, the Community has had many projects and dreams tarnished by this bug. I hope you will be able to rectify it, as you are the only one who can.

Other than that, It is a pleasure to write to you, and I await your response.

Best Regards,

Nodoka Hanamura
Please feel free to add comments, suggestions, and ideas relevant to the bug and it's resolution.

Thank you.
█████████████████████████████████████████████████████████████████████
Image

User avatar
decaff_42
Staff
Staff
Posts: 3544
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 617 times
Been thanked: 1326 times
Contact:

Re: Grun Communications Public Release - Communications with Dr. Soji Yamakawa

Post by decaff_42 » Thu Jun 23, 2016 10:14 am

While perhaps a bit long (at work we are told emails should be short :lol: ) I think this is a great letter. You're very respectful and I think you described things well.
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Civilian Aviation Server Flight Log

User avatar
Nodoka Hanamura
Veteran
Veteran
Posts: 923
Joined: Thu Apr 07, 2011 8:01 pm
Favorite Aircraft: Su-24, Mig-29, Su-27, F-18, F-15, ADF-01, Icon A5
Has thanked: 513 times
Been thanked: 266 times

Re: Grun Communications Public Release - Communications with Dr. Soji Yamakawa

Post by Nodoka Hanamura » Fri Oct 14, 2016 9:13 am

Alright guys, I finally heard back from Soji. Since I am wanting to be very polite with the man, I am waiting for permission to go ahead to post his email here (hopefully sooner than later :lol:).

Essentially, these are the key talking points he said:

He's been very busy (and continues to be busy).

He's aware of the problem, and it's present in stock maps - Aircraft around Sendai on Tohoku have the same issue. (I have encountered the same issue during a test run of some of GrunSol's new aircraft on our server.)

He believes the reason is much like what u2fly, waspe, flake, mofumofu-san and to a lesser extent, believe it was, due to the fact that the caluclations are in single-precision 32-bit floating point values.

The System I proposed can be done, but issues in Multiplayer could occur.

AI could be affected by this change in YSFlight's programming. Something like this would be big, meaning quite a bit of the YSFlight Source code pertaining to AI and Netcode would have to be rewritten to support this new location system - OpenYS (and other third party applications that use YSClass to hook into YSFlight for certain functions) would most likely be rendered inoperable until OfficerFlake could implement support for the updates to the netcode.

The part that followed was a little confusing for me, but I'll state what it said roughly :
However, unless you make a single scenery, and make it a collection of sub-sceneries, the raw coordinates should be small enough to work. And, if the viewpoint is close, the coordinates after transformation should also be small. The loss of Precision comes from the matrix itself.

He also needs to look back at how he was doing the transformation, but at least in OGL 1.1, he was using OGL's native Matrix function, which are in single-precision. If he were to let the CPU calculate the matrix, he could make it operate in double-precision, and it might make a magnitude of improvement. He'll try testing DP and see if it gets better.

He hasn't been able to implement big changes to the YSFlight source code for a while, but he'll look into it soon.

And finally, he said thank you for playing YSF :)

EDIT:

Soji has given authorization to release the email. The address is redacted due to it being his email at Carnegie Mellon.
from: Soji Yamakawa <[email protected][redacted]>
to: Nodoka Hanamura <[redacted]>
date: Wed, Oct 12, 2016 at 11:48 PM
subject: Re: YSFlight - Floating Point Scenery Issue
mailed-by: [redacted]
encryption: Standard (TLS)

Hi Nodoka,

Thank you for the E-Mail, and I'm sorry for late reply. (This spring and summer were real crazy, and it continues to be into the fall semester!)

I'm aware of the problem, and in fact it can be seen in Tohoku map, too. The origin is near the north end, and when I fly to Sendai airport, the graphics gets bumpy. I think the main reason of the problem is that the calculations are in single-precision (32-bit) floating point. Dividing a map into multiple cells is possible, and probably easy to do for stand-alone mode, but there can be some complications if you put the network mode into account. Also, auto-pilot code that needs other airplanes' locations will also be influenced.

However, unless you make one single field, like make it a collection of sub-fields, the raw coordinates should be reasonably small. And, if the viewpoint is close, the coordinate after the transformation should be reasonably small. The loss of precision comes from the matrix itself. I need to look back how I was doing the transformation, but at least in OpenGL 1.1 version, I was using OpenGL's own matrix functions, which is done in single-precision. If I let CPU calculate the matrix, I can make it in double-precision, and it might make magnitude improvement. So, I would first try calculating coordinates in double precision and see if the situation gets better.

I haven't been able to add a big change in the YSFLIGHT code for a while. But I'll look into this precision problem soon.

Thank you for playing YSFLIGHT!


Nodoka Hanamura <[redacted]>
Oct 13 (1 day ago)

to Soji
From: Nodoka Hanamura <[redacted]>
to: Soji Yamakawa <[email protected][redacted]>
date: Thu, Oct 13, 2016 at 2:10 AM
subject: Re: YSFlight - Floating Point Scenery Issue
mailed-by: [redacted]

Dr, Yamakawa,

Thank you for the response, regardless of wait.

I hope you do not mind that I will post this response to YSFHQ (Email address will be redacted, like it is in the original post on YSFHQ), as I have made the community aware of my post about this.

I sincerely appreciate your response, it's a pleasure to hear from the man that has honestly changed my life for the better, given YSFlight has brought me to meet many amazing people and form my first "gaming clan".

I look forward to what you have in store for the future for YSFlight, and hope you get the chance to stop by YSFHQ and say hello one of these days.

Sincerely,

Nodoka Hanamura
GrunSolutions CEO
YSFlight Headquarters 2016 Semester 2 Administrator - Online Play Division


Soji Yamakawa <[email protected][redacted]>
8:55 AM (20 hours ago)

to me
from: Soji Yamakawa <[email protected][redacted]>
to: Nodoka Hanamura <[redacted]>
date: Thu, Oct 13, 2016 at 8:55 AM
subject: Re: YSFlight - Floating Point Scenery Issue
encryption: Standard (TLS) Learn more

Sure. Please go ahead. Yes, I really want to have chance to meet those people who energized YSFlight one day in person. A few users have actually visited me in Pittsburgh in the past, and that was a great pleasure for me. My first motivation to learn programming was to write my own games, and it transformed into my dream of making my own flight simulator. After several attempts in several different computers, I finally built YSFlight, and it was more than my dream come true that so many amazing people over the world touched my program!
Thank you!
I am in continued talks with him about the bug - I have referred him to Patrick's Japan and Socal to Guam Maps, since those two are the bigged attractors to this bug.

Due to the added information I have bumped this thread.

Feel free to discuss below.


Last bumped by Nodoka Hanamura on Fri Oct 14, 2016 9:13 am.
█████████████████████████████████████████████████████████████████████
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest