SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
05-04-12, 10:52 AM | #361 | |
Navy Seal
Join Date: Jan 2011
Location: CJ8937
Posts: 8,215
Downloads: 793
Uploads: 10
|
Quote:
|
|
05-04-12, 12:10 PM | #362 | |
Black Magic
|
Quote:
|
|
05-04-12, 12:18 PM | #363 |
Black Magic
|
Just found an annoying 'bug' with OllyDebug. If you have no breakpoints set and you exit the app it will write new .udd files that are blank Another annoying 'feature' is when the file being debugged has changed (via modifications, additions, deletions, etc.) it will not load the udd file for it (it won't load the breakpoints and all). Had to waste a day writing my own app that will take Olly's udd files and read them and write my own udd files (this way I can merge several udd files of the same name into a master udd file). The joys of working with other peoples apps...
|
05-04-12, 01:29 PM | #364 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
0.05149993 also equals some other interesting measurements.
0.05149993 = Earth's equatorial radius, and polar radius of 0.000000008 As does .05144444444 Since the SH World is flat, could those also be special numbers to skew things like latitude and longitude when in the Northern areas?? If you take the difference between the two, the Earth radius at both points are different. So if I'm a little North, does the Game engine use this difference to affect things to make it appear as if we are traveling the correct distance at the correct speed? Last edited by Madox58; 05-04-12 at 01:50 PM. |
05-04-12, 05:39 PM | #365 |
Black Magic
|
Interesting points I'll be on the look out for things like the above as I dig deeper into the .exe and .act files
I'll be sure to post any other constants I run into that just don't make any sense to me |
05-05-12, 05:47 PM | #366 |
Black Magic
|
Another constant that I'm not sure how or why it's value is what it is:
1016.047 This value is multiplied by the torpedoes impulse (which is usually a value of 2000). What are they converting the torpedoes impulse into? Some little tidbits of info: game restricts min torpedo depth to 1m. Max torpedo depth allowed is 50m (everytime you adjust torpedo depth on the torpedo box a function is called to ensure the value is clamped to these values) Another constant: 0.1056457 This constant gets multiplied by some huge number (looks to be related to distance from game origin but not exactly sure still) Last edited by TheDarkWraith; 05-05-12 at 06:05 PM. |
05-05-12, 06:06 PM | #367 | |
Ace of the deep .
|
Quote:
Long Ton to Kilograms Maybe something to do with realistic measurements checked in the game options . http://www.google.com.au/url?sa=t&rc...07FsGP9LohTVsA |
|
05-05-12, 07:22 PM | #368 | |
Black Magic
|
Quote:
Just found where when the torpedo is initialized it's initial speed is multiplied by some factor (probably the torpedo speed ability). My question is just how reliable was the torpedo speed? For instance, if they set the torpedo speed to 30knots did the torpedo actually run at 30knots or was there some known deviation that could take place? This would be the perfect place for me to inject some code to model this deviation (if any happened in real life) Found another intersting constant: 9.5 IIRC 9.5 is the acceleration rate in m/s2 right? The game takes the torpedo speed and divides it by this number (9.5) and stores the result in memory Last edited by TheDarkWraith; 05-05-12 at 08:08 PM. |
|
05-06-12, 02:30 PM | #369 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
9.8 is the accepted rate of free fall depending on several factors.
Do an extreme HALO and that rate is higher until you start getting into thicker air. Somewhere around 9.72 (but you need to be above 90,000 feet to hit that mark!) Newton couldn't go high enuff to see that part of the calculations. I don't see why one would use that measurement for a Torpedo which is not in free fall, but on a horizontal travel path. Even useing that for a sink rate would be wrong considering it's in salt water which has a different sink rate. Last edited by Madox58; 05-06-12 at 02:50 PM. |
05-06-12, 08:32 PM | #370 |
Loader
Join Date: Oct 2011
Posts: 89
Downloads: 27
Uploads: 0
|
Torpedo speed runs during the entire route of 13km constantly with 30ktn accept at the acceleration phase, which is short and negligible.
__________________
Dietrich von Carlewitz, 2nd Lt. U-29 |
05-07-12, 11:11 AM | #371 |
Black Magic
|
The one mystery that has always eluded me since SH3 has finally been solved While deep into the debugger I finally nailed down the function that clones the torpedo when it's launched (akin to Torpedo newtorpedo = new Torpedo() in C# language). This function loads all the default values (same as contructor initializing variables) for the new torpedo. The default heading for new torpedo is 0, the default depth is 2, etc. Now I know why torpedo always spawns heading north (ordered heading is 0). More importantly I have the memory address of where this default value is located Now one could change this memory address before firing a torpedo to ensure torpedo is heading in the right direction say for torpedo PT boats or the likes...
|
05-07-12, 01:56 PM | #372 |
Rear Admiral
Join Date: Apr 2006
Location: Swindon, England
Posts: 10,151
Downloads: 35
Uploads: 0
|
be ideal if the heading could be changed.
Destroyers,PT boats and AI uboats could benefit as well as aircraft. Maybe make the heading the same as the unit carrying them |
05-07-12, 03:08 PM | #373 |
Black Magic
|
That's exactly my thinking...I've bookmarked that memory address for further follow up. Right now I'm still deep into torpedo code trying to figure out how the game models the magnetic detonator.
|
05-07-12, 03:14 PM | #374 | |
Black Magic
|
Quote:
There is a constant that is loaded, 95, which is then converted into game units (95 X 0.1 = 9.5) The current torpedo ordered speed (2.265997 - TI fastest speed in game units) is divided by the constant above (9.5) to yield a result (0.2385260) that is stored away. This result looks like how far torpedo moves in game units every second |
|
05-07-12, 03:36 PM | #375 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
Now that makes alot more sense.
Nice work! |
|
|