You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm working on a platformer, and I find it helpful to have "off-stage" areas in each scene in which to stage actors for walking on, so they don't just appear at the edge of the scene, or to allow the player to actually walk off the edge of the scene for a transition trigger without having the transition happen when they hit the edge of the scene. Like this:
Unfortunately there doesn't appear to be any way to set minimum and maximum values for the camera inside the GB Studio engine without either lots of enormous triggers, an invisible camera controller actor that manages the camera position in its update script, or ejecting the engine.
Describe the solution you'd like
I'd propose adding an event that can be added to the scene's On Init script that would allow the user to set minimum and maximum values for the camera's X and Y coordinates, at the pixel or tile level. I've accomplished this in my game by using an engine eject and editing camera.c as follows:
But this only really works for me because my scenes are all uniform in size (32 tiles wide and 18 tiles tall, plus four on each of the four sides, for a total of 40x26 tiles.)
Describe alternatives you've considered
I've tried accomplishing this with triggers to move the camera to scene edge when the player gets close, then lock it back to the player then the player moves away, but there are problems with this:
The triggers necessary would need to be quite large in the scene, and their sizes would need to change if the developer ever adjusted the camera deadzone.
The Camera Move To event is not aligned onto the same pixel when the player moves into the trigger, so it sort of jitters a bit as it locks if speed is set to Instant.
Camera Lock To Player only lets you lock one axis, not both.
I've also tried this with an invisible actor whose On Update script sets the camera position if the player enters a particular range in the scene, but this generates a fair bit of lag.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I'm working on a platformer, and I find it helpful to have "off-stage" areas in each scene in which to stage actors for walking on, so they don't just appear at the edge of the scene, or to allow the player to actually walk off the edge of the scene for a transition trigger without having the transition happen when they hit the edge of the scene. Like this:
Unfortunately there doesn't appear to be any way to set minimum and maximum values for the camera inside the GB Studio engine without either lots of enormous triggers, an invisible camera controller actor that manages the camera position in its update script, or ejecting the engine.
Describe the solution you'd like
I'd propose adding an event that can be added to the scene's On Init script that would allow the user to set minimum and maximum values for the camera's X and Y coordinates, at the pixel or tile level. I've accomplished this in my game by using an engine eject and editing camera.c as follows:
But this only really works for me because my scenes are all uniform in size (32 tiles wide and 18 tiles tall, plus four on each of the four sides, for a total of 40x26 tiles.)
Describe alternatives you've considered
I've tried accomplishing this with triggers to move the camera to scene edge when the player gets close, then lock it back to the player then the player moves away, but there are problems with this:
I've also tried this with an invisible actor whose On Update script sets the camera position if the player enters a particular range in the scene, but this generates a fair bit of lag.
The text was updated successfully, but these errors were encountered: