Work on the Autopilot and Navigator has led onto a long planned separation of concerns (read ‘Single Responsibility Principle’) regarding the player and their movement within the scene.
As it stands, the Scene Management system only cares about a Scene Object – and configures all the various scenes around the location of this Scene Object. As the name suggests, a ‘Scene Object’ is pretty non-specific. In fact, it’s as generic as I can make it. It merely represents an object which can exist in one or more scene spaces, with a position, and orientation in each (though orientation is coming up for debate as I’m finding little need for a ‘per scene orientation’, but I digress).
In other words, I can generate the current scene around any object, and the cameras will view that scene from that objects perspective – be it a vessel, a planet, a satellite, a missile…
So what’s the concern? Well, at the moment I haven’t resolved how the player will control vessels (and other objects), ie. flight mechanics. So all the player input (mouse & keyboard only ATM) is wired to directly drive the vessel, which in turn is the scene object the Scene Manager is aware of. In other words, you are directly flying the camera. That may sound ok, but it will cause problems down the road.
Anyone who’s read Insurmountable Odds (plug!) may be aware of Observers, and Observer Boards. Observers are punctures in space similar to miniature worm-holes, projected and controlled via Observer Boards. In other words, they make perfect cameras 😉
In the game, almost every vessel has a very limited Observer Board – depending on the vessel. These allow you to view from any point in space withing range of the board itself. So, false forward views, third person, plan view, these are all possible by manipulating the Observer. More powerful Boards can project further, and also allow multiple channels to view from. It’ll also be possible to drop Observers in one Star system, and view it from another – with certain restrictions.
So – when tackling cameras and the scene management system, it makes sense to simply create the Observer Board and Observer system, decoupling the camera from the vessel and helping me with an inherent development / debug camera system that means I can view anything from anywhere.
The Board & Observer code is in place, with an Observer now following the vessel – so now you control the vessel, not the camera. That may sound like a subtle (or even pointless) distinction, but it’s incredibly important, and a major milestone on the road to sorting out the flight mechanics which will eventually go into the game.
ooh, the first game i saw that actually attaches some gameplay to the player viewpoint camera, sounds fun 😀
Hopefully 🙂 There are loads of applications which I don’t want to throw spoilers for too much – though they aren’t too hard to come up with!
One is an ‘Inspection Observer’… been in a battle? Damage report systems damaged? No idea what’s leaking out of the drive array? Go take a look without leaving the comfort of the Bridge 🙂