Author Topic: [Fix Req] Linux Wandering Camera Bug  (Read 3020 times)

ushas

  • Hero Member
  • *****
  • Posts: 661
[Fix Req] Linux Wandering Camera Bug
« on: May 09, 2017, 06:51:11 PM »
Ugh, that's ridiculous...  Probably found out what's happening. I don't know whether relates to shaders (thanks for a shortcut anyway). A bet this doesn't trigger on windows.

It's practically an advanced version of the Wandering camera bug on the map load of linux Unity builds, as reported before. Although annoying having to scroll all the way back every time on start of tactical-repo or dialogues, as there is no centering to compensate, in v14 it went to the edge of the map and stopped there. In v15 and v16 it seems like the maps lost their boundaries. The traveling bug also often triggers when alt+tabbing but not always. That would explain inconsistent behavior. The longer the game alt+tabbed the further away from the battle it goes. So the camera works properly, it's just 10 light years away from the battlefield. Centering on characters doesn't work at this distance anymore. Tested on SlumConstruction1 map.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1249
Re: [Fix Req] Linux Wandering Camera Bug
« Reply #1 on: May 10, 2017, 08:38:25 PM »
Good to know. The reason I was thinking shaders was that I had trouble on Linux Testing V16. City map blacked out. I'd added a shader to the camera, and removing it fixed the problem. It's also possible (nay probable) that my GPU drivers are horribly out of date. Odd thing is: this shader is used in voiced ally cutscenes and in combat.

Were you able to get back to the battlefield on short intervals?

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Fix Req] Linux Wandering Camera Bug
« Reply #2 on: May 11, 2017, 01:21:15 AM »
No. Most of the times I wasn't able to. Just accidentally caught it traveling away a few times so only then it was possible to scroll back. I'm not so sure anymore that it's just the wandering thing. Sometimes the blackout happens right after alt+tab is used, but I'm not sure if would happen at all while the map was on the screen. On the ally cutscene the alt+tab brought me to the home base I think, so not sure if it can be detected there.   

That shader shortcut would be definitely good to try if it's viable to add.

There are big sections in the log regarding a failed compilation of a fragment shader or so. Not sure if related:
Code: [Select]
...
-------- failed compiling:
fragment evaluation shader
Note: Creation of internal variant of shader 'Somian/Unlit/Transparent' failed.
WARNING: Shader Unsupported: 'Somian/Unlit/Transparent' - Pass '' has no vertex shader
-------- Shader compilation failed
...


It would be also useful to consider a mouse scrolling toggle down the road, to test if it helps before the release. Although it pains me to bother with linux issues. I'm just concerned this looks bad (battles are long, no saving). What if some youtube personality switches to steamos in the meantime? :-\

May I ask what kind of GPU card/drivers you run? Depends on distribution and configuration, the drivers are usually updated with kernel and such.

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1249
Re: [Fix Req] Linux Wandering Camera Bug
« Reply #3 on: June 20, 2017, 02:00:14 PM »
Sorry missed this post. I'll tackle toggle mouse scrolling soon(ish). When the blackout happens, are UI elements visible?

Added keys to turn off shaders, so next time it happens, you can try these shortcuts. Should display notification on which shader switch on/off

B: Toggles brightness & contrast shader (most likely the problem shader, assuming it is a shader problem)
C: Toggles color correction

Usually just fire up the Linux machine for testing. Have a 460GTX and Ubuntu 12.04, but beyond that, don't know. Tried upgrading drivers, no luck - not familiar enough with the OS to do anything quickly.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Fix Req] Linux Wandering Camera Bug
« Reply #4 on: June 20, 2017, 08:30:59 PM »
Great, thanks for the switch! Will report anything new with v17.

Yes, UI elements are visible and working. The battle still ongoing. I can simply end turns and it will resolve into defeat. Trained myself escaping to menu before Alt+Tabbing out of game - then it will never black out. However, it may happen when on the character screen.

When I  scroll to the edge of the map the centering via clicking on portraits or when the unit's turn is due doesn't work anymore, neither it works when blacked out.

Seems scrolling speed depends on distance to character - is it possible you don't have distance info out of map? In that case: if distance unknown -> center instantly? Because if it's the wandering camera, such simple condition may as well hide the issue (probably Unity related anyway). Would also need to enforce camera centering on tactical-repo and centering on speakers for conversation to make it wholly go away. But this is a wild hypothesis, can't vouch for...

Actually, I would recommend upgrading when having time, your Ubuntu version passed its end of life. If using only for testing, perhaps clean installation could be the most sure way. According to releases wiki, Ubuntu 16.04.2 seems the latest stable with long-term support.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Fix Req] Linux Wandering Camera Bug
« Reply #5 on: July 14, 2017, 12:20:36 AM »
(v17, linux)
Unfortunately, when the blackout happens, neither nor both toggles will change anything.

However, I'm trying to toggle them off on the beginning as precaution, and albeit the camera travels as usual, so far I'm not getting the blackouts on the maps they usually happen. But unsure, I don't have statistically significant data yet.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Fix Req] Linux Wandering Camera Bug
« Reply #6 on: August 14, 2017, 12:33:24 AM »
(v18, linux)

Yeah, so I think got the blacked out objects even when both toggles were set to 'off'.

Attached a screenshot (from earlier version), how it looks like, just for documentation.

That instant centering when out of map and enforced on bypass and in conversation would really help with the camera wandering bug; plus the edge scrolling toggle for mouse. Though can't guarantee it will do anything with the black out. Out of other ideas. For now. Temporarily. I'm not going to give up!

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1249
Re: [Fix Req] Linux Wandering Camera Bug
« Reply #7 on: August 15, 2017, 06:18:22 AM »
Clicking on a portrait doesn't do anything?

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Fix Req] Linux Wandering Camera Bug
« Reply #8 on: August 15, 2017, 10:15:40 PM »
Clicking on a portrait doesn't do anything?
Has anything changed regarding to what was reported before? I've re-checked with each version, so far seems the same, but could easily overlook something.

Summary (camera can wander in all those cases either initially or after alt+tab):
1) Clicking on a portrait on normal turn when within a battle map border -> does centering all right.
2) Clicking on a portrait when it's a bypass turn -> doesn't do anything.
3) Clicking on a portrait in conversation -> doesn't do anything.
4) Clicking on a portrait when outside of map -> doesn't do anything. As centering speed changes with distance from the unit (can be turned off?), thought it has something to do with that. That's why proposed "if distance unknown / out of map -> center instantly". Of course, could be wrong. But the point is, in case you're asking about the black out issue, I'm unable to evaluate if clicking on a portrait would do anything. It's still possible that camera wandering and the black out are two separate problems though, as the latter first happened after v15 was introduced. 

Sorry for repeating old stuff, rather opted for recap than assuming what you've or haven't read.

Will try to use a centering shortcut for all the above points in v19 and report back.



As for scrolling out of map, in case you are unable to reproduce or it's only linux specific, some preliminary observations:
Normally, the game doesn't let you go far away from the map. When it starts like that and you scroll near the edge, centering via a portrait might still work. However, later it can happen that it will let you go further (eg. see attached image). And this is the point when centering stops working even when a part of the map is still in the view. Seems correct itself when you scroll back to the map and then use centering. I don't think it relates to specific maps. So far wasn't able to reliable pinpoint anything concrete, but can usually reach the out of map state by tinkering with some stuff, such as:
-- Changing computer camera control mode and them scrolling (but it's not necessarily tied to one specific).
-- Trying to control camera when it's an enemy's turn or transition between enemy's -> ally's, or when a unit is busy. Depends on the camera mode.
-- Alt+tabbing out of game and back (but it's not necessary condition).
-- On some maps (construction sites?) seems happen easier/earlier. Perhaps because the team spawn is near the edge.
-- Sometimes just being near the edge and scrolling with mouse, perhaps in combination with zooming.
-- Sometimes I really dunno. Simply some turns later it can scroll further, but couldn't before...
Uff. Not helpful:/

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1249
Re: [Fix Req] Linux Wandering Camera Bug
« Reply #9 on: August 16, 2017, 09:43:53 AM »
It has happened to me on Linux. It's unfortunate these issues pop up on Linux/Mac. I'll add an option for this in next update and for windowing (give me a nudge if I don't mention it in notes) as V19 could release today (if no more bugs and don't want to author any more at the end) or probably tomorrow in the case of issues.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Fix Req] Linux Wandering Camera Bug
« Reply #10 on: August 16, 2017, 06:38:55 PM »
Roger that.
May release go smooth!

Daithi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1249
Re: [Fix Req] Linux Wandering Camera Bug
« Reply #11 on: October 17, 2017, 05:25:24 PM »
Have added an option to start the level with mouse scrolling disabled and a keybinding to enable/toggle it. Still needs to be tested on Linux machine, so will leave it in confirm bug fixes for now.

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Fix Req] Linux Wandering Camera Bug
« Reply #12 on: October 17, 2017, 06:50:22 PM »
Have added an option to start the level with mouse scrolling disabled and a keybinding to enable/toggle it.
Thanks, that's some clever combination! :)

With the game freezing on alt+tab you did on top of that, prospects are very optimistic.

Btw. don't know what changed between v18-v20, but during v20 while using camera 'on' setting and the blackout happened, after ending turns of my guys, the game was now able to center back to the map on the enemy's turn (but not during our when used centering command). Mentioning, just in case.

Forgot to mention - would recommend to list the camera wandering bug itself in the known issues too. Most probably it's not going anywhere. To sum up, happens on the map load, alt+tab, trying to take a screenshot.
« Last Edit: October 18, 2017, 10:59:01 AM by ushas »

ushas

  • Hero Member
  • *****
  • Posts: 661
Re: [Fix Req] Linux Wandering Camera Bug
« Reply #13 on: November 17, 2017, 03:45:52 PM »
Camera wandering doesn't go anywhere, but the mouse scrolling workaround in v21 works well. Thanks!
When the scrolling is turned off, by either way, it won't wander even when alt+tabbed out of the game, and vice versa.

However, the game isn't paused. When I alt+tab during an enemy turn, the battle continues. With mouse scrolling turned on I even got the blackout again. That's a good indication scrolling was the joint culprit.

In the past there was an issue with being able to end turn while in inventory or char. screen - and the battle continues. This seems to be not the case anymore. Either the battle is paused or the battle keys not listened any more. Mentioning in case it has something to do with the game freezing settings. Edit: Also seems no wandering anymore when alt+tabbed from inventory (with mouse scrolling on). Then pausing works well in here but not when alt+tabbed from the battle view.

Edit: Is on alt+tab pausing working differently on win?
« Last Edit: November 21, 2017, 10:56:29 PM by ushas »