On Thu, 4 May 2006 06:57:04 -0700 Arc Riley <[EMAIL PROTECTED]> wrote:
> >From a discussion in #Soya this morning, an awesome change was proposed: > > We want to abstract out the behavior of the TravelingCamera into a > seperate class so that: > 1) The camera's behavior can be changed cleanly > 2) Other things can be made to follow things > 3) Camera tricks (ie, multi-camera hacks/etc) can be implemented > > Inheritence (ie, class TravelingCamera(soya.Camera, soya.Follower) > wouldn't give us #1 - you can't undo inheritance cleanly. The idea is interesting, although not fully mature. Currently, TravelingCamera has a stack of Traveling object; a Traveling is an object that is in charge of computing where the camera should be located, and where the camera should look at. The TravelingCamera then moves smoothly (or not, depending of its attributes) at the location given by the Traveling object. Only the Traveling at the top of the traveling stack is taken into account. The stack allows to add temporary Travelings that take the camera's control, and they to pop them out of the stack to restore the previous Traveling. E.g. in a game, you can use a TravelingCamera with a ThirdPersonTraveling, and then when the player push the "look at the character's left" key, add a "LookAtLeft" Traveling on the stack. When the player release the key, just pop the Traveling. I find the point 2) and 3) you mention interesting, but I don't really understand the 1). Creating a "TravelingWorld" (not the best name, sure!) is a good idea; however I think we should keep the stack idea, which has proved to be useful for MMORPG (this is not clear in your proposal). Most of my game also use a similar stack of controller for character, allowing to give temporarily the control of the character to a different controler (i.e. a different player or a different algorithm for non-player characters), maybe camera control and player/character control should be merged in a more general "control" API. "Follower" is also not the right term, since there are not only follower Traveling, but also FixTraveling, and so on. Backward compatibility should be addressed too. Jiba _______________________________________________ Soya-user mailing list [email protected] https://mail.gna.org/listinfo/soya-user
