Page 1 of 1

Camera Issue while watching another player

Posted: 12 Mar 2016, 20:52
by Jonny5isalivetm
Hi

While Spectating, watching another player it is super jumpy working silky smooth @ 100.

I have tried fresh install with same results so I thought I would ask here.

BA latest 9.35 with spring 101.

Re: Camera Issue while watching another player

Posted: 13 Mar 2016, 01:02
by 8611z
hi
might be just change in engine. wait until game is updated.
(https://github.com/spring/spring/commit ... 29aec3L779 = the camTime parameter in SetCameraState is removed, so camera instantly changes position)

Re: Camera Issue while watching another player

Posted: 13 Mar 2016, 21:31
by Jonny5isalivetm
Hi

Thanks for reply,

Do you experience same issue ?

Re: Camera Issue while watching another player

Posted: 14 Mar 2016, 00:04
by Jonny5isalivetm
ok 100% a bug

confirmed by Lucy in the current live TechA game, having exact same issue.

If devs could fix this it would be great as I mostly spec these days and spectating is epicfail now

Re: Camera Issue while watching another player

Posted: 14 Mar 2016, 10:06
by Jools
If it's an engine bug then report it here: https://springrts.com/mantis/my_view_page.php

...along with a more complete description of what the bug actually is.

Re: Camera Issue while watching another player

Posted: 14 Mar 2016, 14:13
by hokomoko
read what knorke said.
It's not an engine bug.

Re: Camera Issue while watching another player

Posted: 14 Mar 2016, 21:19
by Jonny5isalivetm
I take it all back apologies

Re: Camera Issue while watching another player

Posted: 14 Mar 2016, 22:16
by Floris
i have no idea how to 'update' game

Re: Camera Issue while watching another player

Posted: 14 Mar 2016, 22:21
by hokomoko
I'm planning to add tweening to my current widget (probably based on the one already present in ZK) somewhere this week. Hopefully it should be copyable in some form to your game.

Re: Camera Issue while watching another player

Posted: 16 Mar 2016, 11:42
by hokomoko
https://github.com/spring1944/spring194 ... 9119597bbe
This adds camera tweening in place of the engine.

Re: Camera Issue while watching another player

Posted: 23 Mar 2016, 12:08
by Silentwings
Thanks - although that implements "one by one" camera transitions, I can't see how it could be used to repair the smooth camera widget e.g. http://imolarpg.dyndns.org/trac/balates ... othcam.lua - any ideas? The primary function of that widget is (was...) to make zooming via the mousewheel smooth instead of jerky.

Worse, it looks like every different camera mode has an individual pleathora of tags dictating its parameters/speeds, meaning that altering the general camera behaviour via a widget (e.g. increase zoom speed), in a way that works for all modes, is basically not viable.

I think your implementation may not behave correctly when the new requested camera state has a different mode to the camera state the user starts with, because of
https://springrts.com/wiki/Lua_UnsyncedCtrl#Camera wrote:The camState's mode/name must fit the rest of the state. Getting a state, changing its mode/name and then passing it to SetCameraState will have undesired results. Also see #5028
but its hard to be sure since afaik there is no information on why this limitation was invented.

Also, it doesn't seem to be able to interpolate using ctrl+mousewheel to change the viewing angle correctly, but I haven't fully figured out whats wrong with that yet.

Re: Camera Issue while watching another player

Posted: 23 Mar 2016, 13:57
by hokomoko
I think your implementation may not behave correctly when the new requested camera state has a different mode to the camera state the user starts with
This has been tested and it works.
Also, it doesn't seem to be able to interpolate using ctrl+mousewheel to change the viewing angle correctly, but I haven't fully figured out whats wrong with that yet.
I'll check that

Re: Camera Issue while watching another player

Posted: 23 Mar 2016, 14:30
by hokomoko
It appears that the reason is rooted in the engine, I won't be surprised if it wasn't interpolated previously either.
should be fixed in https://github.com/spring/spring/commit ... 08dd3a5374

Re: Camera Issue while watching another player

Posted: 23 Mar 2016, 14:56
by Silentwings
Ah thanks for fixing that - any thoughts on how to smooth zooming?

Re: Camera Issue while watching another player

Posted: 23 Mar 2016, 15:07
by hokomoko
I'm not sure why the current code can't do that

there are exactly two models where you really need to implement smooth zooming: TA and Spring, so even if a single solution isn't viable, making 2 solutions based on mode doesn't sound like the worst nightmare ever

Re: Camera Issue while watching another player

Posted: 23 Mar 2016, 15:09
by Silentwings
And I'm not sure why the old (widget) code worked...

The new code can't do it because in order to interpolate it needs to know where the camera will be in the future, and for scrolling it doesn't (and can't, really) know that.

Re: Camera Issue while watching another player

Posted: 23 Mar 2016, 15:39
by hokomoko
smoothcam doesn't interpolate with the future, it interpolates with the present.
I'll post some working code in a bit

Re: Camera Issue while watching another player

Posted: 23 Mar 2016, 18:10
by hokomoko
ok the situation is more complex than I have thought.
I'll try to return transitions into the engine

Edit: they're back in, interpolation code can be thrown away safely

Re: Camera Issue while watching another player

Posted: 23 Mar 2016, 21:08
by Silentwings
Thanks - I had a feeling the smooth cam issue might cause trouble :)

Re: Camera Issue while watching another player

Posted: 23 Mar 2016, 22:05
by Jools
Thanks from me too. I have also missed the transition effects but didn't want to cause fuzz with commenting on engine internals.