Camera Issue while watching another player

Camera Issue while watching another player

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
User avatar
Jonny5isalivetm
Posts: 186
Joined: 04 Jul 2006, 02:43

Camera Issue while watching another player

Post 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.
8611z
Posts: 169
Joined: 08 Jul 2015, 20:20

Re: Camera Issue while watching another player

Post 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)
User avatar
Jonny5isalivetm
Posts: 186
Joined: 04 Jul 2006, 02:43

Re: Camera Issue while watching another player

Post by Jonny5isalivetm »

Hi

Thanks for reply,

Do you experience same issue ?
User avatar
Jonny5isalivetm
Posts: 186
Joined: 04 Jul 2006, 02:43

Re: Camera Issue while watching another player

Post 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
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Camera Issue while watching another player

Post 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.
hokomoko
Spring Developer
Posts: 593
Joined: 02 Jun 2014, 00:46

Re: Camera Issue while watching another player

Post by hokomoko »

read what knorke said.
It's not an engine bug.
User avatar
Jonny5isalivetm
Posts: 186
Joined: 04 Jul 2006, 02:43

Re: Camera Issue while watching another player

Post by Jonny5isalivetm »

I take it all back apologies
User avatar
Floris
Posts: 611
Joined: 04 Jan 2011, 20:00

Re: Camera Issue while watching another player

Post by Floris »

i have no idea how to 'update' game
hokomoko
Spring Developer
Posts: 593
Joined: 02 Jun 2014, 00:46

Re: Camera Issue while watching another player

Post 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.
hokomoko
Spring Developer
Posts: 593
Joined: 02 Jun 2014, 00:46

Re: Camera Issue while watching another player

Post by hokomoko »

https://github.com/spring1944/spring194 ... 9119597bbe
This adds camera tweening in place of the engine.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Camera Issue while watching another player

Post 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.
hokomoko
Spring Developer
Posts: 593
Joined: 02 Jun 2014, 00:46

Re: Camera Issue while watching another player

Post 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
hokomoko
Spring Developer
Posts: 593
Joined: 02 Jun 2014, 00:46

Re: Camera Issue while watching another player

Post 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
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Camera Issue while watching another player

Post by Silentwings »

Ah thanks for fixing that - any thoughts on how to smooth zooming?
hokomoko
Spring Developer
Posts: 593
Joined: 02 Jun 2014, 00:46

Re: Camera Issue while watching another player

Post 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
Last edited by hokomoko on 23 Mar 2016, 15:09, edited 1 time in total.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Camera Issue while watching another player

Post 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.
hokomoko
Spring Developer
Posts: 593
Joined: 02 Jun 2014, 00:46

Re: Camera Issue while watching another player

Post by hokomoko »

smoothcam doesn't interpolate with the future, it interpolates with the present.
I'll post some working code in a bit
hokomoko
Spring Developer
Posts: 593
Joined: 02 Jun 2014, 00:46

Re: Camera Issue while watching another player

Post 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
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Camera Issue while watching another player

Post by Silentwings »

Thanks - I had a feeling the smooth cam issue might cause trouble :)
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Camera Issue while watching another player

Post 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.
Post Reply

Return to “Help & Bugs”