So the things I know I'm going to want Zones to support:
- Region boundaries, defining the visible area in (x,y) of the zone.
- The camera's fit-to-zone behaviour, i.e. Whether or not the camera zooms to fit to the zone if the zone is smaller than the camera's visible area.
- The camera's boundary behaviour, i.e. If the camera clamps at the boundary, or zooms to attempt to keep the player center frame.
- Minimum and maximum zoom extents and the smoothing factor of transitions.
- The camera's perspective FOV (for now, static).
- The camera's background colour or skybox.
- The default overlay colour.
I can assign a Zone directly to any Camera by simply dragging and dropping it in the editor. I can also assign Zones to Portals in the same way. When the player arrives at a destination Portal, it assigns its preconfigured Zone to the Camera. This means that currently Zones are hardwired to Portals, but I may take the time later to make Zones more independant and introduce Zone transitions, if I have a need for it. Right now I can only imagine needing Zones on a per-portal basis, but that may change.
Another limitation is that Zones are rectangular only, and I have no clean way to transition between Zones without using a Portal. This makes L-shaped (or T-shaped or anything other than box shaped) levels currently impossible to implement. It gets considerably more complicated binding a Camera to a non-rectangular boundary. At least, for me it does. I could compose more complicated Zone shapes using multiple rectangles, but right now I can't think of an elegant way to handle the transitions across connecting borders.
Worst case scenario isn't so bad anyway, and realistically keeps things nice and simple: Stick to rectangular bounding zones.
No comments:
Post a Comment