Core Dump - Work In Progress
June 17, 1997: Camera switching
Yesterday was my birthday! (You forgot, didn't you?)
Oh well, never mind. Still, I got round to some serious coding this weekend. I'd already been testing the static camera routines for quite some time now. I could set any combination of cameras, and the "track object X" mode had also been done. Ok. So far so good.
But now some serious stuff had to be done. The dynamic bit. Lay down a mine, and an extra camera appears, the specs said. And I will admit that this was in itself no problem at all, the camera routines were built to do that.
What had to be included was an all-purpose bit of code; in an ideal situation, any object calls [film_on]. From now on, there is a camera tracking it. Call [film_off] and whow, the camera dissappears. That's the theory. Now real life.
Of course there might be more objects that want to be filmed. Which to choose? Laying down remote-controlled bombs obviously means that there must appear an extra camera. It is a very important event, more important than having a camera track some silly enemy. These considerations led me to add a "priority-number" to all objects that want to be filmed. The "director" code, that what I call it, can then decide which objects are really going to be shown onscreen and which aren't.
A major point in all this technical stuff is that playability must come first. So dropping a bomb should not produce an awkard effect, hindering gameplay. I solved this by making sure the player will always be smoothly tracked by the main camera.
More problems were caused by deleted objects. Obviously, any object
that dissappears can't be tracked anymore. But if it is being tracked,
another object might be filmed after this one.
But after one day of solid work, all was up and running. And I must say it looks pretty impressive, and it plays smoothly. I went a bit over the top with the effects though. When you lay down a remote-controlled bomb (a bit like the (switch) plastic explosives in Solid Snake), nothing happens initially. You can just go on playing. But if you walk too far away from the bomb, causing it to scroll ofscreen, an extra camera window appears that shows the bomb! Play is not interrupted in any way for this.
Another mine? Sure, and another window appears. (Next week I will show screen shots of how this looks) I must say I am very pleased with the result.
Also, this stuff got me thinking about some in-game puzzles. With these priority-driven cameras I have almost endless possibilities...