Jump to content

[0.25] Time Control - 9/23/14 v13.2


Xaiier

Recommended Posts

I'm running into a potential bug, I've done a search to see if anyone has mentioned this but I haven't seen it so forgive me if I've missed something. When I pause I am no longer able to control the camera view using the arrow keys, but I am still able to use the hold-right mouse button to change the camera mode.

Link to comment
Share on other sites

I'm running into a potential bug, I've done a search to see if anyone has mentioned this but I haven't seen it so forgive me if I've missed something. When I pause I am no longer able to control the camera view using the arrow keys, but I am still able to use the hold-right mouse button to change the camera mode.

This is a result of how a lot of GUI elements slow down with the time rate, and thus completely freeze when time is paused. Fixing or overriding stuff like this is on my to-do list, but it isn't always an easy fix.

Link to comment
Share on other sites

A cool option would be to have a way to "force" the plugin to have a precie time warp(e.g 2time faster) and to stick to that: with the current system, you have to scroll a bar but the number indiacted on the GUI isn't the real time warp(sorry, my bad: the craft I was using was too big)

What I mean by the previous sentence(because I know it's not clear) is that it would be cool to have a way to enter the time warp wanted(e.g 2time faster) and the plugin would stick to that: no matter if the game could handle a faster time warp or if the game can't handle it and require a faster time warp.

Sorry, the craft I was using was so big it couldn't handle some time warp so it made me think that the number indicated on the GUI wasn't the time real time warp.

My bad :/

Other than that, the game plugin is awesome(especially for the slow-motion): watching a rocket crashing in very slow motion is better than seeing it going kerbal so fast that you can't really understand what happened.

EDIT: Ok, I had an idea about how I could explain the above(even more clearly!): like the slow-motion interface, there would be an interface allowing you to choose between the time warp(like you can choose between the other slow-motion(e.g: 1/2, 1/4 etc...) and the plugin wouldn't change the time warp.

Yeah, as you can see, I should have re-read my post before posting it...

Edited by goldenpeach
Link to comment
Share on other sites

v12.2 out with some minor bugfixes and implementation of Teknoman117's altitude limit code for custom bodies

EDIT: Ok, I had an idea about how I could explain the above(even more clearly!): like the slow-motion interface, there would be an interface allowing you to choose between the time warp(like you can choose between the other slow-motion(e.g: 1/2, 1/4 etc...) and the plugin wouldn't change the time warp.

Hmm, I still don't quite understand what you mean by this. What would it do? Why would it be helpful?

Edited by Xaiier
Link to comment
Share on other sites

Something very wrong has happened on the new release, I upgraded and lost the ability to launch vehicles or right click on newly launched vehicles.

Other vehicles that were already launched were fine, but if I dropped a MK1 pod on the pad, none of the right-click functions worked. In addition physics seemed to be "off" I put out a probe body attached to a stability thingy, triggered the staging (which should drop the probe body) but the stability thingy disappeared and the probe body just hovered there like it was glued to the air.

Thinking this might be a conflict with another mod, I did a cleanroom test (GameData with just Squad, NASAMission and Time Control brand new sandbox game, MK1 pod) and the same problem occurred.

The link to the log is:

https://gist.github.com/aelana/bc2229d9fcf94c1a7faf

I am running 32bit if it matters.

Just to be clear, right click itself works (and shows the tanks) but none of the functions exist ... i.e. no "Rename Vessel", "Control from Here", etc...

Edited by elfindreams
Link to comment
Share on other sites

Something very wrong has happened on the new release, I upgraded and lost the ability to launch vehicles or right click on newly launched vehicles.

Other vehicles that were already launched were fine, but if I dropped a MK1 pod on the pad, none of the right-click functions worked. In addition physics seemed to be "off" I put out a probe body attached to a stability thingy, triggered the staging (which should drop the probe body) but the stability thingy disappeared and the probe body just hovered there like it was glued to the air.

Thinking this might be a conflict with another mod, I did a cleanroom test (GameData with just Squad, NASAMission and Time Control brand new sandbox game, MK1 pod) and the same problem occurred.

The link to the log is:

https://gist.github.com/aelana/bc2229d9fcf94c1a7faf

I am running 32bit if it matters.

Just to be clear, right click itself works (and shows the tanks) but none of the functions exist ... i.e. no "Rename Vessel", "Control from Here", etc...

Thank you for providing a descriptive explanation and a log. I will look into it ASAP. I had noticed some oddity with the right click menus not working at very low warps, but I've not seen anything like vessel freezing.

Link to comment
Share on other sites

Thank you for providing a descriptive explanation and a log. I will look into it ASAP. I had noticed some oddity with the right click menus not working at very low warps, but I've not seen anything like vessel freezing.

Non-specific observation about the phenomena... It seems to me it behaves the same as if you click too quickly before the scene has kicked in. In even a stock game if the screen loads and you click fast enough the right-click menu will contain only the tanks. This is also the period before everything "settles" onto the pad, so it feels like everything is on rails or in stasis for a split second before everything kicks in.

This just feels like something interrupted that process (maybe something got in a bad way and is looping or returned badly/caused an exception/etc).

Link to comment
Share on other sites

Non-specific observation about the phenomena... It seems to me it behaves the same as if you click too quickly before the scene has kicked in. In even a stock game if the screen loads and you click fast enough the right-click menu will contain only the tanks. This is also the period before everything "settles" onto the pad, so it feels like everything is on rails or in stasis for a split second before everything kicks in.

This just feels like something interrupted that process (maybe something got in a bad way and is looping or returned badly/caused an exception/etc).

Hmm, you know what, it's throwing an exception in awake, which means that the process never actually gets fully started, so that could very well be it.

Link to comment
Share on other sites

for reasons I can't even begin to fathom, this mod makes Hullcam show you a view that is way offset and rotated from the actual camera when you select to look through it.

It looks like the camera zoom fix code messes them up, it works fine if you turn that option off, and I'll see if anything can be done to fix it.

Link to comment
Share on other sites

It appears to be related to the Deep Space Cthulhu bug. I talked with the author of KAC and I found that KAC works by abruptly changing the warp speeds, which ~mostly~ works in standard KSP. The problem comes when it does those abrupt changes at the vastly greater magnitudes allowed in TC. We talked about changing KAC to use a smoothed system like KSP does by standard, but I don't think anything came of it.

For now, KAC should still work as long as you reset the warp rates before using it. I'll see if I can contact TriggerAu again and see if he has made any progress.

I've looked into a time jump feature that could be used in a similar situation, and I have technically gotten it to work, but it is massively abusable - you can do things like pass through planets and jump so far ahead you miss a planetary escape and end up coming back in on the other side. Optimally, I would implement the jump feature with the limiter features I have planned, which could also include a rudimentary form of KAC. At the moment I am trying to get the hyper-warp feature done, but I'll see if I can look into this too.

I fixed this bug when PlanetFactory included extra time warps. It was a real pain to find. The problem is there is a bug in KSP where physics collision is not disabled when you leave a planets SOI. If in your mission report you see crashed into launch pad (or similar) that is why.

I found I could reliably reproduce this bug by doing this: Launch from Kerbin and fly all the way outside its SOI without loading or leaving the game. Timewarp 1000000x then slow down to 1x and Kaboom!

The fix was to disable all collision when you leave SOI. Call the function UpdateCollision() every frame and it should fix it.



private void SetLocalCollision(string planetName,bool enabled=true)
{
var localPlanet = PFUtil.FindLocal(planetName);
var cols = localPlanet.GetComponentsInChildren<Collider>();
foreach (var c in cols)
{
if (c.enabled!=enabled)
{
print("Updating collision " + c.gameObject.name +"="+enabled );
c.enabled = enabled;
}
}
}
private string currentBodyName;
private void UpdateCollision()
{
if (FlightGlobals.currentMainBody!=null && FlightGlobals.currentMainBody.bodyName != currentBodyName)
{
print("Body change "+currentBodyName +" to " + FlightGlobals.currentMainBody.bodyName);
if (currentBodyName != null)
SetLocalCollision(currentBodyName, false);
currentBodyName = FlightGlobals.currentMainBody.bodyName;
SetLocalCollision(currentBodyName, true);
}
}

Krag

Link to comment
Share on other sites

I fixed this bug when PlanetFactory included extra time warps. It was a real pain to find. The problem is there is a bug in KSP where physics collision is not disabled when you leave a planets SOI. If in your mission report you see crashed into launch pad (or similar) that is why.

I found I could reliably reproduce this bug by doing this: Launch from Kerbin and fly all the way outside its SOI without loading or leaving the game. Timewarp 1000000x then slow down to 1x and Kaboom!

The fix was to disable all collision when you leave SOI. Call the function UpdateCollision() every frame and it should fix it.

*snip*

Krag

Yes, I had actually seen this code and implemented it for a time (it got lost in a substantial redesign, hadn't really tested it) but it only fixes one of the problems. The other issue happens entirely within Kerbin's SOI, just smash the warp back and forth from 1,000,000x and 1x and eventually, launchpad collision. Could the same tactic be applied to the launchpad to prevent this?

Link to comment
Share on other sites

Yes, I had actually seen this code and implemented it for a time (it got lost in a substantial redesign, hadn't really tested it) but it only fixes one of the problems. The other issue happens entirely within Kerbin's SOI, just smash the warp back and forth from 1,000,000x and 1x and eventually, launchpad collision. Could the same tactic be applied to the launchpad to prevent this?

Possibly. Maybe disable/enable the collision once the ship is above a certain altitude. Or even based on the distance between the collider and the ship. There aren't many.

EDIT: Or just disable/enable planets collisions once you enter/leave hi-warps. I wonder why I didn't do that...

Edited by Kragrathea
Link to comment
Share on other sites

Possibly. Maybe disable/enable the collision once the ship is above a certain altitude. Or even based on the distance between the collider and the ship. There aren't many.

EDIT: Or just disable/enable planets collisions once you enter/leave hi-warps. I wonder why I didn't do that...

I've been poking at the launchpad but I'm having difficulty actually finding it to do anything to it. Disabling everything might work.

I have looked into this before, and its possible it isn't really a collision and more of a game bug due to how the vessel is re-loaded, this is a transcript from IRC:


23:51:41 <Xaiier> that bug seems to be aggravated by the higher warp process
23:52:09 <ferram4> The higher warp process is part of what *causes* that bug in the first place.
23:52:26 <Xaiier> which is why I'm even more interested in the solution
23:52:39 <ferram4> For some reason, when physics is re-enabled, forces are used to accelerate the vessel back up to speed.
23:52:58 <Xaiier> right, my research had pointed to something insane like that
23:53:21 <ferram4> If it's sudden enough, it causes the "break from colliding" thing to trip, and since it doesn't have a collision to point to, it blames the launchpad.
23:53:48 <Xaiier> so KJR fixes this...how?
23:54:09 <ferram4> And if you make those accelerations sudden, it's impossible to prevent that by boosting the collision-explosion threshold.
23:54:21 <ferram4> Because eventually you run out of precision for that.
23:54:39 <ferram4> Or you have to set up another variable to hold it while you set the threshold to float.MaxValue.
23:54:52 <ferram4> Which means possible RAM running-out at load.
23:55:39 <ferram4> That physics-easing that everyone complains about with KJR? That's there to make it possible to use KJR without everything exploding all the time. It's a necessary evil that is only there because the game handles enabling physics in a terrible way.
23:56:12 <Xaiier> ill admit i've never actually tried KJR
23:56:25 <ferram4> In this case, it throws all the collision and breaking forces up by a factor of something stupid to make it nearly impossible to break a vessel. And then when the easing is done, it sets things back.
23:56:42 <ferram4> But when dealing with physics glitches there's only so much band-aids can do.
23:57:08 <Xaiier> so...it should work with my mod, as it doesn't do any time tomfoolery
23:57:28 <ferram4> It doesn't do any time tomfoolery.
23:57:56 <ferram4> However, since it does that stuff to deal with how KJR's stiffening makes that more likely, I don't know how much it will help.
23:58:28 <Xaiier> so the joint stiffening worsens the initial problem
23:59:03 <ferram4> Yes.
23:59:25 <Xaiier> so...would be be possible to do the easing without the stiffening?
23:59:46 <ferram4> Well, sure. You can go and rip it out of KJR if you want to deal with the GPL license.
Saturday, July 12th, 2014
00:00:07 <ferram4> And the inevitable consequences of two mods trying to do the same thing at the same time.
00:00:47 <Xaiier> well, i need a solution to this, whether thats done by me or KJR doesn't matter
00:01:42 <ferram4> The best solution would be to not allow users to skip down from timewarp so quickly.
00:01:54 <Xaiier> that doesn't fix the problem
00:02:09 <ferram4> And KJR's solution doesn't fix the problem either.
00:02:15 <ferram4> Both are simply methods of hiding it.
00:02:53 <ferram4> Fixing the problem would require changing the KSP source code, which we can't do.
00:03:15 <Xaiier> what i mean is that the rate of warp change doesn't seem to change the outome
00:04:19 <Xaiier> ive talked to TriggerAu in reference to specific warp issues with rapid changes
00:06:22 <Xaiier> its insane to expect users to prepare for a random chance of their ship blowing up, so I'm just trying to alleviate as much of that problem as possible
00:09:00 <ferram4> Exactly how high a warp value do you need before it becomes an issue?
00:09:32 <Xaiier> its been difficult to check as results are widely varied
00:09:45 <Xaiier> it seems anything above stock begins to cause problems
00:10:24 <ferram4> Which implies that the stock limits are bandaids themselves.
00:11:00 <Xaiier> i had one user who was getting it almost constantly
00:11:16 <Xaiier> whereas it can take many warps for it to trigger for me
00:12:40 <ferram4> Check the physical delta T values for those cases.
00:12:49 <ferram4> It might be different timesteps causing the issue.
00:13:09 <Xaiier> sorry, what?
00:14:12 <Xaiier> ahhh
00:14:20 <Xaiier> KJR tried to save my vessel
00:14:34 <Xaiier> it flailed about the screen for half a second before exploding
00:14:58 <ferram4> The forces are too great for the physics engine.
00:15:14 <Xaiier> took 3-5 flips between 1x and 1000000000000x to trigger it
00:15:34 <ferram4> ...
00:21:15 <Xaiier> i got a trigger at 1,000,000x but not at 100,000x
00:23:30 <Xaiier> hmm
00:23:53 <Xaiier> the problem point is where the warp does not reach 1x before physics kicks in
00:24:17 <ferram4> ...
00:24:21 <ferram4> wut
00:25:35 <Xaiier> at about 300,000x when you click to go to 1x it doesn't have enough time to smoothly move there and that is also the point where it starts breaking
00:26:20 <ferram4> That's just bad design.
00:27:02 <Xaiier> i could try to artificially hold it off, but i have reports of users that sat at 5x for awhile and then went down and still exploded
00:28:16 <ferram4> That sounds... like bull to me, honestly. Unless they got video of it happening.
00:29:58 <Xaiier> well i just did it soo
00:30:27 <Xaiier> high rate --> 5x --> 2-3 seconds of waiting --> 1x --> explode
00:32:38 <ferram4> ...
00:32:50 <ferram4> That sounds like a stock bug then.
00:33:04 <ferram4> Can you cause it without your plugin?
00:33:21 <Xaiier> no, because I can't exceed the normal warp rates
00:33:43 <Xaiier> i could try one of the other plugins that changes rates, but it would likely be a similar result
00:37:29 <ferram4> This is the sort of thing that deserves Squad's attention, but if it can't be caused without a plugin it's a lot harder to motivate them.
00:37:40 <ferram4> Problem is, if they don't handle it there's not much you can do.
00:37:58 <Xaiier> thats why i was hoping the easing in KJR might help
00:38:24 <Xaiier> i also snagged something from alternis about collision things not being unloaded on SOI changes
00:38:37 <Xaiier> though im not sure if that actually helps

Edited by Xaiier
Link to comment
Share on other sites

I am not saying there isnt another problem that causes the Kaboom. But if you are seeing spurious collisions with launch pad stuff (the cause of any explosion should be in the mission log) then i'll bet its this bug. I was getting all kinds of explosions until I put that code in and then almost none.

Try the repo steps. Fly from KSP launch pad past SOI without any reloading and try high time warping. If you kaboom then that is the problem.

This sounds so familiar I could cry:

00:29:58 <Xaiier> well i just did it soo

00:30:27 <Xaiier> high rate --> 5x --> 2-3 seconds of waiting --> 1x --> explode

00:32:38 <ferram4> ...

Krag

Edited by Kragrathea
Link to comment
Share on other sites

I am not saying there isnt another problem that causes the Kaboom. But if you are seeing spurious collisions with launch pad stuff (the cause of any explosion should be in the mission log) then i'll bet its this bug. I was getting all kinds of explosions until I put that code in and then almost none.

Try the repo steps. Fly from KSP launch pad past SOI without any reloading and try high time warping. If you kaboom then that is the problem.

I did do that and implement the code, and it seems to be working for SOI transitions, though I've not strenuously tested it. I'm currently dug deep into trying to figure out how the Kerbin SOI explosions happen. Some preliminary testing makes it look like it might actually be a collision after all, because I've not been able to trigger it outside of Kerbin orbit. Just got a collision with duna face, but not triggering on Mun. (all 100km hyperedited perfect test orbits)

Also, lol:

mXmdFjM.png

Link to comment
Share on other sites

Using Hyperedit to go between planets can cause bugs that are not experienced without it. When you use hyperedit "things happen" and even tho it works most of the time it isn't the same as actually flying there. Ever see planets in the map view orbit backwards or pop in orbits when using timewarp? Thats Hyperedit.

Krag

Link to comment
Share on other sites

Hey, I posted a couple of times a while back about my spontaneous explosion issues and you were incredibly responsive and then I rudely disappeared for a while. Just reviewed the latest in the thread, and wanted to check back in and say I'm amazed at the level of effort you are putting into bug-squashing.

I was distracted away from KSP for a bit there, and then have been playing largely unmodded since upgrading to 0.24.

Anyway, enough about me. When last I was here you asked me to run a couple of tests dropping out of warp at different points in my orbit (varying my direction of travel relative to the launchpad), and I never did. Would that still be valuable data, or have you moved further along in the bug-hunt to a point where that data wouldn't be meaningful?

Link to comment
Share on other sites

Hey, I posted a couple of times a while back about my spontaneous explosion issues and you were incredibly responsive and then I rudely disappeared for a while. Just reviewed the latest in the thread, and wanted to check back in and say I'm amazed at the level of effort you are putting into bug-squashing.

I was distracted away from KSP for a bit there, and then have been playing largely unmodded since upgrading to 0.24.

Anyway, enough about me. When last I was here you asked me to run a couple of tests dropping out of warp at different points in my orbit (varying my direction of travel relative to the launchpad), and I never did. Would that still be valuable data, or have you moved further along in the bug-hunt to a point where that data wouldn't be meaningful?

I had wondered what happened to you. :) I've been doing my own testing and discussing it with other modders, but there is no clear solution as of yet. Thanks to Krag I have fixed the issue with SOI change warps causing explosions, but the in SOI warps still cause problems. The strangest part about it is how unreliable it is, some people report that it happens nearly every time, while I have to flip time warps numerous times to get it to trigger. Can you provide any input as to what situations you were in, other mods installed, anything that could provide a pattern or a reason why it happens more often for some people?

What's the matter whis this guy ?

This mod is indeed extremely useful for my beyond-Eeloo station for transfer time lasting over an hour :D

I joke, his videos are wonderful, but perhaps my wording wasn't the best. Glad you like it. :)

Link to comment
Share on other sites

The strangest part about it is how unreliable it is, some people report that it happens nearly every time, while I have to flip time warps numerous times to get it to trigger. Can you provide any input as to what situations you were in, other mods installed, anything that could provide a pattern or a reason why it happens more often for some people?

When you do explode what does the mission log say happened? Crashed into what?

Krag

Link to comment
Share on other sites

When you do explode what does the mission log say happened? Crashed into what?

Krag

Various surface objects, launchpad, water tower, oxygen tube, Tut-un Jeb-Ahn, the face if on duna. I've gone and disabled colliders for every part of a vessel, and it STILL tears itself apart, so I don't think its an actual collision this time. Then again, even with colliders disabled, the SOI switch bug your code fixes causes the vessel to RUD, so there might be some hidden thing still affecting them. :(

Link to comment
Share on other sites

Can you provide any input as to what situations you were in, other mods installed, anything that could provide a pattern or a reason why it happens more often for some people?

Yeah, I'll see if I can dig up any details of my install at the time I was encountering issues before. And I've done several cycles of re-install/uninstall, de-mod/re-mod since then, so if I test it out again even more interesting stuff might happen!

Link to comment
Share on other sites

OK, so haven't managed to dig up any details of my old install, but I'll rifle through my email (I seem to recall some correspondence at the time that might help).

In the meantime, I think I've managed to recreate the issue.

So: Base install of 0.24.2, Windows, running 32-bit for now. Two mods installed: Time Control and Toolbar.

Set top warp rate to 1,000,000, leave others. Set altitude limits to 100km from warp rate 5 up.

Get little ship to 120km/120km orbit. Ramp up to maximum warp (relatively quick steps, using keyboard). Let it run a few seconds. Drop to 5x (mouse click). Wait 3-ish seconds. Drop to 1x. Boom

Here's the output log:

http://www./view/axrkcpr5cu0r9qe/output_log.txt

Also, saw the ferram4 chat; "bull without a video". Fair point :) Here's a video:

http://www./watch/gbfe82e9168e8jh/KSP_2014-08-16_01-04-33-683.avi

Admittedly, this doesn't necessarily eliminate the possibility that it's bull (I remain fully prepared to learn that I am doing something insanely stupid).

I'll run some more tests next week (slower time warp changes, even longer wait at 5x, etc). Admittedly this was a pretty aggressive run with only a 3 second wait, just wanted to make sure I could recreate the issue before I got too deep in.

[EDIT] In case it matters, the ship got to orbit the old-fashioned way (I saw earlier in the thread that there were some concerns that HyperEdit could cause issues, and I suppose savefile editing could too, then. So, launched on top of a rocket). That being said, I did use a tiny bit of 4x physical timewarp on my way up to 10km. Long before the "experiment", but if you think it may be a variable, I can eliminate that next time I'm in.

Edited by TeeJaye85
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...