Spectator mode: Follow player view

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
Vachu
Engineer
Engineer
Posts: 5
Joined: 23 Jun 2007 17:57

Spectator mode: Follow player view

Post by Vachu »

Hello, I don't know if this as already been suggested but I think it would be nice to be able to synchronise the game view, in spectator mode, with a player that is playing the game. It would be even better if all the windows and the cursor were also synced and you'd have to touch a key to stop syncing.

I'd just love to look through the eyes of the best players!

What do you think?
Ethical
Engineer
Engineer
Posts: 32
Joined: 28 Aug 2005 08:26

Post by Ethical »

Sounds like a neat idea. Only I think most of that stuff happens client side. At most you could center on any place that the player last modified.

In order to watch that kind of activity, you would have to rewrite A LOT of client/server code, it'd use more mem etc.. Though I could be wrong.
User avatar
Dave
Moderator
Moderator
Posts: 17249
Joined: 26 Dec 2005 20:19
Location: North London

Post by Dave »

There'd also be the issue of someone opening another client to spectate on a competitor of their's, wouldn't there?
Official TT-Dave Fan Club

Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr


Why be a song when you can be a symphony? r is a...
User avatar
benc
Engineer
Engineer
Posts: 62
Joined: 30 Apr 2007 01:57

Post by benc »

I've had this same idea. The most efficient way to point out a spot in the map right now is to place a temporary sign and mention it in chat. It would be handier to be able to just say "spec me for a second and I'll take you on a tour of my new rail junction".
Dave Worley wrote:There'd also be the issue of someone opening another client to spectate on a competitor of their's, wouldn't there?
There would need to be a set of options like:
* Allow anyone to spectate me
* Allow teammates (same company) to spectate me
* Disallow spectating

Wouldn't stop a determined voyeur from hacking his client to track the last tile you did construction on... but that's already possible now.
Vachu
Engineer
Engineer
Posts: 5
Joined: 23 Jun 2007 17:57

Post by Vachu »

Well, the more I think about it, the more problems I see arising.

First, let's assume there could be a full sync mode, where you see the same windows, cursor, etc. Now, what if that player is playing in a higher resolution than you? Are the windows gonna go out of the screen? What about the cursor? So this means that for the full sync option to be available, you'd need to make sure the player you're looking at is playing in a resolution equal or less than your own resolution. And there's always the possibility that the player could change it's resolution midgame.

Second, the data needed for this to work would involve something like: Coordinates of current main view, coordinates of cursor and id, coordinates and size of all opened windows. Plus, for each windows, you'd need to know the state of those windows ie. what "tab" are each window currently in and the scrollstate of each scrollbars in each windows. Wow. Let's not even get into viewports with their independant zoom levels and all.

Third, scraping the need to transfer window states, there's the option to only tell the client where the other client is pointing and clicking, thus emulating the watched player's game. Implications? You need to ignore the clicks on disabled tools like the construction bars that are not available on spectator mode. Plus, you'd need to make sure every object is at the exact same place as those of the watched player. This means resolution, bar placement, etc. So, the emulation method is also not an option.

I guess the best way is still to use the window states option. But even this method would require a lot of work. Oh well. It would've been a nice option but I didn't realize all that it meant.

If anyone as any suggestion as to how to make this suggestion feasable, please tell. I still think this would be a fun option. There's also the less elaborate version which would mean that you'd only see the same main view as the other player. Nothing more, but still enough I guess.

And as for using it to spy, I think the solutions suggested by benc would do the job.
kaan
Route Supervisor
Route Supervisor
Posts: 399
Joined: 02 Apr 2007 20:13
Location: Nørup, Denmark

Post by kaan »

I think a less demanding option would be to have the centre of the viewed players screen be the centre of the viewport (or screen) of the spectator.
It should eliminate the problems with screen sizes.
Updates are only needed when the viewed player moves his view.
A possible algorithm could maybe send updates to viewers when the screen hasn't moved for 1 second or so to avoid extreme net traffic.
Smooth scrolling comes to mind as a good patch option to have enabled here ;)

Code: Select all

if (YouAreHappyAndYouKnowIt) {
    ClapYourHands();
}
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Post by Bilbo »

benc wrote:I've had this same idea. The most efficient way to point out a spot in the map right now is to place a temporary sign and mention it in chat. It would be handier to be able to just say "spec me for a second and I'll take you on a tour of my new rail junction".
Dave Worley wrote:There'd also be the issue of someone opening another client to spectate on a competitor of their's, wouldn't there?
There would need to be a set of options like:
* Allow anyone to spectate me
* Allow teammates (same company) to spectate me
* Disallow spectating

Wouldn't stop a determined voyeur from hacking his client to track the last tile you did construction on... but that's already possible now.
Or even worse, do not center the view, but instantly buy 4 surrounding tiles.

Though spectation teammates may make sense sometimes ....
User avatar
bob27
Transport Coordinator
Transport Coordinator
Posts: 278
Joined: 19 Mar 2007 23:27
Location: USA
Contact:

Post by bob27 »

I'm just thinking, wouldn't a firewall get in the way of you being able to watch what a player is doing? I know that I do not like to open ports that often, especially so someone can see what I'm doing.

Jeez, that sounded kind of akward. :(
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Post by Bilbo »

bob27 wrote:I'm just thinking, wouldn't a firewall get in the way of you being able to watch what a player is doing? I know that I do not like to open ports that often, especially so someone can see what I'm doing.

Jeez, that sounded kind of akward. :(
Nope ... everything player does is sent from server to you (so you are able to see the player tracks, etc ...)
If you are "lucky" to set accidentally the placement of your viewport to the same place as another player, you can see him constructing ... like you see AI constructing ... :)
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
User avatar
bob27
Transport Coordinator
Transport Coordinator
Posts: 278
Joined: 19 Mar 2007 23:27
Location: USA
Contact:

Post by bob27 »

@Bilbo Hmmm... I think I see where you're going. And that might just work. (I'm just guessing, I have no real idea.) :?
r_a_s_robin
Engineer
Engineer
Posts: 11
Joined: 17 Jan 2007 12:06

Post by r_a_s_robin »

i think this can't be so hard to apply. The only thing that has to happen is that every player sends 2 variables to the server (maybe this already happens):
- center of view
- zoomlevel

If you select a player you'd like to follow your view will have to adapt to those variables somehow.
Ruxton
Engineer
Engineer
Posts: 14
Joined: 08 May 2007 14:01
Contact:

Post by Ruxton »

another fine idea, and dont get so technical with it people, simply and its possible. What r_a_s_robin says is the best way to approach this for now, each player send back center of view and zoom level and then if they are building out of your resolution then thats something we can deal with for now.

having a spectator view would be great, ive recently been playing with some mates and teaching them how to play, its quite hard to do and we place A LOT of signs and it just gets messy. if i could just tell him to spectate me for 5 minutes then thatd be a billion times easier and hassle free.

+1 for a simple spectate
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 34 guests