JinX (Observer) Mode
Implement spectator mode.
- [x] Basic observer mode for D1 (1.4X5)
- [x] Damage/shield pickup communication for D1 (1.4X6)
- [x] Full ship status communication for D1 (D1-1.4X7)
- [ ] Full support across all game types for D1, including co-op and multi-level missions (D1-1.4X7)
- [ ] Port observer mode to D2 (D2-1.4X7)
We already know we have observer mode in game, but there are still a few features we want to add, and one major one that needs discussion.
The first feature is the ability to go D3-observer style... fly in the cockpit of another player first-person style. This will be implemented with Ctrl+1 through Ctrl+7 to view a specific player... Ctrl+8 to unlock your camera... and Ctrl+9 and Ctrl+0 to cycle through the players.
The next feature is D3-observing, except byebyemonkey style... Using Ctrl+= will set you into third-person mode where you are still locked into a pilot's movement, but you are slightly BEHIND that pilot. Ctrl+- will put you back into first-person mode.
I'm expecting to have the above two done within the next two days.
The feature that needs most discussing is the ability for observers to view ship status. That is, shields, energy, and weapon info. This one is more involved, because the technical implementation of observer mode is for the host to send ALL the packets an observer needs to observe a game. Unfortunately, the host does not know the ship status of their opponent, so this would either require an observer registering with everyone in the game and everyone sending their packets to observers as well as other players, or to have players send their ship status to the host who in turn relays it to the observers. Both have pros and cons, and there are probably other ways of doing this that we haven't thought of yet (3rd party tracker?). Definitely up for discussion.
@CDarrow @adam2104
I wanted to start a conversation about adding security to some of the sensitive data that will be transmitted from client through host to observer.
Starting in 1.4X6, we will be sending shield changes through the host to the observer. The obvious issue is that this information is going through the host unencrypted, so the host could theoretically know the health of their opponent by reading the right UDP packets.
I thought about some kind of encryption, but if the host has to provide or transmit the encryption key, they can just simply decrypt the data themselves. Not a good solution.
So the solution I'm thinking of is to use a trusted third party to facilitate this. Namely, https://github.com/adam2104/PyTracker. What would need to happen is that when a host registers with the tracker, the tracker generates an encryption key, but doesn't tell the host what that is. Then, as clients query the game tracker, they would receive this encryption key with the rest of the game information, and that is the key that clients would use to encrypt data and observers would use to decrypt data.
Obviously this wouldn't work on LAN, but I'd argue that on LAN it doesn't need to work, because people are going to be watching you. :)
Let me know if you think this is a good idea, or if there's something better we can come up with that wouldn't involve the tracker.