[Dev] Working with Cameras

Put together a plugin that changes the way cameras are handled in-game.


This allows you to tell the camera who to follow, and potentially have multiple cameras in the game.


Here is an example where the camera is centered on Chimg, and then on Acquire-chan.


CXmXXpvUAAA4PZj.jpg



I will probably release this as a stand-alone plugin before attempting to work on an actual multiple camera plugin, since there's a lot more involved.


For simple cut-scene purposes, having one camera would be enough.
Single camera should be easy, since you only need to modify GameMap.displayX/displayY. For multiple cameras, you have two options:


- (the hard one): Duplicate everything needed to display Scene_Map.


- (the easy one): Set displayX/displayY, render everything to a PIXI.RenderTexture, then set them back to normal and render everything normally.
Single camera should be easy, since you only need to modify GameMap.displayX/displayY. For multiple cameras, you have two options:


- (the hard one): Duplicate everything needed to display Scene_Map.


- (the easy one): Set displayX/displayY, render everything to a PIXI.RenderTexture, then set them back to normal and render everything normally.
I'm thinking of moving away from the displayX displayY thing that the map uses, since that's basically assuming the map handles where the camera should be.


I'll be moving displayX and displayY into the camera itself, and then whichever sprite is in charge of rendering what the camera sees will use the camera's information to determine how to set origins and stuff.


I didn't think of rendering everything to a texture though, but now I'm thinking about how you could potentially render two different maps, since that would then require multiple spriteset maps for each map.


Not sure if it will be useful to think about that far though in the design phase.

Original thread: https://forums.rpgmakerweb.com/threads/dev-working-with-cameras.54114/