Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
86 user(s) are online (55 user(s) are browsing Forum)

Members: 0
Guests: 86

more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +10€

Current balance: -70€
(last updated 08/2019)

Please make a donation if you want to help keeping The-Starport online:

Bitcoin address:
Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 66 users playing Freelancer on 30 servers.
August. 17, 2019

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post

(1) 2 3 4 »


Ship Shaking
Just popping in
Joined:
2008/10/10 20:44
Group:
Registered Users
Posts: 14
Offline
Hi,
I just experienced the bug that my ship starts to shake when I get to far away from the center of the map.
Is this statement
Quote:

No, I think the ship shaking is something that is inherent to the way Freelancer is built. My guess is that there is some floating point error in the updating of the ship''s location as it moves. Because of the newtonian physics of the FL engine, slowing down to a complete stop from either linear or angular motion will take literally infinite time, so the shaking continues for quite a while after the ship appears to be stopped. However, since the shaking does stop at some point, it also appears that there is some cutoff that will set the ship''s movement speed to zero once it falls below a certain point. If you could find that cutoff value, you could possibly try to increase it, which would cause the ship to stop shaking earlier when it isn''t supposed to be moving; however, this would not do anything for shaking while the ship is in motion. Offhand I don''t believe a real solution exists beyond keeping the size of the solar system low enough that you don''t notice the shakes.

still up-to-date?

If so, there would be no way to build my mod as I wanted.
If I'd just size down all the ships and the values for engine, it'd be the same problem, as the now invisible shakes the ship experiences near the center of the map would then be noticeable due to the smaller proportions.

I originally planned to do some really huge systems, I already got a planet with 260k diameter, being about 500k away from the sun - which looks really great

Thx for any help,
Paranoid

Posted on: 2008/10/12 13:27
Top
Re: Ship Shaking
Quite a regular
Joined:
2008/3/3 8:54
From Pécs, Hungary
Group:
Registered Users
Posts: 117
Offline
Well, since this shaking thing is not a "feature" of FL, it cannot be changed by just tweaking some numbers, but you will need to rebuild the whole engine. You can't really go above the size of vanilla FL.

Posted on: 2008/10/12 15:27
Top
Re: Ship Shaking
Home away from home
Joined:
2008/2/17 23:14
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 518
Offline
I hate to say it mate, but unless you scale down the size of your systems to a more manageable scale... you are going to have this problem alot. I think your idea is cool, but unfortunately this problem wont go away.

Posted on: 2008/10/12 16:48
Open in new window
Top
Re: Ship Shaking
Starport Admin
Joined:
2009/2/21 21:42
Group:
Webmasters
Registered Users
Posts: 3518
Offline
I've worked on a mod with huge scales and scaling everything down actually helped. There was shaking, but it was manageable. We worked on a 1/20th scale from real size.

Posted on: 2008/10/12 17:12
"Cynicism is not realistic and tough. It's unrealistic and kind of cowardly because it means you don't have to try."
-Peggy Noonan
Top
Re: Ship Shaking
Quite a regular
Joined:
2008/2/19 8:18
From Stafford
Group:
Registered Users
Senior Members
Posts: 103
Offline
Isn't there a Hex offset that you can change to sort that out?

Posted on: 2008/10/12 21:04
Top
Re: Ship Shaking
Starport Admin
Joined:
2009/2/21 21:42
Group:
Webmasters
Registered Users
Posts: 3518
Offline
Like this was some sort of feature...

Hex offsets only change what the developer made ON PURPOSE remember :

Posted on: 2008/10/12 22:49
"Cynicism is not realistic and tough. It's unrealistic and kind of cowardly because it means you don't have to try."
-Peggy Noonan
Top
Re: Ship Shaking
Home away from home
Joined:
2008/6/5 16:18
From Germany
Group:
Banned!
Posts: 546
Offline
maybe they did this on purpose

Posted on: 2008/10/13 11:23
Top
Re: Ship Shaking
Starport Admin
Joined:
2009/2/21 21:42
Group:
Webmasters
Registered Users
Posts: 3518
Offline
I think they were just lazy/didn't have the time to fix it. I seriously see no advantage whatsoever, but I can see they haven't fixed it because the systems they have didn't get to a point where the shaking was really noticeable. It also goes in line with the large amount of stuff that's half-done in the game.

Posted on: 2008/10/13 14:40
"Cynicism is not realistic and tough. It's unrealistic and kind of cowardly because it means you don't have to try."
-Peggy Noonan
Top
Re: Ship Shaking
Not too shy to talk
Joined:
2008/5/17 10:55
Group:
Registered Users
Posts: 95
Offline
You may find that it has to do with the integers Freelancer uses for the system. As you know it "plots"position coords.

There are two issues here and maybe this is what causes the shaking -
1. is the physical game default scale - which is 100kx100k
2. is the repositioning to check the players position with the navmap - which you scale to get the system larger

The engine is built on plotting to a standard size and therefore the "plotting" of the player ship will become more "inaccurate" the larger the system is. This is a common issue with largescale terrain in game engines which are not made for it.

My suggestion to fix this once and for all is to find the entry in the exe and increase the "standard" size (i.e. Li01 - doesnt have a navmapscale, its default), then see if the navmapscale in the universe.ini will work better.

The idea being that if the default size is only 100kx100k (New York, no nav map scale), And you set it to 100,000k or a similar multiple, the engine might cope with this better if its already the defult size.
either way, I do believe that the issue is the game trying to match your position in the actual game itself and the navmap, which are both updated at the same time.

Posted on: 2008/10/13 20:07
Top
Re: Ship Shaking
Just popping in
Joined:
2008/10/10 20:44
Group:
Registered Users
Posts: 14
Offline
If this bug is related to the variable coordinates of the Ship, would it be possible to extent this variable with some more internal decimal places?

I just thought about scaling it all down, but if I keep the proportions and the shaking is really related to the ship's postion, it would just continue to do so, as you would see everything larger, therefore also the more little inacurracies invisible at present scale.


If there's a standard size for the systems in FL, like 100*100 K, it would be easier. I'll try to investigate into both options.

Posted on: 2008/10/13 21:03
Top
Re: Ship Shaking
Home away from home
Joined:
2008/2/10 22:00
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 1281
Offline
The error is actually due to matrix destabilization. The matrix for the camera is based off of the coordinates of the ship. Once the numbers get large the floating point errors start getting quite large. There is a fix but it would require an addition to the exe to fix it (w0dk4, a hook maybe?)

The quaternion matrix needs to be normalized right after its created and before it is transformed with the position vector. It is a single DX command but without the source I am unable to fix it.

Posted on: 2008/10/13 21:18
Galaxy Empire
Youtube Videos
Facebook
Top
Re: Ship Shaking
Just popping in
Joined:
2008/10/10 20:44
Group:
Registered Users
Posts: 14
Offline
Well, I'm totally new to prgramming, but I will try to learn some in my holidays.

I'm just resizing, I post my results here after I tried. Btw, is there a way to rename the units for distance in Game?
13K would just sound such small

/edit: Just tried it ... would be in general possible, but it would take very much time to resize everything needed, besides the bugs that happen to appear resizing pieces from vanilla FL.

Posted on: 2008/10/13 22:49
Top
Re: Ship Shaking
Starport Admin
Joined:
2008/2/10 15:03
Group:
Registered Users
Starport Admin
$$$ Supporters $$$
Posts: 1018
Offline
Quote:

The error is actually due to matrix destabilization. The matrix for the camera is based off of the coordinates of the ship. Once the numbers get large the floating point errors start getting quite large. There is a fix but it would require an addition to the exe to fix it (w0dk4, a hook maybe?)

The quaternion matrix needs to be normalized right after its created and before it is transformed with the position vector. It is a single DX command but without the source I am unable to fix it.



youll forever been an enourmous source of knowledge mate lol

Posted on: 2008/10/13 23:04
Top
Re: Ship Shaking
Starport Admin
Joined:
2008/2/26 20:36
From Germany
Group:
Webmasters
Registered Users
Posts: 1771
Offline
Quote:

The error is actually due to matrix destabilization. The matrix for the camera is based off of the coordinates of the ship. Once the numbers get large the floating point errors start getting quite large. There is a fix but it would require an addition to the exe to fix it (w0dk4, a hook maybe?)

The quaternion matrix needs to be normalized right after its created and before it is transformed with the position vector. It is a single DX command but without the source I am unable to fix it.



As I understand it, the floating point errors increase simply because of the high float numbers, losing precision. How does your proposal help solve that?
I dont know a lot about 3D DirectX math stuff so please explain a little more

Posted on: 2008/10/14 0:11
Top
Re: Ship Shaking
Home away from home
Joined:
2008/2/10 22:00
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 1281
Offline
Well, I ran into this exact same problem writing my game engine. It took some time to track it down but it turned out that one of the quaternion routines in DX requires a normalized matrix. Unfortunately I don't know where it is stored in FL, I ran across it a couple of years ago.

Basically the matrix needs to be normalized (converted to a 0.0 to 1.0 range) after this command D3DXQuaternionRotationYawPitchRoll and before this command D3DXMatrixAffineTransformation. The command that needs to be called is D3DXQuaternionNormalize and it needs to be the output from D3DXQuaternionRotationYawPitchRoll.

Sorry, I said position earlier, I was at work and didn't have the code to look at, still part of the position transform is done by D3DXMatrixAffineTransformation. .

BTW, it's actually the camera shaking, not the ship.

Edit - forgot to mention this, but the fix can also be applied in the view matrix calculation routine...

Posted on: 2008/10/14 0:49
Galaxy Empire
Youtube Videos
Facebook
Top
(1) 2 3 4 »